CN117213463A - Grid map updating method, device and storage medium based on point cloud detection - Google Patents

Grid map updating method, device and storage medium based on point cloud detection Download PDF

Info

Publication number
CN117213463A
CN117213463A CN202311021590.1A CN202311021590A CN117213463A CN 117213463 A CN117213463 A CN 117213463A CN 202311021590 A CN202311021590 A CN 202311021590A CN 117213463 A CN117213463 A CN 117213463A
Authority
CN
China
Prior art keywords
target
grid
detection area
current
obstacle
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
CN202311021590.1A
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.)
Hangzhou Huacheng Software Technology Co Ltd
Original Assignee
Hangzhou Huacheng Software Technology 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 Hangzhou Huacheng Software Technology Co Ltd filed Critical Hangzhou Huacheng Software Technology Co Ltd
Priority to CN202311021590.1A priority Critical patent/CN117213463A/en
Publication of CN117213463A publication Critical patent/CN117213463A/en
Pending legal-status Critical Current

Links

Abstract

The application discloses a grid map updating method, equipment and storage medium based on point cloud detection, wherein the grid map updating method based on the point cloud detection comprises the following steps: acquiring current obstacle information in a target detection area at a current detection moment, wherein the current obstacle information comprises the number of current obstacles; updating the target obstacle information of the target detection area at the previous detection moment according to the current obstacle quantity of the target detection area at the current detection moment and the target obstacle information of the target detection area at the previous detection moment, so as to obtain the target obstacle information of the target detection area at the current detection moment; projecting point cloud data of an obstacle in target obstacle information of a target detection area at the current detection moment to a target grid map to obtain a projected target grid map; and carrying out state updating processing on each grid according to the grid value of each grid in the projected target grid map. According to the scheme, the grid map can be updated.

Description

