CN116466695A - Optimal obstacle collision point searching method - Google Patents

Optimal obstacle collision point searching method Download PDF

Info

Publication number
CN116466695A
CN116466695A CN202210029264.4A CN202210029264A CN116466695A CN 116466695 A CN116466695 A CN 116466695A CN 202210029264 A CN202210029264 A CN 202210029264A CN 116466695 A CN116466695 A CN 116466695A
Authority
CN
China
Prior art keywords
laser
point
grid
map
preset
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
CN202210029264.4A
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 CN202210029264.4A priority Critical patent/CN116466695A/en
Publication of CN116466695A publication Critical patent/CN116466695A/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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

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 obstacle collision point searching method, which comprises the steps of searching grids meeting preset communication conditions in a preset map, marking the coordinates of the grids meeting the preset communication conditions as the coordinates of the optimal obstacle 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 optimal obstacle collision points; wherein, the grid meeting the preset connection condition is: and in the pre-configured map, the optimal neighborhood is communicated with a grid corresponding to the effective laser point with the number of pixels larger than a threshold value of the preset number of pixels and the minimum laser distance.

Description

Optimal obstacle collision point searching method
Technical Field
The invention relates to the technical field of laser navigation positioning, in particular to an optimal obstacle collision point searching method.
Background
When a cleaning robot with a laser navigation positioning function performs cleaning work, the cleaning robot performs cleaning work according to a rectangular frame area (generally an area of 4 meters by 4 meters) with the size of MxN; in the first 4 m by 4 m area preconfigured by the cleaning robot, the cleaning robot first needs to find a starting point for starting the edgewise travel in the 4 m by 4 m area, then starts the edgewise travel along the boundary of the 4 m by 4 m area from the starting point, and starts cleaning the 4 m by 4 m area along the boundary of the 4 m by 4 m area.
In the prior art, point cloud data acquired by a laser radar are converted into a grid map which can be used for navigation, and because the point cloud data for being converted into the grid map has noise and information marked by the grid map is unstable at the initial stage of construction, a cleaning robot can select a plurality of positions for starting to walk along the edge at the same time according to map information, and the detected obstacles at part of the positions are not corresponding to the obstacles in the actual moving scene of the robot, so that the navigation and positioning functions of the grid map constructed by the cleaning robot in real time are affected.
Disclosure of Invention
In order to solve the technical problems, the invention discloses an optimal obstacle collision point searching method for robot edge walking, which is used for searching collision points with reasonable navigation path length, belonging to continuous obstacles, as optimal obstacle collision points, so that the robot starts to walk along a wall when touching the optimal obstacle collision points, and is used as trigger position points for the robot to walk along the continuous obstacles on a traveling plane after starting to work. The specific technical scheme comprises the following steps:
the optimal obstacle collision point searching method 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 optimal obstacle collision points in the preset map, and determining that physical positions reflected by laser points corresponding to the grids meeting the preset communication conditions are optimal obstacle collision points; wherein, the grid meeting the preset connection condition is: and in the pre-configured map, the optimal neighborhood is communicated with a grid corresponding to the effective laser point with the number of pixels larger than a threshold value of the preset number of pixels and the minimum laser distance.
Further, the preset range of the grid corresponding to the effective laser point is covered to the grid corresponding to the effective laser point; wherein the optimal neighborhood connected pixel number of an effective laser point is the maximum value among the connected pixel numbers of all grids within a preset range of the grid corresponding to the effective laser point in a preset map; wherein the effective laser spot is a laser spot whose laser distance is associated with the size of the fuselage.
Further, the laser spot is a reflection position on the obstacle for characterizing laser light emitted by the laser sensor of the robot; the laser point is a laser frame which is acquired by the robot at present; continuous obstacles exist at the collision point of the optimal obstacle; 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 method for searching the grids meeting the preset connection condition in the preset map comprises the steps that each time all grids in a preset range of the grids corresponding to one effective laser point are searched, the effective laser point is marked as a first target laser point when the effective laser point with the optimal neighborhood connected pixel number being larger than a preset pixel number threshold value is detected; when all grids in a preset range of grids corresponding to each effective laser point are searched, marking the grid corresponding to the first target laser point with the smallest laser distance as the grid meeting the preset communication condition, marking the coordinate of the grid corresponding to the first target laser point as the coordinate of the optimal obstacle collision point in the preset map, and determining that the physical position of the first target laser point is the optimal obstacle collision point.
Further, after searching all grids in a preset range of grids corresponding to each effective laser point, if the grids with the number of connected pixels larger than a preset pixel number threshold cannot be searched in a preset map, determining that the grids meeting the preset connection condition cannot be searched in the preset map, searching the laser point with the minimum laser distance in the laser frame, marking the coordinates of the grid corresponding to the laser point as the coordinates of an optimal obstacle collision point in the preset map, and determining that the physical position of the laser point is the optimal obstacle collision point.
Further, the sources of the coordinates of the grid corresponding to the effective laser point include: and converting the effective laser point into a coordinate system of the pre-configuration map by converting the coordinate of the effective laser point into grid coordinates according to a preset ratio by taking a trigonometric function conversion result of the laser distance of the effective laser point as a coordinate offset.
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 effective laser point is a neighborhood grid range of the grid corresponding to the effective laser point, including the grid corresponding to the effective laser point.
Further, the preset range of the grid corresponding to the effective laser point is a four-adjacent area of the grid corresponding to the effective laser point, and the four-adjacent area comprises the grid corresponding to the effective laser point and the adjacent grids which are up, down, left and right and take the grid corresponding to the effective laser point as the center.
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 with a specific size; 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 connection 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 the connected domain in the preset map.
Further, the closing operation includes obtaining a binarized map after binarizing the pre-configured map; then, the image expansion processing is performed on the binary map, and then the image erosion processing is performed on the binary map after the image expansion processing, so that a part of pixels representing non-obstacles are configured as pixels representing obstacles.
Compared with the prior art, the method and the device have the advantages that the grids with connectivity and close range characteristics are searched in the preset range of the grids corresponding to the effective laser points in the preset map, the grids which meet the preset communication conditions are used as the grids, the coordinates of the grids which meet the preset communication conditions are marked as the coordinates of the optimal obstacle collision points, continuous obstacles required by edge walking are identified at the optimal obstacle collision points, the problems that noise or unstable map exists in the laser data (including the coordinates, the detection angle and the laser distance of the laser points) acquired in the prior art are overcome, and the robot is ensured to normally navigate in the first working area.
Drawings
Fig. 1 is a flowchart of an optimal obstacle collision point searching method according to an embodiment of the present invention.
Fig. 2 is a flowchart of a method of searching for a grid satisfying a preset connected condition according to 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 obstacle collision point provided by the embodiment of the invention can be executed by a laser point cloud data processing device, the laser point cloud data processing device can be realized by software and/or hardware and can be generally integrated in a laser navigation robot, the laser navigation robot can be used as an execution body of the method, a laser sensor can be arranged on the laser navigation robot and can detect an obstacle, data reflected by a surface of a body peripheral object of the robot, which is scanned by a laser beam emitted by the laser sensor, form point cloud data of the peripheral object, the body peripheral object can be identified as an obstacle and marked in a map, wherein the point cloud data comprises position information of the surface of the obstacle scanned by a laser beam of the laser sensor, namely, the longitudinal distance, the transverse offset and the detection angle of the scanned surface of the obstacle relative to the laser sensor, the point cloud can be regarded as a set of laser points, the laser points are divided by using laser frames when the map is constructed, and the laser frames are a set of 360-degree laser points, namely, one-frame cloud point cloud of the laser points are scanned. 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 newly 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, the laser points included 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 the SLAM technology, a pre-configured map can be built by the laser frames which are obtained in advance, and the pre-configured map is a map which is not processed by the optimal obstacle collision point searching method. 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, namely a working area which is configured by a related memory in the robot and allows the robot to traverse for the first time, and can be marked with the obstacle with the farthest distance in the room area where the robot is located, so that the robot can have 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. The preconfigured map is a rectangular area formed by grids according to preset line numbers and preset column numbers, the coordinates of each grid are the coordinates of a lower left corner of the grid, the coordinates of an upper left corner of the grid or the coordinates of a lower right corner of the grid, in some implementation scenes, the central position of the grid is used for representing the real geographic position of the scanned area, and the coordinates of each grid are represented by the coordinates of the central 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 one implementation 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 and 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, a robot is generally controlled to search for the nearest wall obstacle to start to perform edgewise walking, namely, the robot is controlled to perform edgewise walking along continuous obstacle boundaries (four walls in the same room, which are continuous and integrated and do not belong to isolated obstacles) within a certain area range, and only after the outline is finished, normal work can be started; 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. It should be added that the present invention regards the wall-leaning object as a wall, and the wall barrier includes the barrier which sticks to the wall, the barrier which sticks to the wall and distributes along the wall, the wall and the attached object.
Therefore, the invention needs to search out an optimal obstacle collision point, and also determine that the optimal obstacle collision point exists so as to facilitate the robot to navigate to the position where the robot collides with the obstacle collision point or the position where the robot collides with the obstacle collision point, and then the robot configures the position as a robot edge starting point before starting to move, so that the robot preferentially navigates to the robot edge starting point and contacts the optimal obstacle collision point on the machine body in order to start to enter the edge working mode; the robot in the invention navigates to touch the continuous obstacle at the collision point of the optimal obstacle, so that the robot can conveniently walk along the continuous obstacle on the running plane, and at the moment, after the robot starts working, the robot needs to collide with the continuous obstacle when walking along the boundary of the working area for the first time, and the robot is the continuous obstacle at the collision point of the optimal obstacle. The basic concept of the optimal obstacle collision point searching method comprises the following steps: the robot searches grids meeting preset communication conditions in the preset map, marks the coordinates of the grids meeting the preset communication conditions as coordinates of optimal obstacle collision points in the preset map, and determines that physical positions reflected by laser points corresponding to the grids meeting the preset communication conditions are optimal obstacle collision points, wherein the grids meeting the preset communication conditions are grids corresponding to effective laser points with the number of optimal neighborhood communication pixels being larger than a preset pixel number threshold value and the laser distance being minimum in the preset map. The coordinates of the laser points corresponding to the grids meeting the preset communication conditions are used as the coordinates of the optimal obstacle collision points in the actual physical environment, and the coordinates of the grids corresponding to the laser points are used as the coordinates of the optimal obstacle collision points in the preset map. 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 obstacle 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.
In this embodiment, among the laser points falling into the pre-configured map, the grid corresponding to the effective laser point is taken as a central grid (seed grid), the robot 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, and the number of connected pixels is used as the optimal neighbor connected pixels of the grid corresponding to the effective laser point, and further screens out the grid corresponding to the effective laser point with the optimal neighbor connected pixels being greater than the threshold value of the preset pixel number and the minimum laser distance, and the grid corresponding to the effective laser point with the optimal neighbor connected pixels being the minimum laser distance is used as the grid meeting the preset connected condition, so that the requirement on the size of the obstacle is reduced, and the position occupied by the obstacle corresponding to the nearest laser point is pursued instead, and the distribution density of the searched laser points is higher. It should be noted that, the grids within the preset range of the grids corresponding to each effective laser point are not necessarily located in the preset map, and the preset range of the grids corresponding to each effective laser point covers the grids corresponding to the effective laser point; the effective laser point is a laser point with a laser distance related to the size of the machine body, preferably, the laser distance is larger than the radius of the machine body of the robot (when the robot is a sweeping robot with a round shell), so that obstacles directly collided with the machine body of the robot are avoided being detected, and invalid laser points are reduced; of the laser points falling into the pre-configured map, the laser points having a laser distance greater than the radius of the robot body are all valid laser points. In this embodiment, the robot uses the feature of the number of connected pixels of the effective laser points to search for a grid meeting the requirement, so that an effective continuity barrier boundary can be searched in a relatively short range, interference of data information of the laser points reflected by isolated barriers at the short range is eliminated, and the phenomenon that contour line segments around a machine body are misjudged as walls is reduced. And searching the grids meeting the preset connection condition in the grid area with more densely distributed laser points (more searched effective laser points) in the map area with larger coverage.
In this embodiment, a preset range of a grid corresponding to an effective laser point covers the grid corresponding to the effective laser point, specifically, the preset range of the grid corresponding to the effective laser point is a neighborhood grid range of the grid corresponding to the effective laser point, including the grid corresponding to the effective laser point; in this embodiment, the configuration of the preset range for the effective laser point considers that the effective laser point or the grid corresponding to the effective laser point may have noise factors, and the grid corresponding to the 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 optimal neighborhood connected pixel number of an effective laser spot is the maximum value among the connected pixel numbers of all grids in the preset range of the grid corresponding to the effective laser spot and the overlapping area of the preset range of the grid corresponding to the effective laser spot and the preset map in the preset configuration map, and the grid with the maximum connected pixel number can be obtained by enumerating and comparing the connected pixel number of each grid in the preset range of the grid corresponding to the effective laser spot. Therefore, the interference effect of the straight line of non-continuous obstacles (isolated non-crossing protruding obstacles such as battens and columns) 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 short distance are improved, and the speed of the robot for starting to execute the edgewise walking is increased.
When the robot starts to walk along the edge of the area defined by the pre-configured map, the obstacle to which the optimal obstacle collision point belongs is the first obstacle along which the robot moves, at this time, the edge starting point of the robot is not the optimal obstacle collision point, but is a position point near the optimal obstacle collision point, which allows the robot to contact the obstacle to which the optimal obstacle collision point belongs, at this time, the robot can determine that the first navigation target position can contact the obstacle to which the optimal obstacle 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, the robot starts from any position in the room to find a wall obstacle (continuous obstacle), when detecting the wall or colliding with the wall, triggers the robot 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 contour line, 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 obstacle collision point, can be in the neighborhood of the grid corresponding to the optimal obstacle collision point or in a preset distance range of the optimal obstacle 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 on the advancing plane, 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 obstacle 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.
Step S2, searching grids meeting preset communication conditions in the preset map, and then entering step S3. 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. The map area range suitable for the grid meeting the preset connection condition is high in relevant laser point distribution density.
And S3, marking the coordinates of the grids meeting the preset communication conditions as the coordinates of the optimal obstacle collision points in the preset map, namely, the coordinates of the optimal obstacle collision points in the corresponding map coordinate system. After searching the grid meeting the preset communication condition in the preset map, the robot acquires the coordinates of the grid meeting the preset communication condition and is configured as the coordinates of the optimal obstacle 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 obstacle collision point in the actual physical environment (in the laser radar coordinate system).
It should be noted that, in the laser frame collected by the robot at present, the laser distances of different laser points are different, and the coordinates of the laser points are the coordinates of corresponding point cloud data 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.
In the method for searching the optimal obstacle collision point in the steps S1 to S3, the grids with connectivity and close range characteristics are searched in the preset range of the grids corresponding to the effective laser points in the pre-configured map, the grids which meet the preset connection conditions are used as the grids which meet the preset connection conditions, the coordinates of the grids which meet the preset connection conditions are marked as the coordinates of the optimal obstacle collision point, continuous obstacles required by the edgewise walking at the optimal obstacle collision point are identified, the problems that noise or unstable map exists in the laser data (including the coordinates, the detection angle and the laser distance of the laser points) acquired in the prior art are overcome, and the robot is ensured to normally navigate in the first working area.
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 obstacle collision point is a position occupied by a continuous obstacle, such as a boundary point of a wall body or a notch position; 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.
In some embodiments, one grid corresponds to one number of connected pixels, and in some embodiments, all grids in a preset range of the grid corresponding to one effective laser point may be mutually connected to form an independent connected domain, so that the number of connected pixels of all grids in the preset range of the grid corresponding to one 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 into the corresponding laser spot, and may fall into the laser spot only at the grid within the preset range.
As an embodiment, as shown in fig. 2, the method for searching the grid meeting the preset connection condition in the preset map includes:
step S201, each time all grids within a preset range of a grid corresponding to an effective laser point are searched, when an effective laser point with the number of optimal neighborhood connected pixels being greater than a preset pixel number threshold is detected, the effective laser point corresponding to the grid with the number of optimal neighborhood connected pixels being greater than the preset pixel number threshold is detected, and the effective laser point is marked as a first target laser point; and then proceeds to step S202.
Specifically, during the process of searching grids within a preset range of the grids corresponding to an 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 effective laser point, and marks the 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 effective laser point is the four adjacent regions of the grid corresponding to the effective laser point, so that invalid laser data in a relatively near region can be filtered; the optimal neighborhood connected pixels of a laser spot can reflect the size characteristics of an obstacle where the laser spot is located, when the larger the obstacle to be searched is, the longer the boundary of the continuity of the obstacle is, the larger the corresponding optimal neighborhood connected pixels are, 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 S201, after searching the grid with the largest number of connected pixels in the preset range of the grid corresponding to the effective laser point, if the number of connected pixels of the grid is determined to be greater than the preset pixel number threshold, the effective laser point is marked as the first target laser point, the number of connected pixels of the grid is marked as the optimal neighborhood connected pixels corresponding to the first target laser point, the laser distance of the effective laser point is marked as the laser distance of the first target laser point, and meanwhile, the laser distance of the first target laser point is recorded, so that the comparison is 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 a shorter distance is realized.
Step S202, when all grids within the preset range of the grid corresponding to each effective laser point are searched, marking the grid corresponding to the first target laser point with the smallest laser distance as a grid meeting the preset communication condition, marking the coordinate of the grid corresponding to the first target laser point as the coordinate of the optimal obstacle collision point in the preset map, determining that the physical position of the first target laser point is the optimal obstacle collision point, determining that the continuous obstacle exists at the grid corresponding to the first target laser point, for example, identifying the boundary point of the wall closest to the robot, and then the robot can spend a shorter distance to navigate to the optimal obstacle collision point, and then start to walk along the continuous obstacle.
In this embodiment, after the robot successively completes comparison of the laser distances of the first target laser points within the preset range of the grids corresponding to each effective laser point, the first target laser point with the minimum laser distance is obtained, and as for 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 minimum laser distance is obtained, and the first target laser point with the minimum laser distance is obtained.
Preferably, after searching all grids in a preset range of grids corresponding to each effective laser point, if no grids with the number of connected pixels larger than a preset pixel number threshold value are searched in a preset map, determining that the grids meeting the preset connection condition cannot be searched in the preset map, searching the grids corresponding to all laser points in the laser frame, which are currently collected, for the laser point with the minimum laser distance, marking the coordinates of the grids corresponding to the laser point as the coordinates of the optimal obstacle collision point in the preset map, determining that the physical position of the laser point is the optimal obstacle collision point, and determining that the continuous obstacle exists at the grid corresponding to the laser point. Specifically, 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, obtains the laser point with the minimum laser distance from the laser points, marks the laser point with the minimum laser distance as an optimal obstacle collision point, marks the coordinates of the grid corresponding to the laser point with the minimum laser distance as the coordinates of the grid corresponding to the optimal obstacle collision point, and therefore the robot can obtain the optimal obstacle collision point at the nearest wall surface on the premise of not judging the connected grids.
In summary, the invention can acquire the optimal obstacle 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 of the laser points) 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 obstacle collision point, also reduces the probability of selecting the position of the obstacle which does not exist in the actual physical environment as the optimal obstacle collision point, and starts the edgewise walking after the robot spends the shortest path distance to contact the obstacle at the optimal obstacle collision point, specifically walks along the outline edge of the contacted obstacle, the advancing direction of the robot is kept parallel to the outline of the obstacle, and the edgewise walking efficiency of the robot is improved.
As an embodiment, the sources of the coordinates of the grid corresponding to the effective laser point include: in the pre-configured map, taking the trigonometric function conversion result of the laser distance of the effective 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 effective laser spot, the horizontal axis coordinate offset is obtained by adding a cosine function value of the laser distance of the effective laser spot to a reference horizontal axis; the ordinate offset is obtained by adding a sine function value of the laser distance of the effective laser point to a reference ordinate; the laser distance of the effective laser point is converted into coordinates. Then, controlling the effective 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 effective 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 effective laser points subjected to coordinate offset into grid coordinates according to a preset ratio, wherein the grid coordinates are in an integer form, so that the effective laser points are converted into a coordinate system of the preset map, and further the rasterization of the effective laser points in a unified coordinate system is realized, 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, and when the positive directions of the abscissa axes of the two coordinate systems before and after conversion are the same, the abscissa of the effective laser spot in the laser radar coordinate system is controlled to subtract the abscissa offset, so that the abscissa of the effective laser spot after coordinate offset is obtained; otherwise, the abscissa of the effective laser spot in the laser radar coordinate system is subtracted from the control abscissa coordinate offset to obtain the abscissa of the effective laser spot 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, when the positive directions of the ordinate axes of the two coordinate systems before and after conversion are the same, the ordinate of the effective laser spot in the laser radar coordinate system is controlled to subtract the ordinate offset of the ordinate axis, and the ordinate of the effective laser spot subjected to the coordinate offset is obtained; otherwise, the ordinate of the effective laser spot in the laser radar coordinate system is subtracted from the ordinate coordinate offset to obtain the ordinate of the effective laser spot 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 to 360 degrees, so that 360 laser points are obtained in a laser frame, 360 different laser distances are respectively corresponding to the 360 laser points, when the unit detection angle is 1 degree, 360 sector areas are divided, each laser point in the laser frame falls into one sector area respectively, and the laser distance of the laser point in each sector area is different for the laser frame.
In the foregoing embodiment, the preset range of the grid corresponding to the effective laser point is a neighborhood grid range of the grid corresponding to the effective laser point, including the grid corresponding to the effective laser point. The neighborhood grid range of the grid corresponding to the effective laser point includes, but is not limited to, 4 neighborhood, 8 neighborhood or 12 neighborhood of the grid with the grid corresponding to the effective laser point as a center. In this embodiment, the preset range is set by taking noise factors existing in the collected effective 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 effective 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, continuous obstacles are easier to search in the expanded grid area, which is also a result of area connectivity consideration.
Preferably, the preset range of the grid corresponding to the effective laser point is a four-neighborhood region of the grid corresponding to the effective laser point, including a grid corresponding to the effective laser point and adjacent grids around the grid corresponding to the effective laser point, and the number of searched grids is smaller relative to a grid region or a circle region of an eight-neighborhood region, 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 the pixel points as grids, configures one pixel point as a unit grid of 5 cm by 5 cm, and one laser point corresponds to one map grid, but one map 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.
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 takes pixel points as unit constituent elements, each pixel point can be regarded as a grid (unit grid with the specific size), and the coordinates of each pixel point and the coordinates of the corresponding grid are support conversion (in a rotary and translational conversion mode) and can represent the map coordinates of the laser spot; 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 as the optimal neighborhood connected pixels of the 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 clutter on the map can be effectively filtered, and the calculated edge starting point is prevented from actually having no obstacle; in summary, the robot can obtain an optimal edge starting point, namely the optimal obstacle collision point, according to the communication condition of the laser points in the laser frame in the corresponding grids in the pre-configuration map; when a relatively large obstacle is found and the laser distance is the smallest, such as a wall with a relatively close distance, an optimal edge starting 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. The accuracy of the map information acquired in the step S1 and the grid information participating in the judgment in the step S2, 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 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 (13)

