Grid and voxel positioning method based on laser observation direction, robot and chip
Patent Information
- Application Number
- JP2024524496
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-10-25
- Filing Date
- 2022-08-08
- Publication Date
- 2025-03-27
- Estimated Expiration
- 2042-08-08
Smart Images

Figure 0007652992000001 
Figure 0007652992000002 
Figure 0007652992000003
Abstract
Description
[Technical field]
[0001] The present invention relates to the technical field of map positioning, and in particular to a grid and voxel positioning method, robot and chip based on laser observation direction. [Background technology]
[0002] A mobile robot that determines its position by laser ranging builds an environmental map of the surroundings of the robot internally in order to perform continuous positioning, navigation, obstacle avoidance, etc. In the prior art, when the map is a 2D grid map or a 3D grid map, point cloud matching, map updating, etc. that need to be performed when performing indoor positioning are all related to which specific grid the laser point hits, so it is necessary to determine which grid the laser point (laser point cloud) hits by searching and updating the grid, but since it does not take into account from which direction the laser point is observed, the positioning accuracy is reduced compared to 2D grid maps or 3D grid maps. Summary of the Invention [Means for solving the problem]
[0003] In order to solve the above problems, the present disclosure proposes a grid positioning method, a voxel positioning method, a robot and a chip that combine the observation position and the laser observation direction, so that the position indicated by the selected grid can be closer to the actual physical position, and the positioning accuracy and drawing quality can be improved. Specific technical solutions include:
[0004] A grid positioning method based on a laser observation direction, the grid positioning method includes: selecting two predetermined intersections located on the same predetermined grid as a laser point; and among the two predetermined intersections, a first predetermined intersection is a predetermined intersection farthest from an observation point, and a second predetermined intersection is a predetermined intersection closest to the same observation point, where both the first predetermined intersection and the second predetermined intersection are intersections between an observation ray and a corresponding edge of the predetermined grid; and determining a target grid where the laser point hits in the direction of the observation ray based on a magnitude relationship between a ratio value of the second predetermined distance to the first predetermined distance and a predetermined proportionality coefficient, to form a grid position where the laser point hits most recently in a two-dimensional grid map, where the first predetermined distance is a straight-line distance between the first predetermined intersection and the second predetermined intersection, the second predetermined distance is a straight-line distance between the laser point and the second predetermined intersection, the observation ray is a light ray from the observation point toward the laser point and does not overlap with an edge of the grid, and the observation point is a position where the laser sensor is marked in the two-dimensional grid map.
[0005] Furthermore, a method for determining a target grid that the laser point will hit in the direction of an observation light based on the magnitude relationship between the value of the ratio between the second predetermined distance and the first predetermined distance and a predetermined proportionality coefficient includes: determining that the target grid that the laser point will hit in the direction of the observation light is a neighboring grid in the direction of the observation light of the specified grid when the value of the ratio between the second predetermined distance and the first predetermined distance is greater than the predetermined proportionality coefficient; and determining that the target grid that the laser point will hit in the direction of the observation light is the specified grid when the value of the ratio between the second predetermined distance and the first predetermined distance is equal to or less than the predetermined proportionality coefficient, where the direction of the observation light is a direction from the observation point toward the laser point and is used to indicate the laser observation direction extending from the observation point.
[0006] Furthermore, when the laser point is located at an edge of a grid, the laser point is the second predetermined intersection point, and the ratio value between the second predetermined distance and the first predetermined distance is equal to 0, so that after the observation light beam passes through the laser point, the first grid that is subsequently passed through becomes the target grid, where the predetermined proportionality coefficient is greater than 0.
[0007] Furthermore, the first predetermined intersection and / or the second predetermined intersection may be located at a vertex of the predetermined grid such that the target grid is a grid having only one common vertex with the predetermined grid, where the first predetermined intersection and the second predetermined intersection are each located at a different edge of the predetermined grid.
[0008] Furthermore, the grid positioning method includes: when the observation light overlaps with an edge of a grid in a two-dimensional grid map, if the laser point is not located at a vertex of this grid, selecting one of two grids that have the edge of the grid on which the laser point is located as a common edge, as a target grid on which the laser point will hit in the direction of the observation light; and when the observation light overlaps with an edge of a grid in the two-dimensional grid map, if the laser point is located at a vertex of this grid, selecting one of two grids farthest from the observation point among four grids that have the vertex on which the laser point is located as a common vertex, as a target grid on which the laser point will hit in the direction of the observation light, wherein the two grids farthest from the observation point are two adjacent grids located in the same row or the same column.
[0009] Furthermore, in the map coordinate system of the two-dimensional grid map, the coordinates of each grid are the coordinates of the lower left corner point of the grid, the coordinates of the upper left corner point of the grid, the coordinates of the lower right corner point of the grid, the coordinates of the upper right corner point of the grid, or the coordinates of the center position of the grid, where the coordinates of the associated corner point and center position of the grid are used to indicate the row number and column number of the grid in the two-dimensional grid map.
[0010] Furthermore, the neighboring grid of the predetermined grid is a grid having a common edge or a common vertex with the predetermined grid. The neighboring grid of the predetermined grid in the observation light direction is an adjacent grid found along the observation light direction with the predetermined grid as a starting point. Here, the manner in which the laser point is located on the predetermined grid to reflect the two-dimensional position information of the scanned object includes the laser point being located within an area surrounded by four edges of the predetermined grid and the laser point being located on one edge of the predetermined grid.
[0011] Furthermore, if the column number of the obtained specified grid is s0 and the row number of the obtained specified grid is h0, in the two-dimensional grid map, the neighboring grid of the specified grid exists among the grids whose row numbers have a numerical range of [h0-1, h0+1] and whose column numbers have a numerical range of [s0-1, s0+1], where s0 is an integer and h0 is an integer.
[0012] A voxel positioning method based on a laser observation direction, the voxel positioning method includes: selecting two predetermined intersections located in the same predetermined voxel as a laser point; and among the two predetermined intersections, the predetermined intersection farthest from an observation point is designated as a first predetermined intersection, and the predetermined intersection closest to the same observation point is designated as a second predetermined intersection, where both the first predetermined intersection and the second predetermined intersection are intersections between an observation ray and a corresponding face of the predetermined voxel; and determining a target voxel that the laser point will hit in the direction of the observation ray based on a magnitude relationship between a value of a ratio between the second predetermined distance and the first predetermined distance and a predetermined proportionality coefficient; forming a voxel location where the point was most recently hit within a two-dimensional grid map, where the first predetermined distance is a straight-line distance between the first predetermined intersection and the second predetermined intersection, where the second predetermined distance is a straight-line distance between the laser point and the second predetermined intersection, where the observation ray is a ray directed from the observation point to the laser point and configured to pass through different faces of the same voxel but not overlap with an edge of the voxel, where the observation point is a location marked in the three-dimensional grid map by the laser sensor, and where the laser point is a cloud of laser points in the three-dimensional grid map converted from laser reflection information collected by the laser sensor.
[0013] Furthermore, a method for determining a target voxel that the laser point will hit in the direction of an observation ray based on the magnitude relationship between the value of the ratio between the second predetermined distance and the first predetermined distance and a predetermined proportionality coefficient includes: determining that the target voxel that the laser point will hit in the direction of the observation ray is a neighboring voxel in the direction of the observation ray of the predetermined voxel when the value of the ratio between the second predetermined distance and the first predetermined distance is greater than the predetermined proportionality coefficient; and determining that the target voxel that the laser point will hit in the direction of the observation ray is the predetermined voxel when the value of the ratio between the second predetermined distance and the first predetermined distance is equal to or less than the predetermined proportionality coefficient, wherein the direction of the observation ray is the direction from the observation point toward the laser point.
[0014] Furthermore, when the laser point is located on a surface of a voxel of the three-dimensional grid map, the laser point is the second predetermined intersection point, and the ratio value between the second predetermined distance and the first predetermined distance is equal to 0, so that the target voxel that the laser point hits in the direction of the observation ray is the predetermined voxel, where the predetermined proportionality coefficient is greater than 0.
[0015] Furthermore, the first predetermined intersection and / or the second predetermined intersection are located on an edge of the specified voxel, such that the target voxel is a voxel having only one common vertex or only one common edge with the specified voxel, and wherein the first predetermined intersection and the second predetermined intersection are each located on a different face of the specified voxel.
[0016] Furthermore, the voxel positioning method further includes the following steps when the observation ray is located on one face of a voxel in a three-dimensional grid map: when the observation ray does not overlap with an edge of a voxel in the three-dimensional grid map, if the laser point is not located at a vertex of the voxel, one of two voxels having the face where the laser point is located as a common face is selected as a target voxel where the laser point hits in the direction of the observation ray; when the observation ray overlaps with an edge of a voxel in the three-dimensional grid map, if the laser point is not located at a vertex of the voxel, one of four voxels having the edge of the voxel where the laser point is located as a common edge is selected as a target voxel where the laser point hits in the direction of the observation ray; when the laser point is located at a vertex of a voxel, the voxel with the largest vertical distance from the observation point is selected from eight voxels having the vertex where the laser point is located as a common vertex, as a target voxel where the laser point hits in the direction of the observation ray.
[0017] Furthermore, in the three-dimensional map coordinate system of the three-dimensional grid map, the coordinates of each voxel are the coordinates of one vertex of the voxel, or the coordinates of the center position of the voxel.
[0018] Furthermore, the neighboring voxels of the predetermined voxel are voxels having a common edge or a common vertex with the predetermined voxel. The neighboring voxels of the predetermined voxel in the observation ray direction are adjacent voxels that are searched for along the direction of the observation ray, starting from the search for the predetermined voxel. Here, the manner in which the laser point is located at the predetermined voxel includes the laser point being located within a spatial region surrounded by eight faces of the predetermined voxel, and the laser point being located on one face of the predetermined voxel. Here, the manner in which the laser point is located on one face of the predetermined voxel includes the laser point being located on one vertex of the predetermined voxel.
[0019] Furthermore, if the horizontal axis direction number of the acquired specific voxel is s0, the vertical axis direction number of the acquired specific voxel is h0, and the vertical axis direction number of the acquired specific voxel is z0, then in the 3D grid map, the neighboring grid of the specific voxel is among the voxels whose horizontal axis direction number is in the numerical range [h0-1, h0+1], whose vertical axis direction number is in the numerical range [s0-1, s0+1], and whose vertical axis direction number is in the numerical range [z0-1, z0+1], where s0 is an integer, h0 is an integer, and z0 is an integer.
[0020] A robot comprising: a robot body; a traveling configuration provided on the robot body; a laser sensor provided on the robot body, the laser sensor being used to collect laser information reflected from a scanned object, acquire laser points, and form a laser point cloud; and a controller, the controller being built into the robot body and connected to the laser sensor, the controller comprising at least one processor and a memory, the memory being communicatively connected to the at least one processor, the memory storing instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the robot to perform a grid positioning method based on a laser observation direction, and / or a voxel positioning method based on the laser observation direction.
[0021] A chip storing computer-executable instructions that, when executed by the chip, implement a grid positioning method based on the laser observation direction and / or a voxel positioning method based on the laser observation direction. Effect of the Invention
[0022] Compared with the prior art, the present invention takes the position of the laser sensor as an observation point, and along the observation direction (i.e., the laser observation direction) from this observation point toward the laser point that hits the grid map, finds out two intersections between the light ray formed from this observation point toward the laser point that hits the grid map and the grid, which have the meaning of positioning and distance comparison, and determines the grid position that this laser point hits most recently in the map based on the ratio value between the distance between the intersection closest to the observation point and the laser point and the straight-line distance between the above two intersections, and forms a concept of determining the grid position that this laser point hits most recently in the map based on the proximity of the laser point to the surrounding grids, thereby realizing the acquisition of a grid with a smaller positioning error with respect to the actual physical position in a two-dimensional grid map, and also enabling the acquisition of a voxel (abbreviation for voxel grid) with a smaller positioning error with respect to the actual physical position in a three-dimensional grid map. [Brief description of the drawings]
[0023] [Figure 1] FIG. 2 is a flow diagram illustrating a method for grid positioning based on laser observation direction disclosed in an embodiment of the present invention. [Diagram 2] FIG. 2 is a schematic diagram of a ray OM passing through a grid in a two-dimensional grid map, according to one embodiment of the present invention. [Diagram 3] FIG. 2 is a schematic diagram of a ray ON passing through a grid in a two-dimensional grid map according to an embodiment of the present invention; [Figure 4]FIG. 2 is a schematic diagram of a ray OP passing through a grid in a two-dimensional grid map, according to one embodiment of the present invention. [Diagram 5] FIG. 2 is a schematic diagram of a ray OU passing through a voxel in a three-dimensional grid map according to an embodiment of the present invention; [Figure 6] FIG. 2 is a schematic diagram of a ray OL passing through a voxel in a three-dimensional grid map according to an embodiment of the present invention; DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0024] Hereinafter, the technical solutions in the embodiments of the present invention will be described in detail with reference to the drawings in the embodiments of the present invention. The following embodiments and features of the embodiments can be combined where there is no contradiction. In the following description, specific details are provided to fully understand the embodiments. However, those skilled in the art should understand that the embodiments can be practiced without these specific details. For example, circuits may be shown in block diagrams so as not to obscure the embodiments with unnecessary details. In other cases, well-known circuits, structures and techniques may not be shown in detail so as not to obscure the embodiments.
[0025] In addition, both the 2D grid map and the 3D grid map contain information indicating the probability of an obstacle existing at a specific position or area, and the measurement object can be scanned by the laser sensor of the mobile robot to obtain the position information corresponding to the measurement object, and based on this, the probability information of the measurement object falling at the corresponding grid position of the map can be calculated. At different times in the same position, the detection distance of a fixed obstacle (measurement object) by the laser sensor may not match, and the detection distance for one frame of laser data collected at one time may be 5m, and the detection distance for one frame of laser data collected at another time may be 5.1m. In order not to mark the positions of 5m and 5.1m as the fixed obstacle at the same time, it is necessary to use an occupancy grid map construction algorithm to calculate the probability information of the fixed obstacle falling (hitting) at the corresponding grid position of the map, and then determine the exact position of the fixed obstacle on the map based on the magnitude of the probability value. Since the prior art usually does not consider the space occupied by the size of the mobile robot, the present invention reduces the mobile robot to one point regardless of whether the map has changed or not.
[0026] Specifically, a grid map with a certain resolution is formed by a certain number of laser scan points (which can be simply called laser points), specifically by configuring a probability grid [Pmin, Pmax] with a size of 5 cm x 5 cm. Whether it is a two-dimensional grid map or a three-dimensional grid map, when the map is completed, if the grid probability is less than Pmin, it indicates that there is no obstacle at that grid position, if the grid probability is Pmin to Pmax, it indicates that it is unknown, and if the grid probability is greater than Pmax, it indicates that there is an obstacle at that grid position. The laser scan points of each frame all generate a grid group, and in a grid group, each grid is assigned an occupancy probability value, and if a grid had a probability value before, the probability value of that grid needs to be updated.
[0027] Furthermore, for a fixed scanned object, a moving laser sensor may be used to obtain as many real surface point information as possible. When a laser is irradiated onto the surface of the scanned object, the reflected laser information includes information such as orientation, distance, etc. The laser surveying and photography surveying principles are combined to obtain a point cloud, which includes three-dimensional coordinates (XYZ), laser reflection intensity (Intensity) and color information (RGB). After obtaining the spatial coordinates of each sample point on the surface of the scanned object, a point set is obtained, which is called a point cloud, whereby the point cloud is also a large number of point sets related to the target surface features. When the three-dimensional data obtained from different observation points (which can be understood as laser sensors at different positions, or laser sensors moved to different positions sequentially) have a certain overlap to completely cover the scanned object, it indicates that sufficient surface three-dimensional point cloud data has been obtained, where the point clouds obtained from different observation points have been unified transformed into one map coordinate system.
[0028] As the first embodiment, a grid positioning method based on the laser observation direction is disclosed. The execution body of this grid positioning method is a mobile robot equipped with a laser sensor, where the laser sensor is used to collect the laser information reflected from the scanned object, which is converted into a point in a map constructed in a timely manner by a controller inside the mobile robot, and the point can indicate the grid number of the scanned position, which is converted from the world coordinate system to a two-dimensional grid coordinate system, each grid number has two numbers, x and y, and relates to the resolution of the map, for example, the resolution of the map is 0.05, that is, 1m in the actual physical environment is represented by 20 grids. As shown in FIG. 1, this grid positioning method includes the following:
[0029] In step S1, two predetermined intersections located on the same predetermined grid as the laser point are selected, and in some embodiments, two predetermined intersections located on the same predetermined grid as the laser point are found along the direction of the observation light beam, where the first predetermined intersection and the second predetermined intersection are respectively located on different edges of the predetermined grid. Then, proceed to step S2. Here, the fact that the laser point is located on the same grid as the two predetermined intersections in the observation light beam includes the fact that the laser point is located on the edge of this grid, or the fact that the laser point is located inside (but not including) a grid area surrounded by four edges of this grid. This embodiment defines such a grid as the predetermined grid. The observation light beam is a light beam from the observation point to the laser point, and does not overlap with the edges of the grid, specifically, the observation light beam does not overlap with any edge of the predetermined grid. The observation point is a position where the laser sensor is marked in a two-dimensional grid map, and preferably, the observation point indicates a specific position of the probe of the laser sensor and is used to determine the position of transmitting and receiving a signal.
[0030] In step S2, the predetermined intersection farthest from the observation point among the two predetermined intersections is set as the first predetermined intersection, and the predetermined intersection closest to the same observation point is set as the second predetermined intersection. Then, proceed to step S3. Therefore, in step S2, the second predetermined intersection and the first predetermined intersection are set on the same light beam as mapping points at the intersection edge with the grid corresponding to the observation light beam of the laser point, thereby further establishing the distance relationship between the positions of these two intersections and the observation point.
[0031] In step S3, a target grid that the laser point hits in the direction of the observation light is determined based on the magnitude relationship between the ratio value of the second predetermined distance to the first predetermined distance and the predetermined proportional coefficient, and the laser point forms the most recently hit grid position in the two-dimensional grid map, and obtains a grid with a smaller positioning error with respect to the actual physical position, and then a grid that has a reasonable distance in the vicinity area of the currently hit grid in the map along the direction of the observation light is placed in the target grid, and updated to the currently hit grid in the map. Compared with the prior art, it is not necessary to obtain the occupancy probability value of the grid through calculation or comparison. Here, the first predetermined distance is the straight-line distance between the first predetermined intersection and the second predetermined intersection, and the second predetermined distance is the straight-line distance between the laser point and the second predetermined intersection, and both of these distances are calculated in the coordinate system of the two-dimensional grid map. When actually calculating the related distance information, it is necessary to calculate the grid number in the two-dimensional grid coordinate system of each laser point and its hit grid. Here, the specific setting of the predetermined proportionality coefficient can be adaptively adjusted based on actual test results, thereby adapting to errors existing in the grid map constructed by the robot. Specifically, the errors are such that in the pixel image in which the grid map constructed by the laser is divided according to the grid resolution, the environmental information indicated by the map has errors from reality. For example, the map has problems such as jagged straight line segments, hierarchical overlapping of segments, noise in the segments, etc.
[0032] In addition, the laser point is a coordinate point where the laser information reflected from the scanned object collected by the laser sensor is converted into a grid map, and belongs to a laser scanning point or a laser sampling point, reflecting the position information (including the detection distance and detection angle to the scanned object surface) and the laser reflection intensity. Specifically, when the laser sensor scans the scanned object with a laser beam along a certain route, it records information about the reflected laser points while scanning. If the scan is very fine, a large number of laser points can be obtained, so that a laser point cloud can be formed. Here, the laser sensor is usually a laser radar that supports 360-degree rotational scanning, and has a laser transmitting probe and a receiving probe. In some embodiments, after the laser points are processed, the specific surface elements where the laser was can be classified, so that the floor, furniture, walls, and any objects in the room where the laser beam was during measurement constitute the laser point cloud data, and the positioning of these objects is realized. Specifically, the laser information reflected from the scanned object collected by the laser sensor includes a laser radar data packet, which includes several frames of laser point cloud data, each frame of the laser point cloud data includes several scan points, and each scan point includes an angle (counterclockwise is the positive direction) and a distance.
[0033] Based on the above embodiment, the method for determining the target grid where the laser point hits in the direction of the observation light according to the magnitude relationship between the ratio value between the second predetermined distance and the first predetermined distance and the predetermined proportionality coefficient includes: when the ratio value between the second predetermined distance and the first predetermined distance is greater than the predetermined proportionality coefficient, the target grid where the laser point hits in the direction of the observation light is determined to be a nearby grid in the direction of the observation light, and is the nearest grid to the laser point searched along the direction of the observation light; when the ratio value between the second predetermined distance and the first predetermined distance is equal to or less than the predetermined proportionality coefficient, the target grid where the laser point hits in the direction of the observation light is determined to be the predetermined grid, and the grid where the laser point is originally located is set as the target grid, where the direction of the observation light is the direction from the observation point to the laser point, and is used to indicate the laser observation direction extending from the observation point, thereby selecting a grid with a relatively small difference from the actual physical position in the dimension of direction, and improving the localization accuracy and drawing quality. The predetermined proportionality factor is preferably greater than 0, based on the above-mentioned distance ratio value being greater than 0.
[0034] To sum up, compared to the prior art, the present invention takes the position of the laser sensor as an observation point, and along the observation direction from this observation point toward the laser point that hits the grid map, finds out two intersections between the grid and the light ray formed from this observation point toward the laser point that hits the grid map, which have the meaning of positioning and distance comparison, and determines the grid position that this laser point hits most recently in the map based on the ratio value between the distance between the intersection closest to the observation point and the laser point and the straight-line distance between the above two intersections, and forms a concept of determining the grid position that this laser point hits most recently in the map based on the proximity of the laser point to the surrounding grids, thereby achieving the acquisition of a grid with a smaller positioning error with respect to the actual physical position in the two-dimensional grid map.
[0035] As can be seen from the grid maps of Figures 2 to 4, the grids in the two-dimensional grid maps shown are regularly arranged, and the grids in the two-dimensional grid maps are arranged in a row-column order, and point O is the grid position occupied by the laser sensor of the robot. The grid in Figure 2 where point M is located is the predetermined grid, and there are three grids adjacent to the grid in Figure 2 where point M is located. The grid in Figure 3 where point N is located is also the predetermined grid, and there are eight grids adjacent to the grid in Figure 3 where point N is located. Therefore, in this embodiment, the neighboring grid of the predetermined grid is a grid that has a common edge or a common vertex with the predetermined grid. Here, in order to reflect the two-dimensional position information of the scanned object, the manner in which the laser point is located on the predetermined grid includes: the laser point is located within an area surrounded by four edges of the predetermined grid, and the laser point is located on one edge of the predetermined grid. In the above embodiment, the neighboring grid in the observation ray direction of the predetermined grid is an adjacent grid found along the observation ray direction, which is the direction indicated by the arrow of the ray OM shown in Fig. 2, or the direction of the observation ray is the direction indicated by the arrow of the ray ON shown in Fig. 3. Thus, a target grid is found from the surrounding area of the laser point including the grid position where the laser point is located along the direction of the predetermined observation ray, thereby reducing the complexity of calculation and increasing the positioning speed of the laser point.
[0036] Specifically, if the acquired column number of the predetermined grid is s0 and the acquired row number of the predetermined grid is h0, in the two-dimensional grid map, the neighboring grid of the predetermined grid is a grid whose row number has a numerical range of [h0-1, h0+1] and whose column number has a numerical range of [s0-1, s0+1], where s0 is an integer and h0 is an integer. Preferably, in the grid map shown in Fig. 2, if the row number of the grid where point M in Fig. 2 is located is 0 and the column number of the grid where point M in Fig. 2 is located is 0, the numerical range of the row number of the neighboring grid of the grid where point M in Fig. 2 is located is [0,1] and the numerical range of the column number is [0,1]. Preferably, in the grid map shown in Fig. 3, if the row number of the grid where the N point in Fig. 3 is located is 1 and the column number of the grid where the N point in Fig. 3 is located is 1, the row number of the neighboring grid of the grid where the N point in Fig. 3 is located is in a numerical range of [0, 2] and the column number of the neighboring grid is in a numerical range of [0, 2]. As can be seen from the grid maps shown in Figs. 2 to 3, the row number of the neighboring grid is within the section from the previous row to the next row of the predetermined grid, and the column number of the neighboring grid is within the section from the previous column to the next column of the predetermined grid. Therefore, assuming that s0 and h0 are known, the predetermined grid is excluded from the grids where the numerical range of the vertical axis direction number is [h0-1, h0+1] and the numerical range of the horizontal axis direction number is [s0-1, s0+1] so that there exists a grid where the laser point matches the row number and column number in the two-dimensional grid map, and the remaining grids become the neighboring grids of the predetermined grid. Therefore, this embodiment can determine a unique grid based on the row number and column number in the grid map.
[0037] In some embodiments, in the map coordinate system of the two-dimensional grid map, i.e., in the coordinate system of the two-dimensional grid, the coordinate of each grid is the coordinate of the lower left corner point of the grid, the coordinate of the upper left corner point of the grid, or the coordinate of the lower right corner point of the grid. In some implementation scenarios, the coordinate of each grid is expressed using the coordinate of the center position of the grid, so that the center position of the grid is used to represent the actual geographical position of the scanned area. Here, the coordinates of the corner point of the relevant edge and the center position of the grid can represent the row number and column number of the grid in the two-dimensional grid map, where the horizontal coordinate is equal to the column number and the vertical coordinate is equal to the row number. As shown in the grid maps of Figures 2 to 4, when traversing the grid from left to right, the column number gradually increases, and when traversing the grid from bottom to top, the column number gradually increases. This ensures that the path formed by connecting the grids one by one in the two-dimensional grid map is continuous. For ease of understanding, the coordinates of this grid are expressed as the coordinates of the lower left corner of the grid in the map coordinate system shown in Figures 2-4.
[0038] In the second embodiment, as shown in Fig. 2, an observation point is marked as point O, a laser point collected and converted by a laser sensor is marked as point M, and an observation ray OM is formed from the observation point O toward the laser point M. When the grid on which the laser point M is located is the predetermined grid, the observation ray OM and the corresponding edge of the predetermined grid intersect at points A and B, that is, while the observation ray OM intersects with the same grid at points A and B, the observation ray OM does not overlap any edge of the predetermined grid. Here, when the distance between point A and the observation point O is greater than the distance between point B and the observation point O, the distance between point A and point B is defined as a first predetermined distance AB, the distance between point A and the laser point M is defined as a second predetermined distance MA, the first predetermined intersection is marked as point B, and the second predetermined intersection is marked as point A. Based on this, a first predetermined intersection point B, a second predetermined intersection point A and a laser point M located on the same predetermined grid can be selected along the direction of the observation light OM, and the first predetermined intersection point B and the second predetermined intersection point A can be understood to be mapping points at the intersection edge between the observation light OM and the corresponding grid. In Example 2, when the value of the ratio between the second predetermined distance MA and the first predetermined distance AB is greater than the predetermined proportionality coefficient, it is determined that the target grid that the laser point M hits in the direction of the observation light OM is a neighboring grid in the direction of the observation light OM of the predetermined grid, and is the closest grid to the laser point M searched along the direction of the observation light OM. In this case, the target grid is the grid in which the arrow of the observation light OM points to the previous row of the same column of the predetermined grid in FIG. 2. Accordingly, in the map coordinate system shown in FIG. 2, when the coordinates of this grid are expressed by the coordinates of the lower left corner point of the grid, the coordinates of the grid where the laser point M is located (the predetermined grid) are (0,0), and the coordinates of the target grid that the laser point M hits in the direction of the observation light OM are (0,0).In the second embodiment, when the value of the ratio between the second predetermined distance MA and the first predetermined distance AB is equal to or less than the predetermined proportionality coefficient, it is determined that the target grid where the laser point M hits in the direction of the observation light OM is the predetermined grid, and this target grid is the grid where the laser point M was originally located in Fig. 2. Accordingly, in the map coordinate system shown in Fig. 2, when the coordinates of this grid are expressed by the coordinates of the lower left corner point of the grid, the coordinates of the grid where the laser point M is located (the predetermined grid) are (0,0), and the coordinates of the target grid where the laser point M hits in the direction of the observation light OM are (0,0). This realizes obtaining a grid with a smaller distance error from the actual physical position in the two-dimensional grid map.
[0039] Based on the above embodiment, it can be inferred that when the value of the ratio between the second predetermined distance and the first predetermined distance is greater than the predetermined proportional coefficient, the direction of the observation ray determines the distribution direction (abbreviated as the neighborhood grid direction, including the direction indicated by the arrow of the light beam shown in FIG. 2 to FIG. 3) of the target grid where the laser point hits in the direction of the observation ray relative to the predetermined grid where the laser point is located. The directions of the neighborhood grid are divided into the upper left of the predetermined grid, the lower left of the predetermined grid, the upper right of the predetermined grid, the lower right of the predetermined grid, directly above the predetermined grid, directly below the predetermined grid, directly to the left of the predetermined grid, and directly to the right of the predetermined grid. The directions of each of the neighborhood grids can be determined by referring to the embodiment 2 corresponding to FIG. 2 to determine the target grid corresponding to the direction of the observation ray, and the drawings and descriptions are omitted here, and only adaptive adjustment is made to the related observation ray and grid in the embodiment 2.
[0040] Preferably, when the laser point is located at the edge of the grid, the laser point is the second predetermined intersection, and in this preferred example, the laser point can only be set at the second predetermined intersection. In this case, the laser point can only be the predetermined intersection closest to the same observation point among two predetermined intersections where the observation light beam intersects with the edge of the grid. Here, when the observation light beam does not overlap any edge of the grid, the value of the ratio between the second predetermined distance and the first predetermined distance is equal to 0, and the predetermined proportional coefficient is greater than 0, so that the target grid where the laser point M hits in the direction of the observation light beam OM is the predetermined grid. Thus, when the laser point hits the edge of the grid, the first grid that the observation light beam passes through after passing the laser point is made to be the target grid, and the distance between the target grid and the laser point is made closer. The movement of the position of the laser point M can be understood by referring to FIG. 2. When the laser point M hits the position of point A, the observation light OM intersects with the corresponding edge of the predetermined grid (0,0) at point M and point B, and the second predetermined intersection can only be marked as point M, so the first predetermined intersection is marked as point B, and the distance between point M and point B is defined as a first predetermined distance MB, and the distance between point M and the laser point M is defined as a second predetermined distance, so that the second predetermined distance is equal to 0, and the ratio value of the second predetermined distance MA and the first predetermined distance AB is smaller than the predetermined proportionality coefficient. In this case, the predetermined grid (0,0) is selected as the target grid that the laser point M hits in the direction of the observation light OM, where the predetermined proportionality coefficient is greater than 0.
[0041] According to the concept of making the first grid that the observation ray passes through after passing the laser point become the target grid when the laser point hits the edge of the grid, the movement of the position of the laser point M can be understood by continuing to refer to FIG. 2. When the laser point M hits the position of point B, the observation ray OM intersects with the corresponding edge of the grid (0,0) at point M and point A, and the observation ray OM intersects with the corresponding edge of the grid (0,1) at point M and one new point, in this case, the new intersecting point is located on the Y axis (not shown), the grid (0,1) is updated to the predetermined grid, the second predetermined intersection point is marked as point M, and the first predetermined intersection point is marked as the new intersecting point located on the Y axis, and the straight-line distance between the second predetermined intersection point M and the laser point M is equal to 0, so the second predetermined distance is equal to 0. Thus, the ratio value between the second predetermined distance and the first predetermined distance is equal to 0, which is smaller than the predetermined proportional coefficient. In that case, select grid (0,1) as the target grid where the laser point M hits in the direction of the observation ray OM, where the predetermined proportionality factor is greater than 0, grid (0,1) is the grid with coordinates (0,1), and grid (0,0) is the grid with coordinates (0,0).
[0042] In the third embodiment, the first predetermined intersection and / or the second predetermined intersection are located at the vertices of the predetermined grid. In this case, the first predetermined intersection and the second predetermined intersection are located at the corresponding edges of the predetermined grid, and the target grid is adjusted to a grid having only one common vertex with the predetermined grid. As shown in FIG. 3, an observation point is marked as point O, a laser point acquired by a laser sensor through collection and conversion is marked as point N, and an observation ray ON is formed from the observation point O toward the laser point N, and when the grid where the laser point N is located is the predetermined grid, the observation ray ON intersects with the corresponding edge of the predetermined grid at points C and D, where the observation ray ON intersects with the upper left corner of the predetermined grid, and the observation ray ON intersects with one edge of the predetermined grid at point C. In some embodiments, point C may be the vertex of the lower right corner of the predetermined grid, but should not be the vertex of the lower left corner of the predetermined grid to avoid the observation ray ON overlapping with the left edge of the predetermined grid. Since the distance between point D and the observation point O is greater than the distance between point C and the observation point O, the first predetermined intersection is marked as point D, the second predetermined intersection is marked as point C, the distance between point D and point C is defined as the first predetermined distance CD, and the distance between point C and the laser point N is defined as the second predetermined distance NC. Based on this, the first predetermined intersection D, the second predetermined intersection C and the laser point N located on the same predetermined grid may be selected along the direction of the observation beam ON, and the first predetermined intersection D and the second predetermined intersection C can be understood as mapping points of the laser point N at the intersection edge between the observation beam ON and the corresponding grid.In the third embodiment, when the value of the ratio between the second predetermined distance NC and the first predetermined distance DC is greater than the predetermined proportionality coefficient, it is determined that the target grid that the laser point N hits in the direction of the observation light ON is a neighboring grid in the direction of the observation light ON of the predetermined grid, and is the closest grid to the laser point N searched along the direction of the observation light ON. In this case, the target grid is the grid in which the arrow of the observation light ON points to the previous row of the previous column of the predetermined grid in FIG. 3, that is, the grid that is located in the upper left of the predetermined grid and has only one common vertex with the predetermined grid. Accordingly, in the map coordinate system shown in FIG. 3, when the coordinates of this grid are expressed by the coordinates of the lower left corner point of the grid, the coordinates of the grid where the laser point N is located (the predetermined grid) are (1,1), and the coordinates of the target grid where the laser point N hits in the direction of the observation light ON are (0,2). In Example 3, when the value of the ratio between the second predetermined distance NC and the first predetermined distance CD is equal to or less than the predetermined proportionality coefficient, it is determined that the target grid that the laser point N hits in the direction of the observation light ON is the predetermined grid, and this target grid is the grid where the laser point N was originally located in Figure 3. Accordingly, in the map coordinate system shown in Figure 3, when the coordinates of this grid are expressed by the coordinates of the lower left corner point of the grid, the coordinates of the grid where the laser point N is located (the predetermined grid) are (1,1), and the coordinates of the target grid where the laser point N hits in the direction of the observation light ON are (1,1).
[0043] To sum up, in the third embodiment, when the observation ray passes through the vertices of the predetermined grid, specifically, when the laser point passes through the vertices of the predetermined grid, the target grid that the laser point hits in the direction of the observation ray is adjusted to a grid having only one common vertex with the predetermined grid. Specifically, the target grid may be a neighboring grid at the upper left of the predetermined grid, a neighboring grid at the upper right of the setting grid, a neighboring grid at the lower left of the predetermined grid, and a neighboring grid at the lower right of the predetermined grid. Specifically, the target grid is specified by the direction of the observation ray. Thereby, the form in which the laser point hits within the corresponding rectangular region is expanded. Here, each type of target grid can be determined in a manner corresponding to the third embodiment, and the description is omitted here.
[0044] In addition, in this embodiment 3, when the laser point N hits the edge of the grid, the method of determining the target grid is almost the same as the method of determining the target grid in the above preferred example, so the above embodiment 1 may be referred to for the explanation of the calculation of the specified intersection and distance ratio value, and the explanation will be omitted here.
[0045] As the fourth embodiment, the scenario disclosed in the first embodiment and the second embodiment is different in that the grid positioning method further includes the following: when the observation ray overlaps with the edge of a grid in a two-dimensional grid map, if the laser point is not located at the vertex of the grid, select one of two grids with the edge of the grid where the laser point is located as a common edge, as a target grid where the laser point hits in the direction of the observation ray. As shown in Fig. 4, the observation point is marked as O, the laser point acquired by the laser sensor through collection and conversion is marked as point P, the laser point P is located at the edge of the grid, an observation ray OP is formed from the observation point O to the laser point P, the edge of the grid where the laser point P is located is taken as a common edge, and either one of the grids on the left side of the common edge and the grid on the right side of the open edge is the target grid where the laser point P hits in the direction of the observation ray OP. Accordingly, in the map coordinate system shown in Figure 4, if the coordinates of this grid are expressed by the coordinates of the lower left corner point of the grid, the coordinates of the grid on the left side of this common edge are (1,2), and the coordinates of the grid on the right side of this common edge are (2,2). In this case, it is not necessary to calculate the corresponding distance ratio value by the intersection point of the observation ray with the same grid, and it is favorable to determine the grid that the laser point actually hits.
[0046] In Example 4, the grid positioning method further includes: when the observation ray overlaps with an edge of a grid in a two-dimensional grid map, when the laser point is located at a vertex of this grid, selecting one of the two grids farthest from the observation point among the four grids having the vertex where the laser point is located as a common vertex, as a target grid where the laser point hits in the direction of the observation ray, where the two grids farthest from the observation point are two adjacent grids located in the same row or the same column, in which case, when the two grids farthest from the observation point are distributed symmetrically with respect to the observation ray, the vertical distances from the observation point to the centers of the two grids are equal.
[0047] As shown in Figure 4, the observation point is marked as point O, the laser point collected and converted by the laser sensor is marked as point F, the laser point P is located at the vertex of the grid, an observation ray OF is formed from the observation point O toward the laser point F, and when the observation ray OF overlaps with the edge of the grid passing through the vertex F in the Y-axis direction, one of the two grids in the row before the laser point F is selected among the four grids with the vertex where the laser point F is located as a common vertex, as the target grid where the laser point hits in the direction of the observation ray, and the two grids in the row before the laser point F are the two grids farthest from the observation point among the four grids with the vertex where the laser point F is located as a common vertex. Accordingly, in the map coordinate system shown in Fig. 4, when the coordinates of this grid are expressed by the coordinates of the lower left corner point of the grid, among the four grids having the vertex where the laser point F is located as a common vertex, the grid coordinates are (1,2), (2,2), (1,3), and (2,3) in the counterclockwise order, and since the observation point O is located below the X axis (negative direction of the Y axis), the two grids farthest from the observation point are the grid with coordinates (1,3) and the grid with coordinates (2,3), respectively, and in this embodiment, the distance between the center of the grid with coordinates (1,3) and the observation point is the distance between the center of the grid with coordinates (2,3) and the observation point. The distance between the center of the grid with coordinates (1,2) and the observation point is equal to the distance between the center of the grid with coordinates (2,2) and the observation point. The distance between the center of the grid with coordinates (1,3) and the observation point is greater than the distance between the center of the grid with coordinates (1,2) and the observation point, which means that the grid with coordinates (1,3) is farther from the observation point than the grid with coordinates (1,2). Therefore, in Example 4, on the premise that the observation ray overlaps with an edge of a grid in the two-dimensional grid map, one of two related grids having a common edge or a common vertex is selected as the target grid according to the perspective from the observation point, thereby shortening the distance between the target grid and the target actual physical location.
[0048] A 3D image is a special form of information representation that features three-dimensional data in a representation space. With the help of the third-dimensional information, a 3D image can realize the separation of natural objects from the background.
[0049] Since the point cloud disclosed in the present invention is collected directly or indirectly by a specific measurement means, and can represent a dense set of points of a target surface feature according to a measurement rule, the 3D grid map is three-dimensional and can be represented by voxels of the same size, also called voxel grid. For example, in a 3D grid map scene, the voxel grid is a data structure that represents a three-dimensional object with a fixed-size cubic block or cube as the smallest unit. Therefore, the voxel can also be regarded as a point cloud in the point cloud map.
[0050] As an embodiment, the present invention further discloses a voxel positioning method based on laser observation direction, in which the execution body of the voxel positioning method is a mobile robot equipped with a laser sensor, in which the laser sensor is used to collect the laser information reflected from the scanned object, which is converted into a point in a map constructed in a timely manner by a controller inside the mobile robot, and the point can indicate the voxel number of the scanned position, which is converted from the world coordinate system to a three-dimensional grid coordinate system, and each voxel number has three quantities: x, y and z.
[0051] The voxel positioning method includes: finding two predetermined intersections located in the same predetermined voxel as the laser point, and in some embodiments, finding two predetermined intersections located in the same predetermined voxel as the laser point along the direction of the observation ray. Here, the first predetermined intersection and the second predetermined intersection are both intersections between the observation ray and the corresponding face of the predetermined voxel. In this embodiment, the first predetermined intersection and the second predetermined intersection may be located on different faces of the corresponding cube of the predetermined voxel, respectively, but the observation ray does not overlap with the edge of the voxel, specifically, the observation ray does not overlap with any edge of the voxel. Here, in the observation ray, the position of the laser point in the same voxel as the two predetermined intersections includes being located on the face of this voxel, or being located inside (but not including) the spatial region surrounded by the eight faces of this voxel. This embodiment defines this type of voxel as the predetermined voxel. The observation ray is a ray from an observation point to a laser point, and the observation point is a spatial position marked by a laser sensor in a three-dimensional grid map. Here, the laser point is a laser point cloud obtained by converting the laser reflection information collected by the laser sensor into a laser point cloud in a three-dimensional grid map. In this embodiment, the face of a voxel is an abbreviation of the face of a cube that forms this voxel.
[0052] In some embodiments, the first predetermined intersection point and the second predetermined intersection point may be located on the same face of the cube corresponding to the predetermined voxel, and may be located on different edges of the face. In this case, the specific embodiment may refer to the above embodiments 1 to 4 to find the target grid.
[0053] Of the two predetermined intersections, the one farthest from the observation point is defined as the first predetermined intersection, and the one closest to the same observation point is defined as the second predetermined intersection. In the observation light beam, the distance between the first predetermined intersection and the observation point is greater than the distance between the second predetermined intersection and the observation point, and in this embodiment, the straight-line distance between the first predetermined intersection and the second predetermined intersection is defined as the first predetermined distance, and the straight-line distance between the laser point and the second predetermined intersection is defined as the second predetermined distance.
[0054] Then, the target voxel hit by the laser point in the direction of the observation ray is determined according to the magnitude relationship between the ratio of the second predetermined distance to the first predetermined distance and the predetermined proportional coefficient, and the voxel hit most recently by the laser point is formed in the three-dimensional grid map, i.e., the voxel grid position hit most recently, and a voxel with a smaller positioning error with respect to the actual physical position in the three-dimensional grid map is obtained, and then a voxel having a reasonable distance in the vicinity area of the currently hit voxel in the map along the direction of the observation ray is located in the target voxel, and updated to the currently hit voxel in the map. Here, the specific setting of the predetermined proportional coefficient can be adaptively adjusted according to the actual test result, so as to adapt to the error existing in the three-dimensional grid map constructed by the robot, which error is specifically due to the fact that the environmental information indicated by the map has an error from the reality in the pixel image divided by the grid resolution of the three-dimensional grid map constructed by the laser, for example, the map has problems such as straight line segments being jagged, segments being layered, and segments being noisy.
[0055] In addition, the laser points are point clouds in which the laser information reflected from the scanned object collected by the laser sensor is converted into a grid map, and belong to laser scanning points or laser sampling points, reflecting the position information (including the detection distance and detection angle to the scanned object surface) and the laser reflection intensity. Specifically, when the laser sensor scans the scanned object with a laser beam along a certain route, it records information about the reflected laser points while scanning. If the scan is very fine, a large number of laser points can be obtained, so that a laser point cloud can be formed. Here, the laser sensor is usually a laser radar that supports 360-degree rotational scanning, and has a laser transmitting probe and a receiving probe. In some embodiments, after the laser points are processed, the specific surface elements on which the laser was located can be classified, so that the floor, furniture, walls, and any objects in the room where the laser beam was located during measurement constitute the laser point cloud data, and the positioning of these objects is realized. Specifically, the laser information reflected from the scanned object collected by the laser sensor includes a laser radar data packet, which includes several frames of laser point cloud data, each frame of the laser point cloud data includes several scan points, and each scan point includes an angle (counterclockwise is the positive direction) and a distance.
[0056] Based on the above embodiment, the method for determining the target voxel that the laser point hits in the direction of the observation ray based on the magnitude relationship between the ratio value of the second predetermined distance to the first predetermined distance and a predetermined proportionality coefficient includes: when the ratio value of the second predetermined distance to the first predetermined distance is greater than the predetermined proportionality coefficient, the target voxel that the laser point hits in the direction of the observation ray is determined to be a neighboring voxel in the direction of the observation ray, and is the closest voxel to the laser point searched along the direction of the observation ray; when the ratio value of the second predetermined distance to the first predetermined distance is equal to or less than the predetermined proportionality coefficient, the target voxel that the laser point hits in the direction of the observation ray is determined to be the predetermined voxel, and the voxel where the laser point is originally located is set as the target voxel, where the direction of the observation ray is the direction from the observation point toward the laser point, and is used to indicate the laser observation direction extending from the observation point, thereby selecting a voxel that has a relatively small difference from the actual physical position in the dimension of direction, and improving the localization accuracy and drawing quality. The predetermined proportionality factor is preferably greater than 0, based on the above-mentioned distance ratio value being greater than 0.
[0057] To sum up, compared to the prior art, the present invention takes the position of the laser sensor as an observation point, and along the observation direction from this observation point toward the laser point that hits the map, finds out two intersections between the light ray formed from this observation point toward the laser point that hits the three-dimensional grid map and the voxels, which have the meanings of positioning and distance comparison, and determines the voxel grid position that this laser point hits most recently in the map based on the ratio value between the distance between the intersection closest to the observation point and the laser point and the straight-line distance between the above two intersections, and forms a concept of determining the voxel grid position that this laser point hits most recently in the map based on the proximity of the laser point to the surrounding voxels, thereby achieving the acquisition of a spatial distribution position in the three-dimensional grid map with a smaller positioning error from the actual physical position.
[0058] As can be seen from the 3D grid maps of Figures 5 to 6, the voxels in the illustrated 3D grid maps are regularly arranged, and the voxels in the 3D grid maps are arranged in a row-column order in each layer of the z-axis, and point O is the grid position occupied by the laser sensor of the robot. In this embodiment, the neighboring voxels of the predetermined voxel are voxels that have a common edge or a common vertex with the predetermined voxel, so that the voxel S2 in Figures 5 and 6 is the predetermined voxel. Here, the manner in which the laser point is located in the predetermined voxel includes that the laser point is located in a spatial region surrounded by eight faces of the predetermined voxel, and that the laser point is located on one face of the predetermined voxel. Here, the manner in which the laser point is located on one face of the predetermined voxel includes that the laser point is located on one vertex of the predetermined voxel to respond to three-dimensional position information about the scanned object. In the above embodiment, the neighboring voxel in the observation ray direction of the predetermined voxel is one adjacent voxel found along the observation ray direction, which is the starting point for searching for the predetermined voxel, and the observation ray direction is the direction indicated by the arrow of the ray OL shown in Fig. 6, or the observation ray direction is the direction indicated by the arrow of the ray OU shown in Fig. 5. Thereby, a target voxel is found from the peripheral area of the laser point including the voxel position where the laser point is located along the direction of the predetermined observation ray, thereby improving the hit efficiency of the laser point in the three-dimensional grid map.
[0059] Specifically, if the horizontal axis direction number of the acquired predetermined voxel is s0, the vertical axis direction number of the acquired predetermined voxel is h0, and the vertical axis direction number of the acquired predetermined voxel is z0, the neighboring voxels of the predetermined voxel in the 3D grid map are among the voxels whose horizontal axis direction number is in the numerical range [h0-1, h0+1], whose vertical axis direction number is in the numerical range [s0-1, s0+1], and whose vertical axis direction number is in the numerical range [z0-1, z0+1], and if the predetermined voxel is excluded so that there is a voxel whose horizontal axis direction number, vertical axis direction number, and vertical axis direction number match the laser point in the 3D grid map, the remaining voxels are the neighboring voxels of the predetermined voxel, where s0 is an integer, h0 is an integer, and z0 is an integer. Thus, the 3D grid map of FIG. 5 to FIG. 6 is constructed.
[0060] Preferably, in the three-dimensional grid map shown in FIG. 5, the horizontal axis direction number of voxel S2 in which point U in FIG. 5 is located is 4, the vertical axis direction number of voxel S2 in FIG. 5 is 2, the vertical axis direction number of voxel S2 in FIG. 5 is 2, and the vertical axis direction number of voxel S2 in FIG. 5 is 1.
[0061] Preferably, in the three-dimensional grid map shown in Fig. 6, if the voxel where point L in Fig. 6 is located is also voxel S2, the neighboring voxels of voxel S2 in Fig. 5 are voxels other than voxel S2 among voxels whose horizontal axis direction numbers have a numerical range of [3,5], whose vertical axis direction numbers have a numerical range of [1,3], and whose vertical axis direction numbers have a numerical range of [0,2]. Therefore, this embodiment can determine a unique voxel based on the horizontal axis direction numbers, vertical axis direction numbers, and vertical axis direction numbers in the three-dimensional grid map.
[0062] Typically, in the map coordinate system of the 3D grid map, i.e., in the coordinate system of the 3D grid, the coordinates of each voxel are expressed as the coordinates of one vertex of the voxel, including the coordinates of the lower left corner vertex, the coordinates of the upper left corner vertex, the coordinates of the lower right corner vertex, or the coordinates of the upper right corner vertex of the voxel. In some implementations, the coordinates of each voxel are expressed using the coordinates of the center position of the voxel, so that the center position of the voxel is used to represent the actual geographical position of the scanned area. Here, the coordinates of the associated vertex and center position of the voxel represent the horizontal axis number, vertical axis number, and vertical axis number of the voxel in the 3D grid map, where the horizontal coordinate is equal to the horizontal axis number, the vertical coordinate is equal to the vertical axis number, and the vertical coordinate is equal to the vertical axis number. As shown in the 3D grid map of Figures 5 to 6, when traversing voxels from left to right, the corresponding horizontal axis direction number gradually increases, when traversing voxels from front to back, the corresponding vertical axis direction number gradually increases, and when traversing voxels from bottom to top, the corresponding vertical axis direction number gradually increases, thereby ensuring that the path formed by connecting voxels one by one in the 3D grid map is continuous.
[0063] For ease of understanding, in the map coordinate systems shown in Figures 5 to 6, the coordinates of a grid are expressed as the coordinates of the lower left corner vertex of the voxel, and the coordinates of voxel S2 are expressed as the coordinates of vertex T in Figures 5 and 6, so the coordinates of voxel S2 are specifically (4,2,1).
[0064] As a fifth embodiment, as shown in FIG. 5, an observation point is marked as a point O, a laser point collected and converted by a laser sensor is marked as a point U, an observation ray OU is formed from the observation point O toward the laser point U, and if the voxel where the laser point U is located is the predetermined voxel S2, the observation ray OU and the corresponding surface of the predetermined voxel S2 intersect at points V and R. That is, while the observation ray OU and the same voxel intersect at points V and R, the observation ray OU does not overlap any edge of the predetermined voxel. Here, if the distance between point R and the observation point O is greater than the distance between point S and the observation point O, the distance between point R and point V is defined as a first predetermined distance RV, the distance between point V and the laser point U is defined as a second predetermined distance VU, the first predetermined intersection is marked as point R, and the second predetermined intersection is marked as point V. Based on this, a first predetermined intersection point R, a second predetermined intersection point V, and a laser point U located in the same predetermined voxel S2 along the direction of the observation ray OU may be selected, and the first predetermined intersection point R and the second predetermined intersection point V can be understood as mapping points of the laser point U on the intersection plane between the observation ray OU and the voxel S2. In the fifth embodiment, if the value of the ratio between the second predetermined distance VU and the first predetermined distance RV is greater than the predetermined proportionality coefficient, it is determined that the target voxel that the laser point U hits in the direction of the observation ray OU is the neighboring voxel S1 of the predetermined voxel S2 in the direction of the observation ray OU, and is the closest voxel to the laser point U found along the direction of the observation ray OU. Accordingly, in the map coordinate system shown in FIG. 5, when the coordinates of this voxel are expressed as the coordinates of the lower left corner vertex of the voxel, the coordinates of the voxel S2 where the laser point U is located are (4,2,1), and the coordinates of the target voxel S1 where the laser point U hits in the direction of the observation light OU are (4,2,2). In the fifth embodiment, when the value of the ratio between the second predetermined distance VU and the first predetermined distance RV is equal to or less than the predetermined proportionality coefficient, it is determined that the target voxel where the laser point U hits in the direction of the observation light OU is the predetermined voxel S2. Accordingly, in the map coordinate system shown in FIG. 5, when the coordinates of this voxel are expressed as the coordinates of the lower left corner vertex of the voxel, the coordinates of the voxel S2 where the laser point U is located are (4,2,1), and the coordinates of the target voxel where the laser point U hits in the direction of the observation light OU are (4,2,1).This makes it possible to obtain a voxel grid with smaller distance error from the actual physical position in the 3D grid map.
[0065] Based on the above embodiment, when the value of the ratio between the second predetermined distance and the first predetermined distance is greater than the predetermined proportional coefficient, it can be inferred that the direction of the observation ray determines the distribution direction (abbreviated as neighboring voxel direction, including the direction indicated by the arrow of the light beam shown in FIG. 5 to FIG. 6) of the target voxel where the laser point hits the direction of the observation ray with respect to the predetermined voxel where the laser point is located. The neighboring voxel direction may be divided into directions from the predetermined voxel toward 26 neighboring voxels adjacent to its periphery, that is, the neighboring voxel direction is divided into 26 different directions, each direction toward one neighboring voxel. Note that the direction of each of the neighboring voxels can determine the target voxel corresponding to the direction of the observation ray with reference to the embodiment 5 corresponding to FIG. 5, and the drawings and explanations are omitted here, and only adaptive adjustment is made to the related observation ray and voxel in the embodiment 5.
[0066] Preferably, when the laser point is located on a surface of a voxel of a three-dimensional grid map, the laser point is the second predetermined intersection, and in this preferred example, the laser point can only be set to the second predetermined intersection. In this case, the laser point can only be the predetermined intersection closest to the same observation point among two predetermined intersections where the observation ray intersects with the corresponding surface of this voxel (the predetermined voxel). Here, as can be seen from the voxel positioning method disclosed in the above embodiment 5, when the observation ray does not overlap any edge of the voxel, the value of the ratio between the second predetermined distance and the first predetermined distance is equal to 0, and the predetermined proportional coefficient is greater than 0, so that the target voxel that the laser point U hits in the direction of the observation ray OU is the predetermined voxel. Thus, when the laser point hits the surface of a voxel, the first voxel that the observation ray passes through after passing through the laser point is made to be the target voxel, thereby making the distance between the target voxel and the laser point closer. 5, the movement of the position of the laser point U can be understood. When the laser point U hits the position of point V, the observation ray OU intersects with the corresponding surface of the predetermined voxel S2 at points U and R, and the second predetermined intersection point can only be marked as point U, so the first predetermined intersection point is marked as point R, and the distance between point U and point R is defined as the first predetermined distance UR, and the distance between point U and the laser point U is defined as the second predetermined distance, so the second predetermined distance is equal to 0, and the ratio value between the second predetermined distance and the first predetermined distance is equal to 0 and is smaller than the predetermined proportional coefficient. In this case, the predetermined voxel (4,2,1) is selected as the target voxel that the laser point U hits in the direction of the observation ray OU. Here, the predetermined proportional coefficient is greater than 0.
[0067] According to the concept that when the laser point hits the surface of a voxel, the first voxel that the observation ray passes through after passing the laser point is made the target voxel, the movement of the position of the laser point U will be understood with continued reference to Fig. 5. When the laser point U hits the position of point R, the observation ray OU intersects with the corresponding surface of the specified voxel S2 at point U and point V, and the observation ray OU intersects with the corresponding surface of the voxel (4,2,2) at point U and one new point, in this case, the new intersecting point is located on a plane perpendicular to the horizontal plane, and the voxel (4,2,2) is updated to the specified voxel, the second predetermined intersection point is marked as point U, and the first predetermined intersection point is marked as the new intersecting point, and the straight-line distance between the second predetermined intersection point U and the laser point U is equal to 0, so the second predetermined distance is equal to 0. Therefore, the value of the ratio between the second predetermined distance and the first predetermined distance is equal to 0, which is smaller than the predetermined proportional coefficient. In that case, select voxel (4,2,2) as the target voxel that the laser point U hits in the direction of the observation ray OU, where the predetermined proportionality coefficient is greater than 0, voxel (4,2,2) is the voxel with coordinates (4,2,2), and voxel (4,2,1) is the voxel with coordinates (4,2,1).
[0068] As a sixth embodiment, the first and second predetermined intersections are located at the edges of the predetermined voxel, in this case, the first and / or second predetermined intersections may be located at the vertices of the predetermined voxel, so that the target voxel is a voxel that has only one common vertex or one common edge with the predetermined voxel. Specifically, as shown in FIG. 6, an observation point is marked as point O, a laser point acquired by a laser sensor through collection and conversion is marked as point L, and an observation ray OL is formed from the observation point O toward the laser point L, and when the voxel where the laser point L is located is the predetermined voxel, the observation ray OL intersects with the corresponding surface of the predetermined voxel at points I and J, where the observation ray OL intersects with the upper edge of the left side surface of the predetermined voxel at point J, and the observation ray OL intersects with the right side surface of the predetermined voxel at point I. In some embodiments, point I may be located on the lower edge of the right side of the given voxel, but segment IJ is not located on one side of the given voxel. Since the distance between point J and observation point O is greater than the distance between point I and observation point O, the first predetermined intersection is marked as point J, the second predetermined intersection is marked as point I, the distance between point I and point J is defined as the first predetermined distance IJ, and the distance between point I and laser point L is defined as the second predetermined distance IL. Based on this, the first predetermined intersection J, the second predetermined intersection I, and the laser point L located in the same given voxel may be selected along the direction of the observation ray OL, and the first predetermined intersection J and the second predetermined intersection I can be understood as the mapping points of the laser point L on the intersecting surface of the observation ray OL and the corresponding voxel. In Example 6, when the value of the ratio between the second predetermined distance IL and the first predetermined distance IJ is greater than the predetermined proportionality coefficient, it is determined that the target voxel that the laser point L hits in the direction of the observation light OL is a neighboring voxel in the direction of the observation light OL of the specified voxel, and is the voxel closest to the laser point L searched along the direction of the observation light OL, i.e., voxel S3 in Figure 6, which is located to the upper left of the specified voxel S2 and has only one common edge with the specified voxel.Accordingly, in the map coordinate system shown in FIG. 6, if the coordinates of this voxel are expressed by the coordinates of the lower left corner vertex of the voxel, the coordinates of the voxel S2 where the laser point L is located are (4,2,1), and the coordinates of the target voxel that the laser point L hits in the direction of the observation light OL are (3,2,2). In Example 6, when the value of the ratio between the second predetermined distance IL and the first predetermined distance IJ is equal to or less than the predetermined proportionality coefficient, it is determined that the target voxel that the laser point L hits in the direction of the observation light OL is the predetermined voxel, and this target voxel is the voxel where the laser point L was originally located in Figure 6. Accordingly, in the map coordinate system shown in Figure 6, when the coordinates of this voxel are expressed by the coordinates of the lower left corner vertex of the voxel, the coordinates of the voxel S2 where the laser point L is located are (4,2,1), and the coordinates of the target voxel that the laser point L hits in the direction of the observation light OL are (4,2,1).
[0069] To sum up, in the sixth embodiment, the observation ray passes through the edge of the predetermined voxel, specifically, passes through the edge of the predetermined voxel after passing through the laser point, where the laser point is not located on one surface of the predetermined voxel. In this case, the target voxel that the laser point hits in the direction of the observation ray is adjusted to a voxel that has only one common edge with the predetermined voxel, specifically, it may be four neighboring voxels that have the same vertical coordinate and only one common edge with the predetermined voxel, or it may be four neighboring voxels that have the same horizontal coordinate and only one common edge with the predetermined voxel, or it may be four neighboring voxels that have the same vertical coordinate and only one common edge with the predetermined voxel, and the determined target voxel is specified by the direction of the observation ray. Here, each type of target voxel can be determined in a manner corresponding to the sixth embodiment. Specifically, the four neighboring voxels that have the same ordinate coordinates as the specified voxel and have only one common edge include the neighboring voxel to the upper left of the specified voxel (the neighboring voxel with a common edge being the upper edge of the left side of the specified voxel), the neighboring voxel to the upper right of the specified voxel (the neighboring voxel with a common edge being the upper edge of the right side of the specified voxel), the neighboring voxel to the lower left of the specified voxel (the neighboring voxel with a common edge being the lower edge of the left side of the specified voxel), and the neighboring voxel to the lower right of the specified voxel (the neighboring voxel with a common edge being the lower edge of the right side of the specified voxel). The four neighboring voxels having the same horizontal coordinates as the given voxel and sharing only one common edge include a neighboring voxel located in front-lower of the given voxel (a neighboring voxel sharing a common edge with the lower edge of the given voxel's front side), a neighboring voxel located in front-upper of the given voxel (a neighboring voxel sharing a common edge with the upper edge of the given voxel's front side), a neighboring voxel located in rear-upper of the given voxel (a neighboring voxel sharing a common edge with the upper edge of the given voxel's rear side), and a neighboring voxel located in rear-lower of the given voxel (a neighboring voxel sharing a common edge with the lower edge of the given voxel's rear side).The four neighboring voxels having the same vertical coordinate as the specified voxel and having only one common edge include a left front neighboring voxel of the specified voxel (a neighboring voxel with a common edge being the right side of the left side of the specified voxel), a right front neighboring voxel of the specified voxel (a neighboring voxel with a common edge being the left side of the right side of the specified voxel), a left rear neighboring voxel of the specified voxel (a neighboring voxel with a common edge being the left side of the left side of the specified voxel), and a right rear neighboring voxel of the specified voxel (a neighboring voxel with a common edge being the right side of the right side of the specified voxel). This expands the form in which the laser point hits within the corresponding cubic region.
[0070] In the above-mentioned embodiment 6, when the first predetermined intersection and / or the second predetermined intersection are located at the vertex of the predetermined voxel, the movement of the position of the first predetermined intersection J is understood with reference to FIG. 6. The first predetermined intersection J is updated to the vertex position of the same edge, and the observation ray OL intersects with the right side surface of the voxel S2 at point I, and in some embodiments, point I may be located at the lower edge of the right side surface of the predetermined voxel and not at its vertex. The observation ray OL intersects with the upper vertex of the left side surface of the voxel S2 at point J, the distance between point I and point J is defined as a first predetermined distance IJ, the distance between point I and the laser point L is defined as a second predetermined distance IL, and the observation ray OL is directed to and passes through a neighboring voxel having the vertex J of the voxel S2 as a common vertex. When the value of the ratio between the second predetermined distance IL and the first predetermined distance IJ is greater than the predetermined proportional coefficient, it is determined that the target voxel hit by the laser point L in the direction of the observation light OL is a neighboring voxel in the direction of the observation light OL of the predetermined voxel, and is a neighboring voxel having the vertex J of voxel S2 as a common vertex. Therefore, in the sixth embodiment, the observation light passes through the vertex of the predetermined voxel, specifically, passes through the vertex of the predetermined voxel after passing through the laser point, where the laser point is not located on one side of the predetermined voxel. In this case, the target voxel hit by the laser point in the direction of the observation light is adjusted to a voxel having only one common vertex with the predetermined voxel, and the voxel belongs to a neighboring voxel having only one common vertex with the eight vertices of the predetermined voxel. Both can select eight neighboring voxels, specifically, they are selected according to the direction of the observation light. This extends the manner in which the laser point hits the target voxel in the corresponding cubic region, where each type of target voxel can be determined in a manner corresponding to the sixth embodiment, and the description is omitted here.
[0071] In addition, in the above-mentioned Example 6, when the laser point L hits the surface of a voxel, the method of determining the target grid is almost the same as the method of determining the target voxel in the above-mentioned preferred embodiment, so the explanation of the calculation of the value of the predetermined intersection and distance ratio may refer to the above-mentioned Example 5 or 6, and the explanation will be omitted here.
[0072] Example 7 is different from the scene disclosed in Example 5 and Example 6 in that, when the observation ray is located on one surface of a voxel in a three-dimensional grid map, the voxel positioning method is understood by replacing the laser point on the surface of the voxel with reference to Figures 5 and 6. The method includes the following steps:
[0073] When the observation ray does not overlap the edge of a voxel in the three-dimensional grid map, if the laser point is not located at the vertex of this voxel, one of four voxels which have the plane on which the laser point is located as a common plane is selected as the target voxel that the laser point hits in the direction of the observation ray. Specifically, it is determined that the observation ray enters the three-dimensional grid map along the plane of the voxel and passes through the plane of the voxel. After it is determined that the laser point does not hit the vertex of the voxel, the following is performed: In the map coordinate system shown in Figure 5, the coordinates of this voxel are expressed by the coordinates of the lower left corner vertex of the voxel, the horizontal coordinate (horizontal axis direction number) corresponding to the surface of the voxel hit by the laser point is 2, the coordinates of the voxel on the left side of the surface where the laser point is located are (1,1,1), and the coordinates of the voxel on the right side of the surface where the laser point is located are (2,1,1), in this case, the voxel with coordinates (1,1,1) and the voxel with coordinates (2,1,1) can both be the target voxel. Therefore, this embodiment does not need to calculate the ratio value between the corresponding distances according to the intersection points of the observation ray and the same voxel and compare it with a threshold value, and it speeds up the determination of the voxel that the laser point actually hits.
[0074] When the observation ray overlaps with an edge of a voxel in a three-dimensional grid map, if the laser point is not located at a vertex of this voxel, one of four voxels with the edge of the voxel where the laser point is located as a common edge is selected as a target voxel that the laser point hits in the direction of the observation ray. Specifically, it is determined that the observation ray enters the three-dimensional grid map along the edge of a voxel, and after it is determined that the laser point does not hit a vertex of a voxel, the voxel is selected as a target voxel in the map coordinate system shown in FIG. The coordinates of the voxel are expressed by the coordinates of the lower left corner vertex of the voxel, and the coordinates of the four voxels that share the edge of the voxel where the laser point is located as a common edge are (1,0,1), (2,0,1), (2,1,1), and (1,1,1) in counterclockwise order, and since the four voxels are symmetrically distributed and arranged in the three-dimensional grid map with respect to the observation ray, the vertical distances from the observation point to these four voxels are equal, which indicates that the perspective of these four voxels from the observation point is the same and is not affected by the direction of the observation ray. Therefore, one of the four voxels that share the edge of the voxel where the laser point is located as a common edge is selected as the target voxel that the laser point hits in the direction of the observation ray.
[0075] When the laser point is located at the vertex of this voxel, one of the four voxels with the common vertex at the vertex where the laser point is located that is the largest vertical distance from the observation point is selected as the target voxel where the laser point hits the direction of the observation ray, where the observation ray may or may not overlap the edge of the voxel in the three-dimensional grid map. Specifically, when it is determined that the observation ray enters the three-dimensional grid map from one vertex of a voxel, the coordinates of this voxel are represented by the coordinates of the lower left corner vertex of the voxel in the map coordinate system shown in Figure 5, and the coordinates corresponding to the vertex of the voxel where the laser point hits are (1,1,1), and the observation point is located below the XOY coordinate plane so that the direction of the observation ray passes through the vertex (1,1,1) from bottom to top within a specified surface of one voxel, and the vertex (1,1,1) is the vertex of this specified surface. Therefore, the angle at which the observation ray deviates from the positive direction of the Y-axis is greater than 0 degrees and less than 90 degrees, and the plane on which the specified surface is located passes through the coordinates (1,0,0) of the X-axis. Furthermore, among the eight voxels that have the vertex where the laser point is located as a common vertex, when four voxels distributed on one side of the specified surface are symmetrical with respect to the specified surface with respect to the four corresponding voxels on the other side of the specified surface, the distances between the centers of the two voxels and the observation point are equal. The coordinates of the eight voxels that have the vertex where the laser point is located as a common vertex, and the coordinates of the voxels of one layer whose vertical coordinate is 0, are (0,0,0), (1,0,0), (1,1,0), and (0,1,0) in counterclockwise order. The coordinates of the voxels of one layer whose vertical coordinate is 1 are (0,0,1), (1,0,1), (1,1,1), and (0,1,1) in counterclockwise order. Therefore, if the center of a voxel in one layer whose vertical coordinate is 1 is farther from the observation point than the center of a voxel in one layer whose vertical coordinate is 0, the observation ray will tend to extend in the positive direction of the Y axis when positioned within the specified plane, and both the voxel with coordinates (1,1,1) and the voxel with coordinates (0,1,1) can be target voxels that the laser point will hit in the direction of the observation ray.When the observation ray has a tendency to extend in the negative direction of the Y-axis within the specified plane, a voxel with coordinates (0,0,1) and a voxel extending with coordinates (1,0,1) can both be target voxels that the laser point will hit in the direction of the observation ray.
[0076] To summarize the above, in Example 7, assuming that the observation ray is located on one face of one voxel in the 3D grid map, i.e., the observation ray is positioned so that it does not pass through different faces of the same voxel, the target voxel is determined based on the perspective from the observation point, and the selection range of the area related to the target voxel that the laser point will hit is expanded.
[0077] The present invention further discloses a robot, the robot includes a robot body, a running configuration provided on the robot body, a laser sensor provided on the robot body, the laser sensor being used to collect laser information reflected from a scanned object, obtain laser points, and form a laser point cloud, and a controller, the controller being built in the robot body and connected to the laser sensor, the controller including at least one processor and a memory, the memory being communicatively connected to the at least one processor, the memory storing instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the robot to perform the grid positioning method based on the laser observation direction disclosed in the above embodiments including embodiments 1 to 4, and / or the voxel positioning method based on the laser observation direction disclosed in the above embodiments including embodiments 5 to 7. The position indicated by the target grid or target voxel selected by the robot can be made closer to the actual physical position, improving the positioning accuracy and drawing quality.
[0078] The robot is a self-moving robot, including but not limited to laser navigation robots and visual navigation robots. The at least one processor may include a storage program area and a storage data area, where the storage program area stores an operating system and applications required for at least one function, and the storage data area can store coordinate data required for constructing a two-dimensional grid map and a three-dimensional grid map, etc. Furthermore, the at least one processor may include a high-speed random access memory, and may include at least one disk storage device, flash memory device, or other non-volatile solid memory device. In some embodiments, the at least one processor may select a remote control-distributed memory for a processor corresponding to a remote control, and these remote control memories can be connected to the robot by a network. Examples of such networks include, but are not limited to, the Internet, a corporate intranet, a local area network, a mobile communication network, and combinations thereof.
[0079] Based on the above embodiment, the present invention further discloses a chip, which stores computer-executable instructions, which, when executed by the chip, realizes the grid positioning method based on the laser observation direction to obtain a grid in a two-dimensional grid map with a smaller positioning error with respect to an actual physical position, or realizes the voxel positioning method based on the laser observation direction to obtain a voxel in a three-dimensional grid map with a smaller positioning error with respect to an actual physical position.
[0080] The present disclosure may be implemented in software and / or a combination of software and hardware, for example, using an application specific integrated circuit (ASIC), a general purpose computer, or other similar hardware devices. In one embodiment, the software program of the present disclosure may implement the steps or functions described above by a processor. Similarly, the software program of the present disclosure (including associated data structures) may be stored in a computer readable storage medium, such as a RAM memory, a disk, an optical drive, a floppy disk, or a similar device. Furthermore, some steps or functions of the present disclosure may be implemented using hardware, for example, a circuit that cooperates with a processor to perform various steps or functions.
[0081] Furthermore, some of the present disclosure may be applied to a computer program product, such as computer program instructions, which, when executed by a computer, may activate or provide the method and / or technical solution according to the present disclosure by the operation of the computer. The program instructions for activating the method of the present disclosure may be stored in a fixed or removable storage medium, and / or transmitted via a data stream of a broadcast or other signal transmission medium, and / or stored in a working memory of a computer device that operates according to the program instructions. Here, one embodiment of the present disclosure includes an apparatus, which includes a memory used for storing computer program instructions and a processor used for executing the program instructions, and when the computer program instructions are executed by the processor, the apparatus is triggered to perform the method and / or technical solution in the various embodiments described above.
[0082] Finally, the above embodiments are for illustrating the technical solutions of the present invention, and are not intended to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art may make modifications or equivalently replace some or all of the technical features of the technical solutions described in the above embodiments. These modifications or replacements do not cause the essence of the corresponding technical solutions to depart from the technical scope of the embodiments of the present invention. [Explanation of symbols]
[0083] A: 2nd predetermined intersection AB: 1st predetermined distance B: 1st predetermined intersection C: Second predetermined intersection CD: First specified distance D: 1st predetermined intersection DC: 1st predetermined distance F: Vertex F: Laser point I: 2nd predetermined intersection IJ: 1st predetermined distance IJ :Segment IL: 2nd predetermined distance J: Vertex J: 1st predetermined intersection L: Laser point M: Laser point M: 2nd predetermined intersection MA: 2nd predetermined distance MB: 1st predetermined distance N: Laser point NC: 2nd predetermined distance O: Observation point OF: Observation beam OL: Observation beam OM: Observation beam OP: Observation beam OU: Observation beam P: Laser point R: 1st predetermined intersection RV: 1st predetermined distance S1: Target voxel S1: Nearby voxels S2: given voxel S2: Voxel S3: Voxel T: vertex U: 2nd predetermined intersection U: Laser point UR: First specified distance V: Second predetermined intersection VU: 2nd predetermined distance
Claims
1. 1. A method for grid positioning based on a laser observation direction, the method comprising: selecting two predetermined intersection points located on the same predetermined grid as the laser point; Among the two predetermined intersections, the one farthest from an observation point is defined as a first predetermined intersection, and the one closest to the same observation point is defined as a second predetermined intersection, where both the first predetermined intersection and the second predetermined intersection are intersections between an observation ray and a corresponding edge of a predetermined grid; According to a magnitude relationship between a ratio value of the second predetermined distance and the first predetermined distance and a predetermined proportional coefficient, a target grid is determined where the laser point hits in the direction of the observation light, and the laser point forms a most recently hit grid position in the two-dimensional grid map, where the first predetermined distance is a straight-line distance between the first predetermined intersection point and the second predetermined intersection point, and the second predetermined distance is a straight-line distance between the laser point and the second predetermined intersection point; where the observation ray is the ray going from the observation point to the laser point, which does not overlap the edge of the grid, and the observation point is the location where the laser sensor is marked in the 2D grid map. A grid positioning method based on laser observation direction.
2. A method for determining a target grid where a laser point hits in the direction of an observation ray based on a magnitude relationship between a ratio value of the second predetermined distance to the first predetermined distance and a predetermined proportional coefficient, comprising: When the ratio value between the second predetermined distance and the first predetermined distance is greater than a predetermined proportionality coefficient, determining that the target grid that the laser point hits in the direction of the observation ray is a neighboring grid in the direction of the observation ray of the predetermined grid; When a ratio value between the second predetermined distance and the first predetermined distance is equal to or smaller than a predetermined proportionality coefficient, determining that the target grid that the laser point hits in the direction of the observation ray is the predetermined grid; Here, the direction of the observation light is the direction from the observation point toward the laser point, and is used to indicate the laser observation direction extending from the observation point.
2. The grid registration method of claim 1.
3. When the laser point is located at an edge of a grid, the laser point is the second predetermined intersection point, and a ratio value between the second predetermined distance and the first predetermined distance is equal to 0, so that the first grid that the observation beam passes through after passing the laser point is the target grid, and the predetermined proportionality factor is greater than 0; 3. The grid positioning method of claim 2.
4. the first predetermined intersection point and / or the second predetermined intersection point may be located at a vertex of the predetermined grid such that the target grid is a grid having only one common vertex with the predetermined grid; wherein the first predetermined intersection and the second predetermined intersection are located on different edges of the predetermined grid. Grid positioning method according to claim 1 or 3.
5. The grid positioning method includes: when the observation ray overlaps with an edge of a grid in a two-dimensional grid map, if the laser point is not located at a vertex of the grid, selecting one of two grids that share the edge of the grid where the laser point is located as a common edge, as a target grid where the laser point hits in the direction of the observation ray; When the observation ray overlaps with an edge of a grid in a two-dimensional grid map, if the laser point is located at a vertex of this grid, one of two grids farthest from the observation point is selected from among four grids having the vertex at which the laser point is located as a common vertex, as a target grid where the laser point hits in the direction of the observation ray, wherein the two grids farthest from the observation point are two adjacent grids located in the same row or the same column.
2. The grid registration method of claim 1.
6. In the map coordinate system of the two-dimensional grid map, the coordinates of each grid are the coordinates of the lower left corner point of this grid, the coordinates of the upper left corner point of this grid, the coordinates of the lower right corner point of this grid, the coordinates of the upper right corner point of this grid, or the coordinates of the center position of this grid, where the coordinates of the associated corner and center locations of this grid are used to indicate the row and column numbers of this grid in the two-dimensional grid map. Grid positioning method according to any one of claims 1 to 3.
7. The neighboring grid of the predetermined grid is a grid having a common edge or a common vertex with the predetermined grid, A neighboring grid in the direction of the observation light of the given grid is an adjacent grid that is searched for along the direction of the observation light, with the given grid as a starting point; Here, in order to reflect two-dimensional position information of a scanned object, the manner in which the laser point is located on the predetermined grid includes: the laser point is located within an area surrounded by four edges of the predetermined grid; and the laser point is located on one edge of the predetermined grid. Grid positioning method according to claim 2 or 3.
8. When the column number of the obtained specific grid is s0 and the row number of the obtained specific grid is h0, in the two-dimensional grid map, the neighboring grid of the specific grid is among the grids whose row numbers have a numerical range of [h0-1, h0+1] and whose column numbers have a numerical range of [s0-1, s0+1], where s0 is an integer and h0 is an integer.
8. The grid positioning method of claim 7.
9. 1. A method for voxel positioning based on a laser observation direction, the method comprising: selecting two predetermined intersection points located in the same predetermined voxel as the laser point; Among the two predetermined intersections, the one farthest from an observation point is defined as a first predetermined intersection, and the one closest to the same observation point is defined as a second predetermined intersection, where both the first predetermined intersection and the second predetermined intersection are intersections between an observation ray and a corresponding surface of a predetermined voxel; determining a target voxel that the laser point hits in the direction of the observation light according to a magnitude relationship between a ratio value of the second predetermined distance and the first predetermined distance and a predetermined proportionality coefficient, forming a voxel position that the laser point hits most recently in the two-dimensional grid map, where the first predetermined distance is a straight-line distance between the first predetermined intersection point and the second predetermined intersection point, and the second predetermined distance is a straight-line distance between the laser point and the second predetermined intersection point; Here, the observation ray is a ray from the observation point to the laser point, and is configured to pass through different faces of the same voxel, but does not overlap with the edges of the voxel. Wherein, the observation points are the positions where the laser sensor is marked in the three-dimensional grid map, and the laser points are the laser point cloud in the three-dimensional grid map converted from the laser reflection information collected by the laser sensor. A voxel positioning method based on laser observation direction.
10. A method for determining a target voxel that the laser point hits in the direction of an observation ray based on a magnitude relationship between a ratio value of the second predetermined distance to the first predetermined distance and a predetermined proportionality coefficient, comprising: When the ratio value between the second predetermined distance and the first predetermined distance is greater than a predetermined proportionality coefficient, determining that the target voxel hit by the laser point in the direction of the observation ray is a neighboring voxel of the target voxel in the direction of the observation ray; and determining that the target voxel that the laser point hits in the direction of the observation ray is the predetermined voxel when the ratio value between the second predetermined distance and the first predetermined distance is equal to or smaller than a predetermined proportionality coefficient; Here, the direction of the observation light is the direction from the observation point to the laser point.
10. The voxel registration method of claim 9.
11. When the laser point is located on a surface of a voxel of the three-dimensional grid map, the laser point is the second predetermined intersection point, and the ratio value between the second predetermined distance and the first predetermined distance is equal to 0, so that the target voxel that the laser point hits in the direction of the observation ray is the predetermined voxel, where the predetermined proportionality factor is greater than 0; The method of claim 10 .
12. the first predetermined intersection point and / or the second predetermined intersection point are located on an edge of the given voxel such that the target voxel is a voxel having only one common vertex or only one common edge with the given voxel; wherein the first predetermined intersection and the second predetermined intersection are located on different faces of the predetermined voxel. A method for voxel registration according to claim 9 or 10.
13. The voxel positioning method includes, when the observation ray is located on one face of a voxel in a three-dimensional grid map, When the observation ray does not overlap with the edge of a voxel in the three-dimensional grid map, if the laser point is not located at a vertex of the voxel, select one of two voxels that share a common plane with the plane on which the laser point is located, and set it as a target voxel that the laser point hits in the direction of the observation ray; When the observation ray overlaps with an edge of a voxel in a three-dimensional grid map, if the laser point is not located at a vertex of the voxel, one of four voxels that share the edge of the voxel where the laser point is located as a common edge is set as a target voxel that the laser point hits in the direction of the observation ray; When the laser point is located at a vertex of a voxel, the voxel having the largest vertical distance from the observation point is selected from among eight voxels that share the vertex at which the laser point is located as a common vertex, and the voxel is set as a target voxel that the laser point hits in the direction of the observation ray.
10. The voxel registration method of claim 9.
14. In the three-dimensional map coordinate system of the three-dimensional grid map, the coordinates of each voxel are the coordinates of one vertex of the voxel or the coordinates of the center position of the voxel. A method for voxel registration according to any one of claims 9 to 11.
15. The neighboring voxel of the given voxel is a voxel having a common edge or a common vertex with the given voxel, The neighboring voxels of the given voxel in the direction of the observation ray are adjacent voxels that are searched for along the direction of the observation ray, starting from the given voxel; Here, the manner in which the laser point is located at the predetermined voxel includes the manner in which the laser point is located within a spatial region surrounded by eight faces of the predetermined voxel, and the manner in which the laser point is located on one face of the predetermined voxel; Here, the manner in which the laser point is located on one surface of the predetermined voxel includes the manner in which the laser point is located on one vertex of the predetermined voxel. A method for voxel registration according to claim 10 or 11.
16. When the horizontal axis direction number of the acquired specific voxel is s0, the vertical axis direction number of the acquired specific voxel is h0, and the vertical axis direction number of the acquired specific voxel is z0, in a three-dimensional grid map, neighboring voxels of the specific voxel are among voxels whose horizontal axis direction number has a numerical range of [h0-1, h0+1], whose vertical axis direction number has a numerical range of [s0-1, s0+1], and whose vertical axis direction number has a numerical range of [z0-1, z0+1], where s0 is an integer, h0 is an integer, and z0 is an integer.
16. The voxel registration method of claim 15.
17. A robot, the robot comprising: The robot body, A traveling mechanism provided on the robot body; a laser sensor provided on the robot body, for collecting laser information reflected from a scanned object, acquiring laser points, and forming a laser point cloud; a controller that is built into the robot body and connected to the laser sensor; the controller includes at least one processor and a memory, the memory is communicatively connected to the at least one processor, the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the robot to perform the grid positioning method based on a laser observation direction according to any one of claims 1 to 3 and 5, and / or the voxel positioning method based on a laser observation direction according to any one of claims 9 to 11 and 13. robot.
18. A chip, the chip storing computer executable instructions, which, when executed by the chip, realizes the grid positioning method based on a laser observation direction according to any one of claims 1 to 3 and 5, and / or the voxel positioning method based on a laser observation direction according to any one of claims 9 to 11 and 13. Tips.
Citation Information
Patent Citations
A ray detection method and system based on voxel data
CN109783842A
Image generating device and operation support system
JP2015154144A
Information processor, information processing method, and vehicle
JP2017211934A
Mesh Validation
US20200110158A1
Information processing device and mobile robot
WO2020183658A1