Grid map updating method, device and storage medium based on point cloud detection
Technical Field
The present application relates to the field of robotics, and in particular, to a map method, apparatus, and storage medium based on point cloud detection.
Background
At present, a map is an important research content of autonomous navigation of a robot, and the robot can complete the functions of navigation, obstacle avoidance and partition work through the map. The existing robot generally utilizes fusion of a plurality of sensors such as a laser radar, a collision sensor, a camera and the like to realize perception of surrounding environment, so that the visual field range of the robot is enlarged, and the accuracy of obstacle detection is improved.
However, in the use environment of the robot, there may be static obstacles, dynamic obstacles, semi-static obstacles and the like in the moving area of the robot, and the positions of the dynamic obstacles and the semi-static obstacles are changed, so that the positions of the obstacles mapped to the grid map are also transformed in real time, and larger interference can be generated on map information, which is not beneficial to the robot to avoid the obstacle accurately in the moving process.
Disclosure of Invention
The application provides a grid map updating method, device and equipment based on point cloud detection and a computer readable storage medium.
The first aspect of the application provides a grid map updating method based on point cloud detection, which comprises the following steps: acquiring current obstacle information in a target detection area at a current detection moment, wherein the current obstacle information comprises the number of current obstacles; updating the target obstacle information of the target detection area at the previous detection time according to the current obstacle quantity of the target detection area at the current detection time and the target obstacle information of the target detection area at the previous detection time to obtain the target obstacle information of the target detection area at the current detection time, wherein the current detection time of the target detection area is later than the previous detection time of the target detection area; projecting point cloud data of an obstacle in the target obstacle information of the target detection area at the current detection moment to a target grid map to obtain a projected target grid map, wherein the target grid map is constructed based on the point cloud data of the obstacle in the target detection area at the current detection moment; and carrying out state updating processing on each grid according to the grid value of each grid in the projected target grid map.
In an embodiment, the step of projecting the point cloud data of the obstacle in the target obstacle information of the target detection area at the current detection time to the target grid map to obtain the projected target grid map includes: acquiring point cloud data of a target obstacle of the target detection area at the current detection moment, wherein the point cloud data comprises a centroid point and a corner point; projecting the point cloud data into the target grid map to obtain the projected target grid map, wherein the projected target grid map comprises grids corresponding to the point cloud data, and the grids comprise centroid point grids where centroid points are located; and carrying out assignment processing on each grid based on the grid value of the centroid point grid and the distance from the centroid point to each corner point to obtain an assigned grid, wherein the assigned grid comprises the grid value.
In an embodiment, the step of performing a status update process on each grid according to the grid value of each grid in the projected target grid map includes: comparing the assigned grid value of the grid with a preset threshold value to obtain a comparison result; and updating the grid state of the assigned grid based on the comparison result.
In an embodiment, the step of updating the grid state of the assigned grid based on the comparison result includes: setting a grid with the grid value larger than or equal to the preset threshold value in the projected target grid map as an occupied state, wherein the occupied state is used for representing the existence of the obstacle in the grid; and setting a grid with the grid value smaller than the preset threshold value in the projected target grid map as an idle state, wherein the idle state is used for representing that the barrier does not exist in the grid.
In an embodiment, the step of updating the target obstacle information of the target detection area at the previous detection time according to the current obstacle number of the target detection area at the current detection time and the target obstacle information of the target detection area at the previous detection time to obtain the target obstacle information of the target detection area at the current detection time includes: and if the number of the current barriers of the target detection area in the current detection time is zero and the number of the target barriers of the target detection area in the previous detection time is not zero, deleting the target barriers of the target detection area in the previous detection time to obtain target barrier information of the target detection area in the current detection time.
In an embodiment, the step of updating the target obstacle information of the target detection area at the previous detection time according to the current obstacle number of the target detection area at the current detection time and the target obstacle information of the target detection area at the previous detection time to obtain the target obstacle information of the target detection area at the current detection time includes: if the number of the current obstacles in the target detection area at the current detection time is not zero and the number of the target obstacles in the target detection area at the previous detection time is not zero, calculating the distance and the overlapping degree between the current obstacles and the target obstacles in the target detection area at the previous detection time based on the point cloud data of the current obstacles and the point cloud data of the target obstacles in the target detection area at the previous detection time; and if the distance and the overlapping degree are respectively in a corresponding preset distance threshold range and an overlapping degree threshold range, updating the target obstacle information of the target detection area at the previous detection moment based on the point cloud data of the current obstacle and the point cloud data of the target obstacle of the target detection area at the previous detection moment, and obtaining the target obstacle information of the target detection area at the current detection moment.
In an embodiment, after the step of calculating the distance and the degree of overlap between the current obstacle and the target obstacle of the target detection area in the previous detection time based on the point cloud data of the current obstacle and the point cloud data of the target obstacle of the target detection area in the previous detection time, the method further includes: if the distance is within the distance threshold range and the overlapping degree is not within the overlapping degree threshold range, updating the target obstacle information of the target detection area at the previous detection time based on the current obstacle information of the target detection area at the current detection time, and obtaining the target obstacle information of the target detection area at the current detection time; and if the distance is not in the distance threshold range, deleting the target obstacle information of the target detection area at the previous detection time to obtain the target obstacle information of the target detection area at the current detection time.
In an embodiment, the step of projecting the point cloud data of the obstacle in the target obstacle information of the target detection area at the current detection time to the target grid map to obtain the projected target grid map includes: projecting the point cloud data of the target obstacle of the target detection area at the current detection moment into the grid map to obtain the number of point clouds in each grid of the projected target grid map; and determining the grid value of the grid in the projected target grid map based on the number of the point clouds in each grid.
The second aspect of the present application provides a grid map updating device based on point cloud detection, comprising: the device comprises an acquisition module, a detection module and a detection module, wherein the acquisition module is used for acquiring current barrier information in a target detection area at the current detection moment, and the current barrier information comprises the number of current barriers; a first updating module, configured to update target obstacle information of the target detection area at a previous detection time according to a current obstacle number of the target detection area at the current detection time and target obstacle information of the target detection area at a previous detection time, to obtain target obstacle information of the target detection area at the current detection time, where the current detection time of the target detection area is later than the previous detection time of the target detection area; the projection module is used for projecting the point cloud data of the obstacle in the target obstacle information of the target detection area at the current detection moment to a target grid map to obtain a projected target grid map, and the target grid map is constructed based on the point cloud data of the obstacle in the target detection area at the current detection moment; and the second updating module is used for carrying out state updating processing on each grid according to the grid value of each grid in the projected target grid map.
A third aspect of the present application provides an electronic device, including a memory and a processor, where the processor is configured to execute program instructions stored in the memory, so as to implement the above-mentioned grid map updating method based on point cloud detection.
A fourth aspect of the present application provides a computer readable storage medium having stored thereon program instructions which, when executed by a processor, implement the above-described grid map updating method based on point cloud detection.
According to the scheme, whether the current obstacle information in the target detection area at the current detection moment is changed or not is judged by acquiring the current obstacle information of the target detection area at the current detection moment and the target obstacle information of the target detection moment before the current detection moment, so that the target obstacle information of the target detection area at the current detection moment is updated; the point cloud data of the obstacle of the target detection area at the current detection moment is projected to a preset grid map, and the grid is subjected to state update processing based on the grid value of each grid in the projected grid map, so that the accuracy and instantaneity of the map can be improved through the two update processes, and the update of the grid map is realized.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
FIG. 1 is a flow diagram of an exemplary embodiment of a point cloud detection based grid map update method of the present application;
FIG. 2 is a schematic diagram of an exemplary application scenario in a grid map updating method based on point cloud detection according to the present application;
FIG. 3 is a block diagram of a grid map updating apparatus based on point cloud detection, as shown in an exemplary embodiment of the present application;
FIG. 4 is a schematic diagram of an embodiment of an electronic device of the present application;
FIG. 5 is a schematic diagram of an embodiment of a computer readable storage medium of the present application.
Detailed Description
The following describes embodiments of the present application in detail with reference to the drawings.
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, interfaces, techniques, etc., in order to provide a thorough understanding of the present application.
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship. Further, "a plurality" herein means two or more than two. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Referring to fig. 1, fig. 1 is a flowchart illustrating an exemplary embodiment of a grid map updating method based on point cloud detection according to the present application. Specifically, the method may include the steps of:
step S110, current obstacle information in the target detection area at the current detection time is acquired, where the current obstacle information includes the current number of obstacles.
The current detection time refers to the time when the robot performs real-time detection, and the current obstacle information refers to obstacle information detected by the robot in real time, including but not limited to point cloud data of obstacles, the number of obstacles, and the like.
The target detection area is determined by an effective view angle range of the robot in a real-time detection process, and as shown in fig. 2, fig. 2 is an exemplary application scene schematic diagram in the grid map updating method based on point cloud detection, wherein the real-time pose of the robot at the current detection moment is taken as a vertex O, and a sector area AOB is generated based on the effective view angle range of a sensor arranged on the robot, namely the target detection area.
It should be noted that, in the robot technical field, in particular, in robot navigation, a grid map is often used to perform path planning, navigation, and the like, so that a grid with a resolution consistent with that of a global grid map (AOB) is filled in the sector area AOB (target detection area), and a local grid map corresponding to the sector area AOB can be obtained, where the global grid map refers to a map of a movable area of the robot, and may also be referred to as a global map, and the global grid map may be acquired from a storage medium of the robot itself, or may be acquired from a base station end or a cloud server end, which is not limited herein, and it is to be understood that the movable area of the robot is generally larger than the target detection area, that is, an area represented by the global grid map generally includes an area represented by a local grid map, and that the global grid map and the local grid map may be one grid map, that is, all areas in the grid map represented by the global grid map, and a partial area in the grid map represented by the local grid map; the global grid map and the local grid map may be two grid maps, that is, the local grid map is a grid map of a partial area extracted from the global grid map, which is not limited herein, but is hereinafter collectively referred to as a grid map unless otherwise specified.
Further, in the process of detecting the robot in real time, the environment information in the current view angle range is acquired through a sensor (such as an optical sensor and/or a radar sensor) arranged on the robot, and the environment information acquired based on the current view angle range is matched with the environment information in the global map so as to determine the pose information and the target detection area of the robot in the global map.
Specifically, acquiring point cloud data in a target detection area AOB, and then preprocessing the point cloud data in the target detection area AOB (such as ROI (region of interest) area extraction, downsampling, point cloud segmentation and the like) to acquire obstacle point clouds in the target detection area AOB, namely current obstacle information in the target detection area at the current detection moment; creating a directed bounding box (Oriented Bounding Box, OBB) based on the obstacle point cloud, and obtaining coordinates of four corner points at the bottom of the bounding box and coordinates of geometric centroids of the obstacle point cloud (or other points capable of representing the obstacle point cloud); in addition, interference point cloud data such as wall point clouds in the target detection area AOB can be filtered, namely, the wall is not used as an obstacle, and the obstacle point clouds in a certain size range are subjected to subsequent processing.
The method can ensure the quality of the point cloud and simultaneously reduce the quantity of the point cloud by the pretreatment operations such as ROI region extraction, voxel downsampling and the like, thereby improving the algorithm efficiency and ensuring the instantaneity; by acquiring the corner coordinates and the centroid coordinates of the bounding box of the obstacle to replace the outline of the obstacle, the space consumed by storing the obstacle point cloud can be reduced, and the efficiency is improved in one step.
Step S120, updating the target obstacle information of the target detection area at the previous detection time according to the current obstacle number of the target detection area at the current detection time and the target obstacle information of the target detection area at the previous detection time, so as to obtain the target obstacle information of the target detection area at the current detection time, wherein the current detection time of the target detection area is later than the previous detection time of the target detection area.
The current obstacle information of the target detection area in the current detection time refers to the obstacle information obtained by the robot in the current detection time, the target obstacle information of the target detection area in the previous detection time refers to the obstacle information obtained by the robot in the time before the current detection time (the previous detection time), and the obstacle information obtained in the previous detection time is stored in a normal case.
For example, a centroid_list of obstacle substance is preset, in which centroid points of the obstacle detected by the robot before the current detection time are stored, each centroid point corresponds to four corner points of the obstacle bounding box, that is, an obstacle is represented by a centroid point and four corner points, that is, the number of centroid points corresponds to the number of obstacles, wherein the centroid coordinates of the centroid points of the detected obstacle can be stored by serial numbers, such as { obj } 1 ,obj 2 ,obj 3 ,…,obj i The centroid coordinates can be coordinates under a global coordinate system, and centroid points in the centroid list, which are positioned in the target detection area AOB, are marked as a temporary centroid set temp_centroid_list; by matching the environmental information (the environmental information in the target detection area AOB) acquired based on the current view angle range with the environmental information in the global map, a temporary centroid set corresponding to the target detection area can be acquired from an obstacle centroid list corresponding to the global map, or a temporary centroid set corresponding to the target detection area can be acquired from an obstacle centroid list corresponding to the global map based on pose information of the robot, so that target obstacle information of the target detection area in the previous detection moment is obtained.
Further, whether or not an obstacle of the target detection area in the current detection time is changed is judged based on the current obstacle number of the target detection area in the current detection time and the target obstacle number (temporary centroid set) of the target detection area in the previous detection time; if the detection area is changed, updating the target obstacle information (temporary centroid set) and a centroid list of the target detection area at the previous detection moment to obtain the target obstacle information (updated temporary centroid set) and an updated centroid list of the target detection area at the current detection moment; if the detection area is unchanged, the temporary centroid set and the centroid list can be continuously referred to, namely, the target obstacle information of the target detection area at the previous detection moment is used as the target obstacle information of the target detection area at the current detection moment.
Step S130, projecting point cloud data of the obstacle in the target obstacle information of the target detection area at the current detection moment to a target grid map to obtain a projected target grid map, wherein the target grid map is constructed based on the target point cloud data of the obstacle in the target detection area at the current detection moment.
Wherein the target grid map refers to a part of the grid map determined by the target point cloud data of the obstacle in the global grid map or the local grid map of the foregoing embodiment.
As exemplarily described in connection with the foregoing embodiment, after the point cloud data of the obstacle in the target obstacle information of the target detection area at the current detection time is acquired, the area surrounded by the point cloud data (target point cloud data) of the four corner points of the obstacle bounding box in the global grid map or the local grid map is determined as the target grid map box area And projects the point cloud data of the obstacle to the target grid map box area Obtaining a projected target grid map; based on projection onto box area Point cloud data pairs box in each grid area And assigning values to the grids to obtain grid values of the grids.
Step S140, performing a status update process on each grid according to the grid value of each grid in the projected target grid map.
The grid states include an occupied state to indicate the presence of an obstacle in the grid and an idle state to indicate the absence of an obstacle in the grid.
Specifically, in projecting point cloud data of an obstacle to a target grid map box area After that, the coordinate information of the point cloud data projected on the target grid map represents the distribution condition of the point cloud data of the obstacle projected on the target grid map, which is equivalent to the projected target grid In the grid map, the more concentrated the point cloud data are, the higher the grid value of the grid is, which means that the space area corresponding to the grid is provided with barriers, namely the grid is in an occupied state, otherwise, the grid is in an idle state, and the grid state of each grid is updated to obtain an updated map.
It can be seen that whether the current obstacle information in the target detection area at the current detection moment is changed or not is judged by acquiring the current obstacle information of the target detection area at the current detection moment and the target obstacle information of the previous detection moment, so that the target obstacle information of the target detection area at the current detection moment is updated; the point cloud data of the obstacle of the target detection area at the current detection moment is projected to a preset grid map, and the grid is subjected to state update processing based on the grid value of each grid in the projected grid map, so that the accuracy and instantaneity of the map can be improved through the two update processes, and the update of the grid map is realized.
On the basis of the above embodiment, the step of projecting the point cloud data of the obstacle in the target obstacle information of the target detection area at the current detection time to the target grid map to obtain the projected target grid map is described in the embodiment of the present application, wherein the target grid map is constructed based on the point cloud data of the obstacle in the target detection area at the current detection time. Specifically, the method of the embodiment comprises the following steps:
Step S210, obtaining point cloud data of a target obstacle of a target detection area at the current detection moment, wherein the point cloud data comprises a centroid point and a corner point.
The foregoing description of the embodiments is provided with centroid points determined based on geometric centroids of obstacle point clouds, and corner points obtained by performing OBB bounding box calculation based on obstacle point cloud data.
Step S220, the point cloud data are projected to a target grid map to obtain a projected target grid map, the projected target grid map comprises grids corresponding to the point cloud data, and the grids comprise centroid point grids where centroid points are located.
Specifically, the region surrounded by four corner points on the global grid map or the local grid map is a target grid map box area Projecting obstacle point cloud data to a box area And obtaining grids corresponding to the cloud data of each point in the projected target grid map, wherein each grid comprises a centroid point grid (central grid) corresponding to a centroid point and a corner point grid corresponding to each corner point.
And step S230, performing assignment processing on each grid based on the grid value of the centroid point grid and the distance from the centroid point to each corner point to obtain an assigned grid, wherein the assigned grid comprises the grid value.
Specifically, the centroid point is acquired at the box area Coordinate information (x) cen ,y cen ) Setting centroid point grid cen The grid value of (2) is P max Other grids can impart a minimum value P min Calculating average Euclidean distance dis from centroid point to four corner points ave And carrying out assignment processing on each grid based on the average Euclidean distance and the grid value of the centroid point grid, wherein the mathematical expression of the assignment process is as follows:
wherein, the ith grid i The grid value is assigned as grid value_i The coordinate information is (x) i ,y i )。
It can be seen that, in this embodiment, four corner coordinates and centroid coordinates of the bottom of the bounding box are obtained based on the bounding box enclosed by the obstacle point cloud data, so as to represent the outline of the obstacle, and the grid where the centroid point projection is located is taken as a central grid, and the grid where the four corner points are located is taken as a corner grid; calculating the average distance between the center grid and the four corner grids, performing decreasing assignment on each grid according to the distance between each grid and the center grid to obtain the grid value of each grid, so that the grid value is conveniently compared with a preset threshold value subsequently, and updating the grid state of each grid based on the comparison result to finish updating the grid map.
On the basis of the above embodiments, the embodiments of the present application describe a procedure of performing a status update process for each grid based on the grid value of each grid in the target grid map after projection. Specifically, the method of the embodiment comprises the following steps:
Comparing the assigned grid value of the grid with a preset threshold value to obtain a comparison result; and updating the grid state of the assigned grid based on the comparison result.
The foregoing embodiments are described with reference to examples in which the predetermined threshold may beOr other values, not limited herein, to +.>For the purposes of illustration, if->Setting the grid to an occupied state; if it isThe grid is set to an idle state.
It should be noted that, in some situations, the bounding box determined by the obstacle point cloud is not in a regular shape like a rectangle, and thus, the area enclosed by the four obtained corner points is also not in a regular shape, so that the distance from each grid to the centroid point grid exceeds the average distance dis in the above embodiment ave Setting the grid value of the grid of (2) to P min
On the basis of the above embodiment, the embodiment of the present application describes a step of updating the grid state of the assigned grid based on the comparison result. Specifically, the method of the embodiment comprises the following steps:
setting a grid with a grid value larger than or equal to a preset threshold value in the projected target grid map as an occupied state, wherein the occupied state is used for representing that an obstacle exists in the grid; and setting a grid with a grid value smaller than a preset threshold value in the projected target grid map as an idle state, wherein the idle state is used for representing that no obstacle exists in the grid.
The specific description of the present embodiment may refer to the description of the foregoing embodiment, and will not be repeated herein.
On the basis of the above embodiment, the step of updating the target obstacle information of the target detection area at the previous detection time according to the current obstacle number of the target detection area at the current detection time and the target obstacle information of the target detection area at the previous detection time to obtain the target obstacle information of the target detection area at the current detection time is described in the embodiment of the present application. Specifically, the method of the embodiment comprises the following steps:
if the number of the current barriers of the target detection area in the current detection time is zero and the number of the target barriers of the target detection area in the previous detection time is not zero, deleting the target barriers of the target detection area in the previous detection time to obtain target barrier information of the target detection area in the current detection time.
In connection with the foregoing embodiment, if the number of current obstacles in the target detection area at the current detection time is zero and the number of target obstacles in the target detection area at the previous detection time is not zero, it is determined that the target obstacle detected in the target detection area at the previous detection time may have moved so that the number of current obstacles detected in the target detection area at the current detection time is zero, and therefore, the deletion process is performed on the target obstacle in the target detection area at the previous detection time to update the target obstacle information in the target detection area at the previous detection time, and the target obstacle information of the target detection area at the current detection time is obtained.
Illustratively, if the number of the detected obstacles in the target detection area AOB at the current detection time is 0, determining whether a temporary centroid set temp_centroid_list at the previous detection time corresponding to the target detection area AOB stores centroid points; if the temporary centroid set corresponding to the target detection area AOB has centroid points, describing that the obstacle detected in the target detection area at the previous detection moment has moved at the current detection moment, deleting the centroid points in the temporary centroid set temp_centroid_list corresponding to the target detection area AOB, synchronously deleting the corresponding centroid points in the centroid list, determining the position information of the obstacle in the grid map based on the centroid points to be deleted and four corner points corresponding to the centroid points, and setting grids in the coordinates of the four corner points in the grid map to be in an idle state.
On the basis of the above embodiment, the step of updating the target obstacle information of the target detection area at the previous detection time according to the current obstacle number of the target detection area at the current detection time and the target obstacle information of the target detection area at the previous detection time to obtain the target obstacle information of the target detection area at the current detection time is described in the embodiment of the present application. Specifically, the method of the embodiment comprises the following steps:
In step S310, if the number of current obstacles in the target detection area at the current detection time is not zero and the number of target obstacles in the target detection area at the previous detection time is not zero, the distance and the overlapping degree between the current obstacle and the target obstacle in the target detection area at the previous detection time are calculated based on the point cloud data of the current obstacle and the point cloud data of the target obstacle in the target detection area at the previous detection time.
In connection with the above embodiment, if the number of detected obstacles in the target detection area AOB is not 0 and the number of centroids in the temporary centroid set temp_centroid_list corresponding to the area AOB is not 0, it is further required to determine whether the detected obstacle in the target detection area at the current detection time and the detected obstacle in the target detection area at the previous detection time are consistent; specifically, centroid point centrod in temporary centroid set temp_centroid_list is traversed and calculated temp Coordinate information (x) 1 ,y 1 ,z 1 ) And an obstacle centroid point centrod detected in the AOB at the current detection time AOB Coordinate information (x) 2 ,y 2 ,z 2 ) Euclidean distance between Centriod dis And the area difference box area between the areas surrounded by the four corner points corresponding to each centroid point dis Namely, the overlapping degree (or the grid number difference between the areas surrounded by the four corner points corresponding to each centroid point), wherein the area of the area surrounded by the four corner points can be calculated through a halen formula, which is not repeated herein, and the Euclidean distance between centroid points is expressed as:
step S320, if the distance and the overlapping degree are respectively within the corresponding preset distance threshold range and overlapping degree threshold range, updating the target obstacle information of the target detection area at the previous detection time based on the point cloud data of the current obstacle and the point cloud data of the target obstacle of the target detection area at the previous detection time, so as to obtain the target obstacle information of the target detection area at the current detection time.
If the Euclidean distance Centriod between two centroid points dis Within a preset distance threshold range, and representing the area difference box area of the overlapping degree dis Within a preset overlapping degree threshold value range, judging that the two centroid points are characterized as the same obstacle, namely, the obstacle in the target detection area detected at the current detection moment is not moved or otherwise changed compared with the obstacle in the target detection area detected at the previous detection moment, averaging the detected centroid coordinates in the area AOB and the corresponding centroid point coordinates at the previous detection moment in the temporary centroid set or taking the value according to a preset weight, updating the corresponding four corner point coordinates in the same way, and then storing the updated four corner point coordinates in the temporary centroid set temp_centroid_list to update the target obstacle information of the target detection area at the previous detection moment, wherein the target obstacle information at the previous detection moment can be selected to be reserved, and the target obstacle information at the previous detection moment can be replaced The method is not limited herein, and the updated temporary centroid set, namely the target obstacle information of the target detection area at the current detection moment, is obtained.
On the basis of the above embodiments, the steps after calculating the distance and the overlapping degree between the current obstacle and the target obstacle in the target detection area in the previous detection time based on the point cloud data of the current obstacle and the point cloud data of the target obstacle in the target detection area in the previous detection time will be described in the embodiments of the present application. Specifically, the method of the embodiment comprises the following steps:
in step S410, if the distance is within the distance threshold range and the overlapping degree is not within the overlapping degree threshold range, the target obstacle information of the target detection area at the previous detection time is updated based on the current obstacle information of the target detection area at the current detection time, so as to obtain the target obstacle information of the target detection area at the current detection time.
As described in connection with the previous embodiments, if the Euclidean distance Centrio between two centroid points dis Within a range of distance threshold, but BoxArea dis Outside the overlap threshold, it is stated that the obstacle at two moments is not moving in distance, but is changing in volume, for example: and if other obstacles with different volumes are placed at the same position as the detected obstacle, deleting the centroid point in the temporary centroid set and the angular points corresponding to the centroid point, storing the centroid point detected in the area AOB at the current detection moment and the four angular points corresponding to the centroid point into the current temporary centroid set, and updating a centroid list based on the temporary centroid set.
In step S420, if the distance is not within the distance threshold, deleting the target obstacle information of the target detection area at the previous detection time to obtain the target obstacle information of the target detection area at the current detection time.
If the Euclidean distance Centriod between two centroid points dis If the distance is not within the range of the distance threshold value, the obstacle in the temporary centroid set is already in the target detection area at the current detection momentAnd when the movement occurs, deleting the centroid points and the corresponding angular points in the temporary centroid set, namely deleting the target obstacle information of the target detection area at the previous detection moment, and obtaining the target obstacle information of the target detection area at the current detection moment.
It can be seen that the method generates an obstacle substance heart list after passing through the obtained centroid determined by the obstacle point cloud data; when the target detection area is detected, firstly comparing the mass center number of the detected obstacle in the target detection area with the mass center number of the obstacle in a mass center list (namely a temporary mass center set) corresponding to the target detection area to judge whether the obstacle in the target detection area at the current detection moment moves or changes compared with the obstacle in the target detection area at the previous detection moment, so as to determine whether to empty the mass center number in the area in the mass center list and set the corresponding area grid into an idle state or update the grids in the area, update the mass center list and the like, thereby reducing the traversing times of the grid map, saving the time consumption in the map updating process, and simultaneously counting the number of the obstacles in the global grid map from the mass center list.
On the basis of the above embodiment, the embodiment of the present application describes a step of projecting point cloud data of an obstacle in target obstacle information of a target detection area at a current detection time onto a target grid map to obtain a projected target grid map. Specifically, the method of the embodiment comprises the following steps:
projecting the point cloud data of the target obstacle of the target detection area at the current detection moment into the grid map to obtain the number of point clouds in each grid of the projected target grid map; based on the number of point clouds in each grid, a grid value of the grid in the projected target grid map is determined.
The foregoing embodiment mainly describes an implementation manner of performing decremental assignment on each of the remaining grids based on the centroid point grid, and in addition, the present embodiment also provides an implementation manner of determining a grid value of each of the grids based on the number of point clouds projected in each of the grids.
Specifically, for a target grid map box area If the point cloud data of the obstacle in the target obstacle information of the target detection area at the current detection moment is projected, each point cloud data is projected to a certain grid, the grids are accumulated and counted until all the point cloud data of the obstacle are projected to obtain the projection quantity (grid value) corresponding to each grid, the grids with the grid value larger than or equal to the preset quantity threshold value are set to be occupied, and the grids with the grid value smaller than the preset quantity threshold value are set to be idle.
Optionally, for a target grid map box area If the point cloud data of the obstacle in the target obstacle information of the target detection area at the current detection moment is projected, determining the projection probability (grid value) of each grid based on the number of the point clouds projected into each grid and the total number of the point clouds, setting the grids with the grid values larger than or equal to a preset probability threshold value as an occupied state, setting the grids with the grid values smaller than the preset probability threshold value as an idle state.
Optionally, for a target grid map box area If the point cloud data of the obstacle in the target obstacle information of the target detection area at the current detection time is projected, the grid on which the point cloud data is projected is set to be in an occupied state, and the grid on which the point cloud data is not projected is set to be in an idle state.
It should be further noted that, the execution subject of the grid map updating method based on the point cloud detection may be a grid map updating apparatus based on the point cloud detection, for example, the grid map updating method based on the point cloud detection may be executed by a terminal device or a server or other processing device, where the terminal device may be a User Equipment (UE), a computer, a mobile device, a User terminal, a cellular phone, a cordless phone, a personal digital processing (Personal Digital Assistant, a PDA), a handheld device, a computing device, an in-vehicle device, a wearable device, or the like. In some possible implementations, the grid map updating method based on the point cloud detection may be implemented by a manner that a processor invokes computer readable instructions stored in a memory.
Fig. 3 is a block diagram of a grid map updating apparatus based on point cloud detection according to an exemplary embodiment of the present application. As shown in fig. 3, the exemplary point cloud detection-based grid map updating apparatus 300 includes: the acquisition module 310, the first update module 320, the projection module 330, and the second update module 340. Specifically:
an obtaining module 310, configured to obtain current obstacle information in the target detection area at the current detection moment, where the current obstacle information includes a current obstacle number.
The first updating module 320 is configured to update target obstacle information of the target detection area at a previous detection time according to the number of current obstacles of the target detection area at a current detection time and target obstacle information of the target detection area at a previous detection time, so as to obtain target obstacle information of the target detection area at the current detection time, where the current detection time of the target detection area is later than the previous detection time of the target detection area.
The projection module 330 is configured to project point cloud data of an obstacle in the target obstacle information of the target detection area at the current detection time onto a target grid map, so as to obtain a projected target grid map, where the target grid map is constructed based on the target point cloud data of the obstacle in the target detection area at the current detection time.
The second updating module 340 performs a status updating process on each grid according to the grid value of each grid in the projected target grid map.
In the exemplary grid map updating device based on the point cloud detection, whether the current obstacle information in the target detection area at the current detection moment is changed or not is judged by acquiring the current obstacle information of the target detection area at the current detection moment and the target obstacle information of the previous detection moment so as to update the target obstacle information of the target detection area at the current detection moment; the point cloud data of the obstacle of the target detection area at the current detection moment is projected to a preset grid map, and the grid is subjected to state update processing based on the grid value of each grid in the projected grid map, so that the accuracy and instantaneity of the map can be improved through the two update processes, and the update of the grid map is realized.
The function of each module may refer to an embodiment of a grid map updating method based on point cloud detection, which is not described herein.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the application. The electronic device 400 comprises a memory 401 and a processor 402, the processor 402 being adapted to execute program instructions stored in the memory 401 for implementing the steps in any of the above described embodiments of a point cloud detection based grid map updating method. In one particular implementation scenario, electronic device 400 may include, but is not limited to: the microcomputer and the server, and the electronic device 400 may also include mobile devices such as a notebook computer and a tablet computer, which are not limited herein.
In particular, the processor 402 is configured to control itself and the memory 401 to implement the steps in any of the above described point cloud detection based grid map updating method embodiments. The processor 402 may also be referred to as a CPU (Central Processing Unit ). The processor 402 may be an integrated circuit chip with signal processing capabilities. The processor 402 may also be a general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor 402 may be commonly implemented by an integrated circuit chip.
According to the scheme, whether the current obstacle information in the target detection area at the current detection moment is changed or not is judged by acquiring the current obstacle information of the target detection area at the current detection moment and the target obstacle information of the target detection moment before the current detection moment, so that the target obstacle information of the target detection area at the current detection moment is updated; the point cloud data of the obstacle of the target detection area at the current detection moment is projected to a preset grid map, and the grid is subjected to state update processing based on the grid value of each grid in the projected grid map, so that the accuracy and instantaneity of the map can be improved through the two update processes, and the update of the grid map is realized.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an embodiment of a computer readable storage medium according to the present application. The computer readable storage medium 510 stores program instructions 511 executable by the processor, the program instructions 511 for implementing the steps in any of the above-described embodiments of a point cloud detection based grid map updating method.
According to the scheme, whether the current obstacle information in the target detection area at the current detection moment is changed or not is judged by acquiring the current obstacle information of the target detection area at the current detection moment and the target obstacle information of the target detection moment before the current detection moment, so that the target obstacle information of the target detection area at the current detection moment is updated; the point cloud data of the obstacle of the target detection area at the current detection moment is projected to a preset grid map, and the grid is subjected to state update processing based on the grid value of each grid in the projected grid map, so that the accuracy and instantaneity of the map can be improved through the two update processes, and the update of the grid map is realized.
In some embodiments, functions or modules included in an apparatus provided by the embodiments of the present disclosure may be used to perform a method described in the foregoing method embodiments, and specific implementations thereof may refer to descriptions of the foregoing method embodiments, which are not repeated herein for brevity.
The foregoing description of various embodiments is intended to highlight differences between the various embodiments, which may be the same or similar to each other by reference, and is not repeated herein for the sake of brevity.
In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of modules or units is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical, or other forms.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units. The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to execute all or part of the steps of the methods of the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.