1. An optimal obstacle collision point search method, characterized in that the optimal obstacle collision point search method comprises:
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 obstacle collision points in the preset map, and determining that physical positions reflected by laser points corresponding to the grids meeting the preset communication conditions are optimal obstacle collision points;
Wherein, the grid meeting the preset connection condition is: and in the pre-configured map, the optimal neighborhood is communicated with a grid corresponding to the effective laser point with the number of pixels larger than a threshold value of the preset number of pixels and the minimum laser distance.
2. The method for searching for an optimal obstacle collision point according to claim 1, wherein the preset ranges of the grids corresponding to an effective laser point are all covered to the grids corresponding to the effective laser point;
wherein the optimal neighborhood connected pixel number of an effective laser point is the maximum value among the connected pixel numbers of all grids within a preset range of the grid corresponding to the effective laser point in a preset map;
wherein the effective laser spot is a laser spot whose laser distance is associated with the size of the fuselage.
3. The optimal obstacle collision point searching method according to claim 2, wherein the laser point is a reflection position of laser light emitted from a laser sensor for characterizing the robot on the obstacle; the laser point is a laser frame which is acquired by the robot at present; continuous obstacles exist at the collision point of the optimal obstacle;
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.
4. The optimal obstacle collision point searching method according to claim 3, wherein the searching for a grid satisfying a preset connection condition in the preset map comprises:
each time all grids in a preset range of grids corresponding to one effective laser point are searched, when the effective laser points with the number of the optimal neighborhood connected pixels being larger than a preset pixel number threshold value are detected, the effective laser points are marked as first target laser points;
when all grids in a preset range of grids corresponding to each effective laser point are searched, marking the grid corresponding to the first target laser point with the smallest laser distance as the grid meeting the preset communication condition, marking the coordinate of the grid corresponding to the first target laser point as the coordinate of the optimal obstacle collision point in the preset map, and determining that the physical position of the first target laser point is the optimal obstacle collision point.
5. The method for searching for the optimal obstacle collision point according to claim 4, wherein after searching for all grids within a preset range of grids corresponding to each effective laser point, if no grid with the number of connected pixels larger than a preset pixel number threshold is searched for in the preset map, determining that the grid meeting the preset connection condition is not searched for in the preset map, searching for the laser point with the minimum laser distance in the laser frame, marking the coordinate of the grid corresponding to the laser point as the coordinate of the optimal obstacle collision point in the preset map, and determining that the physical position of the laser point is the optimal obstacle collision point.
6. The method for searching for an optimal obstacle collision point according to claim 4, wherein the sources of coordinates of the grid corresponding to the effective laser point include: and converting the effective laser point into a coordinate system of the pre-configuration map by converting the coordinate of the effective laser point into grid coordinates according to a preset ratio by taking a trigonometric function conversion result of the laser distance of the effective laser point as a coordinate offset.
7. The method for searching for an optimal obstacle collision point according to claim 6, wherein the effective detection angle range of the laser sensor is 0 degrees to 360 degrees, and 360 laser points exist in a laser frame, which correspond 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.
8. The method for searching for an optimal obstacle collision point according to claim 5, wherein the preset range of the grid corresponding to the effective laser point is a neighborhood grid range of the grid corresponding to the effective laser point, including the grid corresponding to the effective laser point.
9. The method for searching for an optimal obstacle collision point according to claim 8, wherein the preset range of the grid corresponding to the effective laser point is a four-adjacent region of the grid corresponding to the effective laser point, and includes a grid corresponding to the effective laser point and adjacent grids on the upper, lower, left and right sides centered on the grid corresponding to the effective laser point.
10. The optimal obstacle collision point searching method according to claim 5, 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 with a specific size;
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.
11. The optimal obstacle collision point search method according to claim 10, 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.
12. The method for searching for an optimal obstacle collision point according to claim 11, wherein a closing operation is performed on the pre-configured map before a grid satisfying a preset connection condition is searched for in the pre-configured map, so that the contour lines of the obstacles marked in the pre-configured map are completely described, wherein the closing operation is used for connecting the connected domains in the pre-configured map.
13. The optimal obstacle collision point search method according to claim 12, wherein the closing operation comprises:
after the preset map is subjected to binarization processing, a binarization map is obtained; then, the image expansion processing is performed on the binary map, and then the image erosion processing is performed on the binary map after the image expansion processing, so that a part of pixels representing non-obstacles are configured as pixels representing obstacles.
CN202210029264.4A 2022-01-12 2022-01-12 Optimal obstacle collision point searching method Pending CN116466695A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210029264.4A CN116466695A (en) 2022-01-12 2022-01-12 Optimal obstacle collision point searching method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210029264.4A CN116466695A (en) 2022-01-12 2022-01-12 Optimal obstacle collision point searching method