Claims (10)

1. A method for updating a grid map based on point cloud detection, the method comprising:
acquiring current obstacle information in a target detection area at a current detection moment, wherein the current obstacle information comprises the number of current obstacles;
updating the target obstacle information of the target detection area at the previous detection time according to the current obstacle quantity of the target detection area at the current detection time and the target obstacle information of the target detection area at the previous detection time to obtain the target obstacle information of the target detection area at the current detection time, wherein the current detection time of the target detection area is later than the previous detection time of the target detection area;
projecting point cloud data of an obstacle in the target obstacle information of the target detection area at the current detection moment to a target grid map to obtain a projected target grid map, wherein the target grid map is constructed based on the point cloud data of the obstacle in the target detection area at the current detection moment;
and carrying out state updating processing on each grid according to the grid value of each grid in the projected target grid map.
2. The method according to claim 1, wherein the step of projecting the point cloud data of the obstacle in the target obstacle information of the target detection area at the current detection time onto a target grid map to obtain the projected target grid map includes:
acquiring point cloud data of a target obstacle of the target detection area at the current detection moment, wherein the point cloud data comprises a centroid point and a corner point;
projecting the point cloud data into the target grid map to obtain the projected target grid map, wherein the projected target grid map comprises grids corresponding to the point cloud data, and the grids comprise centroid point grids where centroid points are located;
and carrying out assignment processing on each grid based on the grid value of the centroid point grid and the distance from the centroid point to each corner point to obtain an assigned grid, wherein the assigned grid comprises the grid value.
3. The method according to claim 2, wherein the step of performing a status update process on each grid according to the grid value of each grid in the projected target grid map includes:
Comparing the assigned grid value of the grid with a preset threshold value to obtain a comparison result;
and updating the grid state of the assigned grid based on the comparison result.
4. A method according to claim 3, wherein the step of updating the grid state of the assigned grid based on the comparison result comprises:
setting a grid with the grid value larger than or equal to the preset threshold value in the projected target grid map as an occupied state, wherein the occupied state is used for representing the existence of the obstacle in the grid;
and setting a grid with the grid value smaller than the preset threshold value in the projected target grid map as an idle state, wherein the idle state is used for representing that the barrier does not exist in the grid.
5. The method according to claim 1, wherein the step of updating the target obstacle information of the target detection area at the previous detection time based on the current obstacle number of the target detection area at the current detection time and the target obstacle information of the target detection area at the previous detection time, to obtain the target obstacle information of the target detection area at the current detection time, comprises:
And if the number of the current barriers of the target detection area in the current detection time is zero and the number of the target barriers of the target detection area in the previous detection time is not zero, deleting the target barriers of the target detection area in the previous detection time to obtain target barrier information of the target detection area in the current detection time.
6. The method according to claim 1, wherein the step of updating the target obstacle information of the target detection area at the previous detection time based on the current obstacle number of the target detection area at the current detection time and the target obstacle information of the target detection area at the previous detection time, to obtain the target obstacle information of the target detection area at the current detection time, comprises:
if the number of the current obstacles in the target detection area at the current detection time is not zero and the number of the target obstacles in the target detection area at the previous detection time is not zero, calculating the distance and the overlapping degree between the current obstacles and the target obstacles in the target detection area at the previous detection time based on the point cloud data of the current obstacles and the point cloud data of the target obstacles in the target detection area at the previous detection time;
And if the distance and the overlapping degree are respectively in a corresponding preset distance threshold range and an overlapping degree threshold range, updating the target obstacle information of the target detection area at the previous detection moment based on the point cloud data of the current obstacle and the point cloud data of the target obstacle of the target detection area at the previous detection moment, and obtaining the target obstacle information of the target detection area at the current detection moment.
7. The method according to claim 6, wherein after the step of calculating a distance and a degree of overlap between the current obstacle and the target obstacle of the target detection area in the preceding detection time based on the point cloud data of the current obstacle and the point cloud data of the target obstacle of the target detection area in the preceding detection time, the method further comprises:
if the distance is within the distance threshold range and the overlapping degree is not within the overlapping degree threshold range, updating the target obstacle information of the target detection area at the previous detection time based on the current obstacle information of the target detection area at the current detection time, and obtaining the target obstacle information of the target detection area at the current detection time;
And if the distance is not in the distance threshold range, deleting the target obstacle information of the target detection area at the previous detection time to obtain the target obstacle information of the target detection area at the current detection time.
8. The method according to claim 1, wherein the step of projecting the point cloud data of the obstacle in the target obstacle information of the target detection area at the current detection time onto a target grid map to obtain the projected target grid map includes:
projecting the point cloud data of the target obstacle of the target detection area at the current detection moment into the grid map to obtain the number of point clouds in each grid of the projected target grid map;
and determining the grid value of the grid in the projected target grid map based on the number of the point clouds in each grid.
9. An electronic device comprising a memory and a processor for executing program instructions stored in the memory to implement the method of any one of claims 1 to 8.
10. A computer readable storage medium having stored thereon program instructions, which when executed by a processor, implement the method of any of claims 1 to 8.
CN202311021590.1A 2023-08-14 2023-08-14 Grid map updating method, device and storage medium based on point cloud detection Pending CN117213463A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311021590.1A CN117213463A (en) 2023-08-14 2023-08-14 Grid map updating method, device and storage medium based on point cloud detection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311021590.1A CN117213463A (en) 2023-08-14 2023-08-14 Grid map updating method, device and storage medium based on point cloud detection

Publications (1)

Publication Number Publication Date
CN117213463A true CN117213463A (en) 2023-12-12

Family

ID=89047073

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311021590.1A Pending CN117213463A (en) 2023-08-14 2023-08-14 Grid map updating method, device and storage medium based on point cloud detection

Country Status (1)

Country Link
CN (1) CN117213463A (en)

Similar Documents

Publication Publication Date Title
CN109737974B (en) 3D navigation semantic map updating method, device and equipment
CN110807350B (en) System and method for scan-matching oriented visual SLAM
CN109509210B (en) Obstacle tracking method and device
CN111665842B (en) Indoor SLAM mapping method and system based on semantic information fusion
EP3825903A1 (en) Method, apparatus and storage medium for detecting small obstacles
CN110674705B (en) Small-sized obstacle detection method and device based on multi-line laser radar
CN110286389B (en) Grid management method for obstacle identification
CN108332752B (en) Indoor robot positioning method and device
CN111006676A (en) Map construction method, device and system
WO2022217988A1 (en) Sensor configuration scheme determination method and apparatus, computer device, storage medium, and program
CN112789609A (en) Map updating method and device, movable platform and storage medium
CN111142514A (en) Robot and obstacle avoidance method and device thereof
CN114179788A (en) Automatic parking method, system, computer readable storage medium and vehicle terminal
CN111709988A (en) Method and device for determining characteristic information of object, electronic equipment and storage medium
US11373411B1 (en) Three-dimensional object estimation using two-dimensional annotations
CN114241448A (en) Method and device for obtaining heading angle of obstacle, electronic equipment and vehicle
CN113358110A (en) Method and device for constructing robot obstacle map, robot and storage medium
CN112405526A (en) Robot positioning method and device, equipment and storage medium
CN112381873A (en) Data labeling method and device
CN117213463A (en) Grid map updating method, device and storage medium based on point cloud detection
CN113203424B (en) Multi-sensor data fusion method and device and related equipment
CN114549764A (en) Obstacle identification method, device, equipment and storage medium based on unmanned vehicle
CN114241057A (en) External reference calibration method and system for camera and laser radar and readable storage medium
CN112598736A (en) Map construction based visual positioning method and device
CN113465614B (en) Unmanned aerial vehicle and generation method and device of navigation map thereof

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