Publications (1)

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

Family

ID=87175842

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210029264.4A Pending CN116466695A (en) 2022-01-12 2022-01-12 Optimal obstacle collision point searching method

Country Status (1)

Country Link
CN (1) CN116466695A (en)

Similar Documents

Publication Publication Date Title
CN111830970B (en) Regional cleaning planning method for robot walking along edge, chip and robot
EP3985469A1 (en) Cleaning subarea planning method for robot walking along edge, chip and robot
JP4450532B2 (en) Relative position measuring device
CN112464812B (en) Vehicle-based concave obstacle detection method
CN113741438A (en) Path planning method and device, storage medium, chip and robot
CN112445212A (en) Path planning method, system, robot and readable storage medium
CN111680673A (en) Method, device and equipment for detecting dynamic object in grid map
CN111640323A (en) Road condition information acquisition method
CN113110497A (en) Navigation path-based edge obstacle-detouring path selection method, chip and robot
CN111505652A (en) Map establishing method, device and operation equipment
CN115223039A (en) Robot semi-autonomous control method and system for complex environment
CN111240322B (en) Method for determining working starting point of robot movement limiting frame and motion control method
CN116466695A (en) Optimal obstacle collision point searching method
CN116466694A (en) Optimal collision point searching method based on laser points, chip and robot
CN116465404A (en) Optimal collision point searching method based on preset detection distance range
CN117193277A (en) Setting method based on map area outline and robot edge finishing control method
CN114529539A (en) Method and device for detecting road surface obstacle of unmanned equipment, unmanned equipment and storage medium
CN114299392A (en) Mobile robot and threshold identification method, device and storage medium thereof
CN112045654A (en) Detection method and device for unmanned closed space and robot
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
CN116069010A (en) Robot suspension judging method based on laser points, map updating method and chip
CN117814687A (en) Cleaning method of cleaning robot and cleaning robot
Yang et al. Mobile robot autonomous navigation and dynamic environmental adaptation in large-scale outdoor scenes

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