Hardware acceleration circuit, chip and robot based on correlation scanning matching algorithm
By using hardware acceleration circuits to perform parallel computation of point cloud rotation transformation and discretization, the computational complexity problem of correlation scanning matching algorithm on embedded platforms is solved, enabling real-time and efficient matching for robot localization and improving the efficiency and accuracy of SLAM algorithm.
Patent Information
- Application Number
- CN202111202200.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-15
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2041-10-15
AI Technical Summary
Existing correlation scanning matching algorithms have high computational complexity in robot SLAM, making them difficult to deploy in real time on embedded computing platforms with limited computing power, thus becoming a bottleneck for robot localization.
The system employs hardware acceleration circuitry, including a memory module, a point cloud processing module, a raster indexing module, and a state machine module. It implements point cloud rotation transformation and discretization in the correlation scanning matching algorithm through hardware, utilizes a pipeline structure to perform parallel computation of the horizontal and vertical coordinate transformations and index probabilities of the point cloud, and combines finite state machine scheduling to reduce software interruptions and improve computational efficiency.
It enables real-time and efficient point cloud matching calculation on embedded platforms, improving the efficiency and accuracy of robot localization and meeting the relocalization requirements of mobile robots.
Smart Images

Figure CN115984346B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of computer accelerators, and more particularly to hardware acceleration circuits, chips, and robots based on correlation scanning matching algorithms. Background Technology
[0002] Currently, in SLAM algorithms for mobile robots based on LiDAR, the correlation scanning matching algorithm is generally used to convert and match the point cloud data collected by LiDAR onto a grid map. The correlation scanning matching algorithm is a probability-based inter-frame matching algorithm for point clouds. It can use a set window as a search template of a certain size in the currently processed grid map, start searching from the predicted pose, traverse all possible grid poses, transform the point cloud from the scanning frame coordinate system (LiDAR coordinate system) to the coordinate system of the currently processed grid map through a transformation matrix, and calculate the occupancy probability of possible grid positions to obtain the score value of the grid position. Then, based on the calculation result of the score value, the robot's accurate localization is completed.
[0003] Correlation Scan Matching (CSM) is one of the most widely used scan matching algorithms. However, real-time scan matching algorithms involve a large number of loop calculations, resulting in extremely high computational complexity. This makes it difficult to deploy on embedded computing platforms with limited computing power, thus becoming a bottleneck for the real-time performance of robot localization. Summary of the Invention
[0004] When executing the aforementioned correlation scanning and matching algorithm on the point cloud set generated by the robot's LiDAR scanning at the software level, a computationally intensive transformation process is required. This invention employs hardware acceleration to speed up the calculation of the probability values of the corresponding grid positions. The specific technical solution is as follows:
[0005] A hardware acceleration circuit based on a correlation scanning matching algorithm is disclosed, wherein the hardware acceleration circuit is electrically connected to a lidar system. The hardware acceleration circuit includes a memory module, a point cloud processing module, a grid indexing module, a state machine module, and an interconnect bus. The memory module, point cloud processing module, grid indexing module, and state machine module all establish data transmission relationships through the interconnect bus. The point cloud processing module, under the control of the state machine module, reads the currently stored point cloud from the memory module and then controls the read point cloud to perform a rotation transformation. The point cloud processing module, under the control of the state machine module, reads the result of the current rotation transformation, then controls the result of the current rotation transformation to perform discretization, sets the discretized result as a discrete point cloud, and then stores the discrete point cloud in the memory module through the interconnect bus. The grid index module, under the control of the state machine module, retrieves discrete point clouds from the memory module, calculates the index value mapping the discrete point clouds to the map storage space according to preset coordinate offset values and search step size, and sets the index value as the read address of the occupancy probability of the corresponding grid point. The memory module has a map storage space for storing the grid map to be searched transmitted from the interconnect bus. The memory module stores a ring of point clouds collected by the LiDAR and preset trigonometric function values. The currently stored point cloud is a ring of point clouds collected by the LiDAR. The occupancy probability of the corresponding grid point is the probability value of the grid point that matches the point cloud in the grid map to be searched after the point cloud processing module has processed the point cloud. In the grid map to be searched, there is a matching index value for the occupancy probability of the grid point.
[0006] This technical solution utilizes a hardware acceleration circuit controlled by a state machine to implement the aforementioned correlation scanning and matching algorithm. Specifically, the calculation of the index value of the occupancy probability of a grid point within the grid map to be searched is broken down into first rotating and transforming the read point cloud, and then discretizing the result of the rotation and transformation. This achieves the scanning and matching of the current frame point cloud and the grid map to be searched, thereby enabling the discrete point cloud coordinates to be transformed into the index value of the probability value of the matching grid point within the grid map to be searched. This index value becomes the index value in the map storage space where the probability value of the grid in the grid map to be searched is located. This allows the CPU to read the occupancy probability of the corresponding grid point in the map storage space based on the index value, which becomes a necessary parameter for the SLAM algorithm, improving the efficiency and accuracy of robot localization.
[0007] On the other hand, when the point cloud processing module is designed as a pipeline structure for coordinate system transformation and the grid indexing module is designed as a pipeline structure for indexing occupancy probabilities, the state machine can schedule the process of the point cloud processing module reading the latest rotated point cloud and the process of the point cloud processing module discretizing the original point cloud to be executed in parallel under a specific clock cycle, or schedule the transformation of the horizontal and vertical coordinates of the point cloud to obtain the discrete results of the horizontal and vertical coordinates at the same time, and also ensure that the indexed occupancy probabilities are shared on the interconnect bus in real time for the CPU to read.
[0008] As a technical solution, the point cloud processing module includes a point cloud rotation submodule; the point cloud rotation submodule includes a first register, a second register, a first pipeline structure, and a second pipeline structure; both the first register and the second register are connected to the first pipeline structure, which, under the control of the state machine module, reads the horizontal coordinates of the currently stored point cloud from the memory module and then controls the read horizontal coordinates of the point cloud to perform rotation transformation; both the first register and the second register are connected to the second pipeline structure, which, under the control of the state machine module, reads the horizontal coordinates of the point cloud from the memory module and then controls the read horizontal coordinates of the point cloud to perform rotation transformation; the second pipeline structure, under the control of the state machine module, reads the horizontal coordinates of the point cloud from the memory module and then controls the read horizontal coordinates of the point cloud to perform rotation transformation. The module reads the ordinate of the currently stored point cloud and then controls the read ordinate of the point cloud to perform a rotation transformation; wherein, the interconnect bus transmits the abscissa of the point cloud to the first register; the abscissa of the point cloud transmitted by the interconnect bus to the first register is derived from the abscissa of the currently stored point cloud; wherein, the interconnect bus caches the ordinate of the point cloud in the second register; the ordinate of the point cloud transmitted by the interconnect bus to the second register is derived from the ordinate of the currently stored point cloud; wherein, the first pipeline structure and the second pipeline structure are parallel pipeline structures.
[0009] Further, the first pipeline structure includes a first point cloud multiplier, a second point cloud multiplier, and a point cloud subtractor; both the first and second point cloud multipliers are multipliers, and the point cloud subtractor is a subtractor; the first input of the first point cloud multiplier is connected to the output of the first register; the second input of the first point cloud multiplier is used to receive the cosine function value corresponding to the rotation angle reached in the current rotation transformation, wherein the rotation angle reached in the current rotation transformation is the sum of the angle search step size and the rotation angle reached in the previous rotation transformation; the second... The first input of the point cloud multiplier is connected to the output of the second register; the second input of the second point cloud multiplier is used to receive the sine function value corresponding to the rotation angle reached in the current rotation transformation; the first input of the point cloud subtractor is connected to the output of the first point cloud multiplier, and the second input of the point cloud subtractor is connected to the output of the second point cloud multiplier; the point cloud subtractor is used to transmit the output difference to the point cloud discrete submodule, and set the output difference of the point cloud subtractor as the x-coordinate result of the current rotation transformation output by the first pipeline structure.
[0010] Further, the second pipeline structure includes a third point cloud multiplier, a fourth point cloud multiplier, and a point cloud adder; the third and fourth point cloud multipliers are both multipliers, and the point cloud adder is an adder; the first input of the third point cloud multiplier is connected to the output of the first register; the second input of the third point cloud multiplier is used to receive the sine function value corresponding to the rotation angle reached in the current rotation transformation; wherein, the rotation angle reached in the current rotation transformation is the sum of the angle search step size and the rotation angle reached in the previous rotation transformation; the fourth... The first input of the point cloud multiplier is connected to the output of the second register; the second input of the fourth point cloud multiplier is used to receive the cosine function value corresponding to the rotation angle reached by the current rotation transformation; the first input of the point cloud adder is connected to the output of the third point cloud multiplier, and the second input of the point cloud adder is connected to the output of the fourth point cloud multiplier; the point cloud adder is used to transmit the output sum to the point cloud discrete submodule, and set the output sum of the point cloud adder as the ordinate result of the current rotation transformation output by the second pipeline structure.
[0011] The two aforementioned technical solutions use a rotation matrix as the basic operational architecture. They construct a parallel pipeline structure that simultaneously rotates and transforms the x-coordinate and y-coordinate of the point cloud using only adders, subtractors, and multipliers. This structure receives and processes the trigonometric function values corresponding to the step rotation angles pre-calculated by the software. This not only eliminates the need for a hardware trigonometric function calculation module but also controls the point cloud rotation submodule to iteratively execute the rotation transformation based on the step rotation, obtaining the rotated x-coordinate and y-coordinate. These values are then provided to the point cloud discretization submodule to accelerate the discretization operation.
[0012] As a technical solution, the point cloud processing module further includes a point cloud discretization submodule; the point cloud discretization submodule includes a third pipeline structure; the third pipeline structure is used, under the control of the state machine module, to read the horizontal coordinate result of the current rotation transformation output by the first pipeline structure, then control the horizontal coordinate result of the current rotation transformation to perform discretization, then set the discretization result as the horizontal coordinate value of the discrete point cloud, and then store the horizontal coordinate value of the discrete point cloud in the memory module through the interconnect bus.
[0013] Further, the third pipeline structure includes a first discrete adder, a first discrete subtractor, and a first discrete multiplier; the first discrete adder is an adder, the first discrete subtractor is a subtractor, and the first discrete multiplier is a multiplier; the first input of the first discrete adder is connected to the output of the point cloud subtractor in the first pipeline structure, and the first input of the first discrete adder is used to receive the horizontal coordinate result of the current rotation transformation; the second input of the first discrete adder is used to receive the horizontal coordinate of the robot position transmitted from the interconnect bus, wherein the horizontal coordinate of the robot position is a pre-calculated horizontal axis coordinate value of the robot in the world coordinate system; the first discrete adder is used to control the addition of the horizontal coordinate result of the current rotation transformation to the horizontal coordinate of the robot position, and then output the sum, so that the sum becomes the point cloud transformation value. The first discrete subtractor is connected to the output of the first discrete adder; the second input of the first discrete subtractor is used to receive the maximum horizontal coordinate value of the map transmitted from the interconnect bus; the first input of the first discrete multiplier is connected to the output of the first discrete subtractor; the second input of the first discrete multiplier is used to receive the reciprocal of the map resolution transmitted from the interconnect bus; the first discrete multiplier is used to output the product value obtained by multiplication to the memory module through the interconnect bus; the product value output by the first discrete multiplier is configured as the horizontal coordinate value of the discrete point cloud, and the discretization of the horizontal coordinate is completed, realizing the alignment of the horizontal coordinate value of the currently stored point cloud to the coordinate system of the raster map to be searched, and at the same time setting the product value output by the first discrete multiplier as the discretization result output by the third pipeline structure.
[0014] Furthermore, the point cloud discretization submodule also includes a fourth pipeline structure; the fourth pipeline structure is used, under the control of the state machine module, to read the ordinate result of the current rotation transformation output by the second pipeline structure, then control the ordinate result of the current rotation transformation to perform discretization, then set the discretization result as the ordinate value of the discrete point cloud, and then store the ordinate value of the discrete point cloud in the memory module through the interconnect bus.
[0015] Further, the fourth pipeline structure includes a first discrete subtractor, a second discrete adder, and a second discrete multiplier; all second discrete adders are adders, all second discrete subtractors are subtractors, and all second discrete multipliers are multipliers; the first input of the second discrete adder is connected to the output of the point cloud adder in the second pipeline structure, and the first input of the second discrete adder is used to receive the ordinate result of the current rotation transformation; the second input of the second discrete adder is used to receive the ordinate of the robot position transmitted from the interconnect bus, wherein the ordinate of the robot position is a pre-calculated ordinate value of the robot's vertical axis in the world coordinate system; the second discrete adder is used to control the addition of the ordinate result of the current rotation transformation to the ordinate of the robot position, and then output the sum, so that the sum becomes the point cloud transformation result. The vertical axis coordinates are converted to the world coordinate system; the first input of the second discrete subtractor is connected to the output of the second discrete adder; the second input of the second discrete subtractor is used to receive the maximum vertical coordinate value of the map transmitted from the interconnect bus; the first input of the second discrete multiplier is connected to the output of the second discrete subtractor; the second input of the second discrete multiplier is used to receive the reciprocal of the map resolution transmitted from the interconnect bus; the product value output by the second discrete multiplier is configured as the vertical coordinate value of the discrete point cloud, thus completing the discretization of the vertical coordinates, aligning the vertical coordinate values of the currently stored point cloud to the coordinate system of the raster map to be searched, and setting the product value output by the second discrete multiplier as the discretization result output by the fourth pipeline structure; the second discrete multiplier is also used to output the product value obtained by multiplication to the memory module through the interconnect bus.
[0016] The technical solutions of the third and fourth pipeline structures described above, for each point cloud, read the horizontal and vertical coordinates from the storage space where the point cloud is stored, input them into the point cloud discretization submodule, and transform the horizontal and vertical coordinates of the point cloud from the laser coordinate system to the coordinate system of the raster map to be searched along the adaptive coordinate axis directions with the same offset through adders and subtractors. This includes swapping the coordinate axes of the point cloud to achieve coordinate system transformation. Then, multiply by the reciprocal of the map resolution, and complete the discretization processing of the horizontal and vertical coordinates of the point cloud through a hardware-based pipeline.
[0017] As a technical solution, the raster indexing module includes a fifth pipeline structure; the fifth pipeline structure includes a first index subtractor and a first index adder, wherein the first index subtractor is a subtractor and the first index adder is an adder; the first input terminal of the first index subtractor is used to receive the horizontal coordinate of the discrete point cloud transmitted from the interconnect bus; the second input terminal of the first index subtractor is used to receive the horizontal axis coordinate offset value transmitted from the interconnect bus; wherein the preset coordinate offset value includes the horizontal axis coordinate offset value; the first input terminal of the first index adder is connected to the output terminal of the first index subtractor; the second input terminal of the first index adder is used to receive the horizontal axis coordinate search step size transmitted from the interconnect bus; wherein the search step size includes the horizontal axis coordinate search step size; the sum value output by the first index adder is configured as the horizontal axis direction index value of the discrete point cloud mapped to the map storage space, and set as the result output by the fifth pipeline structure.
[0018] Further, the raster indexing module includes a sixth pipeline structure; the sixth pipeline structure includes a second index subtractor and a second index adder; wherein, the second index subtractor is a subtractor and the second index adder is an adder; the first input of the second index subtractor is used to receive the ordinate of the discrete point cloud transmitted from the interconnect bus, wherein the ordinate of the discrete point cloud transmitted to the second index subtractor by the interconnect bus originates from the memory module; the second input of the second index subtractor is used to receive the ordinate offset value transmitted from the interconnect bus; wherein, the preset coordinate offset value includes the ordinate offset value; the first input of the second index adder is connected to the output of the second index subtractor; the second input of the second index adder is used to receive the ordinate search step size transmitted from the interconnect bus; wherein, the search step size includes the lateral axis search step size; the sum output by the second index adder is configured as the ordinate direction index value of the discrete point cloud mapped to the map storage space, and is set as the result output by the sixth pipeline structure.
[0019] The aforementioned fifth pipeline structure and the aforementioned sixth pipeline structure are parallel within the same grid index module. By using an addition and subtraction operation combination structure, the horizontal axis index value and the vertical axis index value mapped to the map storage space are calculated respectively, thereby converting the horizontal and vertical coordinates of the discrete point cloud into discrete index information of the grid points currently participating in the search of the grid map to be searched.
[0020] Furthermore, the raster indexing module also includes a third index adder and an index multiplier. The third index adder is an adder, and the index multiplier is a multiplier. The first input of the index multiplier is connected to the output of the second index adder. The second input of the index multiplier is used to receive the number of row grids transmitted from the interconnect bus, wherein the number of row grids is the number of grids that each row of the map storage space can occupy. The first input of the third index adder is connected to the output of the first index adder, and the second input of the third index adder is connected to the output of the index multiplier. The third index adder is used to control the product of the number of row grids and the sum output by the second index adder to the horizontal axis index value, and then set the sum obtained as the index value of the discrete point cloud mapped to the map storage space, and send it to the interconnect bus. The index value of the occupancy probability of the discrete point cloud mapped to the grid point is calculated by querying line by line. This index value is also used as the index value mapped to the map storage space. It is equivalent to the storage address of the occupancy probability of the point cloud in the map storage space, and equivalent to the read address of the occupancy probability stored in the map storage space, so that the interconnect bus can read the occupancy probability from the memory module.
[0021] Furthermore, the raster indexing module also includes a third index adder and an index multiplier. The third index adder is an adder, and the index multiplier is a multiplier. The first input of the index multiplier is connected to the output of the first index adder. The second input of the index multiplier is used to receive the number of column grids transmitted from the interconnect bus. The number of column grids is the number of grids that each column of the map storage space can occupy. The first input of the third index adder is connected to the output of the second index adder, and the second input of the third index adder is connected to the output of the index multiplier. The third index adder is used to control the product of the number of column grids and the sum of the output of the first index adder to the index value in the vertical axis direction, and then set the sum as the index value of the discrete point cloud in the map storage space and send it to the interconnect bus. The index value of the occupancy probability of the discrete point cloud mapped to the grid point is calculated by querying column by column. This index value is also used as the index value mapped to the map storage space. It is equivalent to the storage address of the occupancy probability of the point cloud in the map storage space, and equivalent to the read address of the occupancy probability stored in the map storage space, so that the interconnect bus can read the occupancy probability from the memory module.
[0022] As a technical solution, the state machine module is a type of finite state machine. The state machine module is used to schedule the working states of the memory module, the point cloud processing module, and the raster indexing module, so that each time the point cloud processing module performs a rotation transformation and a discretization, the raster indexing module calculates the index value of a matching raster point of a point cloud in the raster map to be searched, and determines that a matching operation has been completed. Herein, the index value is the index value of the probability value of the point cloud at a matching raster point in the raster map to be searched.
[0023] Furthermore, the point cloud processing module is also used to update the currently stored point cloud with the result of the current rotation transformation after each matching operation or each rotation transformation is performed, so that the point cloud processing module only uses the updated currently stored point cloud to perform a new rotation transformation until the index value of the occupancy probability corresponding to all currently collected point clouds is calculated.
[0024] In the two technical solutions of the state machine module, the state machine module controls the point cloud processing module to perform a rotation and a discretization process on each point cloud sequentially by means of hardware scheduling of working state and interrupt signals, so as to read the occupancy probability matching the index value from the memory module, realize the operation of the cyclic state, and ensure the real-time performance of the hardware acceleration circuit in searching the map position.
[0025] As a technical solution, the hardware acceleration circuit is externally equipped with a bus interface module, which includes a DMA controller module and a transmission bus. The DMA controller module is used to continuously transmit data stored in non-contiguous physical memory spaces in batches, reducing the number of CPU software interrupts. The transmission bus includes a first bus and a second bus. The first bus has signal transmission and reception connections with the memory module, point cloud processing module, grid index module, state machine module, interconnect bus, and DMA controller module, respectively. The first bus is used to configure data transmission parameters for the DMA controller module and also to configure the parameter registers internally set by the hardware acceleration circuit. The second bus is connected to the DMA controller module and is used to transmit to the memory module the grid map to be searched pre-built by the CPU, the pre-configured sine function value at the corresponding rotation angle, the pre-configured cosine function value at the corresponding rotation angle, and the point cloud currently collected by the LiDAR. The transmission bus follows the AMBA protocol. This technical solution provides a bus interface architecture module for the hardware acceleration circuit and the CPU. Based on the data transmission performance, a first bus suitable for simple, low-throughput memory-mapped communication and a second bus for high-speed data streams are designed to improve the real-time performance of the hardware acceleration circuit.
[0026] A chip that integrates the aforementioned hardware acceleration circuitry. When the processor unit, bus interface, and hardware acceleration circuitry are integrated onto the same chip, the chip constitutes a heterogeneous chip.
[0027] A robot, internally equipped with the aforementioned chip, is used for localization in a pre-constructed grid map. This solution addresses the grid map relocalization problem on embedded mobile robot platforms. Compared to existing technologies where robots execute correlation scanning and matching algorithms via purely software platforms, this solution offers a significant speed advantage even with relatively low frequencies of the hardware acceleration circuit, effectively meeting the relocalization requirements of mobile robot platforms. Attached Figure Description
[0028] Figure 1 This is a schematic diagram of a hardware acceleration circuit based on a correlation scanning matching algorithm disclosed in an embodiment of the present invention. Detailed Implementation
[0029] The technical solutions of the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. To further illustrate the embodiments, the present invention provides accompanying drawings. These drawings are part of the disclosure of the present invention, mainly used to illustrate the embodiments, and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments.
[0030] One embodiment of the present invention discloses a hardware acceleration circuit based on a correlation scanning matching algorithm; the hardware acceleration circuit is electrically connected to a lidar; the hardware acceleration circuit includes a memory module, a point cloud processing module, a raster indexing module, a state machine module, and an interconnect bus; the memory module, point cloud processing module, raster indexing module, and state machine module all establish data transmission relationships through the interconnect bus; the pipeline structure set inside the point cloud processing module and the pipeline structure set inside the node search module are parallel; the interconnect bus, as the interconnection structure of the hardware acceleration circuit, plays the role of data transmission and data sharing between the various circuit modules inside the hardware acceleration circuit, so that the point cloud processing module, raster indexing module, and state machine control module are all connected to the memory space of the memory module through the interconnection structure, and the interconnect bus communicates and transmits data with the CPU or an external bus through the bus interface set by the hardware acceleration circuit; wherein, the state machine control module, as a finite state machine, is configured as a control unit in the hardware acceleration circuit for scheduling the data transmission of the interconnect bus.
[0031] The point cloud processing module, under the control of the state machine module, also reads the currently stored point cloud from the memory module and then controls the read point cloud to perform rotation transformation. The currently stored point cloud is a batch of point clouds that have undergone correlation scanning and matching operations in the hardware acceleration circuit; this is simply referred to as the currently processed batch of point clouds. The number of loops in the working state scheduled by the state machine control module is the number of these point clouds. Specifically, it is from... Figure 1 The existing point cloud is read within the box marked "Point Cloud". The read point cloud is then controlled to perform a rotation transformation to achieve coverage of the angle search range of the search window by a preset angle search step. The result of the rotation transformation is then updated to the current batch of point clouds. The updated point cloud is then used to perform the next rotation transformation. Thus, this embodiment optimizes the rotation transformation of the currently read point cloud into a step rotation, ensuring that the angle of each rotation is obtained by rotating the angle obtained in the previous rotation by a preset angle search step, so that the rotation transformation does not always return to the initial angle position.
[0032] The point cloud processing module, under the control of the state machine module, reads the result of the current rotation transformation (the latest batch of point clouds being processed), then controls the result of the current rotation transformation to perform discretization, including offset transformation of the horizontal and vertical coordinate values and scaling adjustment of the map resolution. The discretized result is then set as a discrete point cloud, falling into the coordinate system of a pre-expanded raster map, thus aligning the currently processed batch of point clouds to the coordinate system of the raster map to be searched. The discrete point cloud is then stored in the memory module via the interconnect bus. It is important to emphasize that each matching process in the correlation scan matching of the point cloud to the raster map to be searched includes one rotation transformation and one discretization to obtain a discrete point cloud, that is, discretizing the point cloud onto the coordinate system (raster coordinate system) of the raster map to be searched. Discretization includes coordinate translation and resolution transformation. The currently stored point cloud, i.e., Figure 1 The point cloud contained within the boxes marked "PointCloud" originates from LiDAR data collection. It should be noted that within the aforementioned grid map, the value within each grid cell represents the probability that the cell is occupied. The process of aligning the point cloud to the grid map to be searched can be understood as: the point cloud scanned by the LiDAR, used to represent obstacles, is rotated and translated to the obstacle grid cells within the grid map to be searched. Preferably, the point cloud processing unit calls the associated computing unit to perform the rotation and translation to achieve overlap between the point cloud and the obstacle, improving robustness.
[0033] The grid index module, under the control of the state machine module, retrieves discrete point clouds from the memory module, calculates the index value mapping the discrete point clouds to the map storage space according to preset coordinate offset values and search step size, and sets the index value as the read address of the occupancy probability of the corresponding grid point. The search step size is the number of grid searches required for each pose search within the same search window. A node currently searched in the search window corresponds to a grid point transformed from the currently read point cloud based on the pose parameters of the search window. Each time the point cloud processing module performs discretization, the grid index module performs an accumulation operation to obtain the probability value contained in the currently searched grid point, which is used as the score value of that grid point.
[0034] The memory module includes a map storage space for storing the grid map to be searched transmitted from the interconnect bus; the memory module also stores a ring of point cloud acquired by the lidar and pre-set trigonometric function values; the occupancy probability of each grid point matched by the point cloud in the grid map to be searched has a matching index value; those skilled in the art, based on their understanding of the grid map constructed from the lidar point cloud, can easily understand that: the occupancy probability of the corresponding grid point is the occupancy probability of the grid point matched by the point cloud in the grid map, and there is a matching index value; the occupancy probability of the corresponding grid point is also the probability value of the matched grid point being occupied after the point cloud is converted into a grid in the grid map to be searched by the point cloud processing module.
[0035] It should be noted that the memory module described in the above embodiments is essentially a storage medium. This storage medium can be, but is not limited to, read-only memory (ROM), random access memory (RAM), or any other storage medium capable of storing program code. The point cloud processing module, raster indexing module, and state machine module disclosed in these embodiments can all be, but are not limited to, digital circuit modules compiled by the designer using the hardware description language VerilogHDL, or digital circuit modules drawn or compiled by the designer using software with circuit drawing or compilation capabilities. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing module, or each unit can exist physically separately, or two or more units can be integrated into one module.
[0036] This embodiment utilizes a hardware acceleration circuit controlled by a state machine to implement the correlation scanning and matching algorithm mentioned in the background technology. Specifically, the calculation of the index value of the occupancy probability of a grid point in the grid map to be searched is decomposed into first rotating and transforming the read point cloud, and then discretizing the result of the rotation and transformation. This completes the scanning and matching of the current frame point cloud and the grid map to be searched, thereby enabling the discrete point cloud coordinates to be transformed into the index value of the probability value of the matching grid point in the grid map to be searched. This index value becomes the index value in the map storage space where the probability value of the grid in the grid map to be searched is located. This allows the CPU to read the occupancy probability of the map grid in the map storage space based on the index value, which becomes a necessary parameter for the SLAM algorithm, improving the efficiency and accuracy of robot localization.
[0037] On the other hand, when the point cloud processing module is designed as a pipeline structure for coordinate system transformation and the grid indexing module is designed as a pipeline structure for indexing occupancy probability values, the state machine can schedule the process of the point cloud processing module reading the latest rotated point cloud and the process of the point cloud processing module discretizing the original point cloud to be executed in parallel under a specific clock cycle, or schedule the transformation of the horizontal and vertical coordinates of the point cloud at the same time and obtain the discrete results of the horizontal and vertical coordinates. It also ensures that the indexed occupancy probability is shared on the interconnect bus in real time so that the CPU can read it.
[0038] As one example, such as Figure 1 As shown, the point cloud processing module includes a point cloud rotation submodule; the point cloud rotation submodule includes a first register, a second register, a first pipeline structure, and a second pipeline structure; both the first register and the second register are connected to the first pipeline structure, which, under the control of the state machine module, reads the currently stored horizontal coordinates of the point cloud from the memory module and then controls the read horizontal coordinates of the point cloud to perform rotation transformation; both the first register and the second register are connected to the second pipeline structure, which, under the control of the state machine module, reads the horizontal coordinates of the point cloud from the memory module... The system reads the ordinate of the currently stored point cloud and then controls the read ordinate of the point cloud to perform a rotation transformation; wherein, the interconnect bus transmits the abscissa of the point cloud to a first register; the abscissa of the point cloud transmitted by the interconnect bus to the first register is derived from the abscissa of the currently stored point cloud; wherein, the interconnect bus caches the ordinate of the point cloud in a second register; the ordinate of the point cloud transmitted by the interconnect bus to the second register is derived from the ordinate of the currently stored point cloud; wherein, the first pipeline structure and the second pipeline structure are parallel pipeline structures.
[0039] As an embodiment of the first pipeline structure, the first pipeline structure includes a first point cloud multiplier, a second point cloud multiplier, and a point cloud subtractor; both the first and second point cloud multipliers are multipliers, and are characterized as follows: Figure 1 The point cloud rotation submodule is marked with " The circle; the point cloud subtractor is a subtractor, which is represented as Figure 1 The point cloud rotation submodule contains circles marked with "-".
[0040] The first input of the first point cloud multiplier is connected to the output of the first register; wherein, the interconnect bus transmits the horizontal coordinate of the point cloud to the input of the first register; the horizontal coordinate of the point cloud transmitted to the first register by the interconnect bus is derived from the horizontal coordinate of the currently stored point cloud; Figure 1 In the embodiment shown, the first input terminal of the first point cloud multiplier (in Figure 1 Within the point cloud rotation submodule, the first multiplier (arranged from top to bottom) and the register (marked) The output of the box is connected to the register. It is the first register.
[0041] The second input of the first point cloud multiplier is used to receive the cosine function value corresponding to the rotation angle achieved in the current rotation transformation. The rotation angle achieved in the current rotation transformation is the sum of the angle search step size and the rotation angle achieved in the previous rotation transformation. It originates from the rotation angle and its corresponding cosine function value obtained from the step rotation operation executed at the CPU or software level, avoiding increased complexity of the hardware unit due to trigonometric function operations and preventing hardware transmission delays. Preferably, the cosine function value transmitted from the interconnect bus can be stored in a register inside the point cloud rotation submodule, and the second input of the first point cloud multiplier receives the cosine function value transmitted from the interconnect bus through a connected register. Figure 1 In the illustrated embodiment, the second input of the first point cloud multiplier is connected to the output of the COS register (a box marked with COS). The COS register is used to buffer the cosine function value transmitted from the interconnect bus, and then transmit the currently buffered cosine function value to the second input of the first point cloud multiplier. The first point cloud multiplier controls the multiplication of the x-coordinate of the point cloud received at its first input with the cosine function value corresponding to the rotation angle achieved by the current rotation transformation received at its second input, and then outputs the product. The angle search step size is stored in the search window parameter register; the search window parameter register is a parameter register internally set in the hardware acceleration circuit, used to store the pose and associated step search information included in the search window.
[0042] The first input of the second point cloud multiplier is connected to the output of the second register; wherein, the interconnect bus caches the ordinate of the point cloud in the second register; the ordinate of the point cloud transmitted by the interconnect bus to the second register is derived from the ordinate of the currently stored point cloud; Figure 1 In the embodiment shown, the first input terminal of the second point cloud multiplier (in) Figure 1 Within the point cloud rotation submodule, the second multiplier (arranged from top to bottom) and registers (marked) The output of the box is connected to the register. It is the second register.
[0043] The second input of the second point cloud multiplier is used to receive the sine function value corresponding to the rotation angle achieved in the current rotation transformation. The rotation angle achieved in the current rotation transformation is the sum of the angle search step size and the rotation angle achieved in the previous rotation transformation. It originates from the rotation angle and its corresponding sine function value obtained from the step rotation operation executed at the CPU or software level, avoiding increased complexity of the hardware unit due to trigonometric function operations and preventing hardware transmission delays. Preferably, the sine function value transmitted from the interconnect bus can be stored in a register inside the point cloud rotation submodule, and the second input of the second point cloud multiplier receives the sine function value transmitted from the interconnect bus through a connected register. Figure 1 In the illustrated embodiment, the second input of the second point cloud multiplier is connected to the output of the register SIN (the box marked with SIN). The register SIN is used to buffer the sine function value transmitted from the interconnect bus, and then transmit the currently buffered sine function value to the second input of the second point cloud multiplier. The second point cloud multiplier controls the multiplication of the ordinate of the point cloud received at its first input with the sine function value corresponding to the rotation angle achieved by the current rotation transformation received at its second input, and then outputs the product.
[0044] The first input of the point cloud subtractor is connected to the output of the first point cloud multiplier, and the second input of the point cloud subtractor is connected to the output of the second point cloud multiplier. The point cloud subtractor controls the subtraction of the product value output by the first point cloud multiplier and the product value output by the second point cloud multiplier, outputs the difference obtained by subtraction, and sets it as the abscissa value of the rotated point cloud obtained after the current rotation transformation. The point cloud subtractor transmits the output difference to the point cloud discrete submodule and sets the difference output by the point cloud subtractor as the abscissa result of the current rotation transformation output by the first pipeline structure, so that the rotation transformation can be executed next time.
[0045] As an embodiment of the second pipeline structure, the second pipeline structure includes a third point cloud multiplier, a fourth point cloud multiplier, and a point cloud adder; the third and fourth point cloud multipliers are both multipliers, and their behavior is as follows: Figure 1 The point cloud rotation submodule is marked with " The circle; the point cloud adder is an adder, which is represented as Figure 1 The point cloud rotation submodule contains circles marked with "+".
[0046] The first input of the third point cloud multiplier is connected to the output of the first register. The third point cloud multiplier is used to receive the x-coordinate of the point cloud output by the first register. Figure 1 In the embodiment shown, the first input terminal of the third point cloud multiplier (in) Figure 1 Within the point cloud rotation submodule, the third multiplier (arranged from top to bottom) and the register (marked) Connect to one of the output terminals of the box.
[0047] The second input of the third point cloud multiplier is used to receive the sine function value corresponding to the rotation angle achieved in the current rotation transformation; wherein, the rotation angle achieved in the current rotation transformation is the sum of the angle search step size and the rotation angle achieved in the previous rotation transformation; preferably, the sine function value transmitted from the interconnect bus can be stored in the register inside the point cloud rotation submodule, and the second input of the second point cloud multiplier receives the sine function value transmitted from the interconnect bus through the connected register. Figure 1 In the illustrated embodiment, the second input of the second point cloud multiplier is connected to the output of the register SIN (marked with a box labeled SIN). The register SIN is used to buffer the sine function value transmitted from the interconnect bus, and then transmits the currently buffered sine function value to the second input of the third point cloud multiplier. The third point cloud multiplier controls the multiplication of the ordinate of the point cloud currently transmitted from the interconnect bus with the sine function value corresponding to the rotation angle achieved in the current rotation transformation, and then outputs the product.
[0048] The first input of the fourth point cloud multiplier is connected to the output of the second register, and is used to receive the ordinate of the point cloud output by the second register; Figure 1 In the embodiment shown, the first input terminal of the fourth point cloud multiplier (in) Figure 1 Within the point cloud rotation submodule, the fourth multiplier (arranged from top to bottom) and the register (marked) Connect to one of the output terminals of the box.
[0049] The second input of the fourth point cloud multiplier is used to receive the cosine function value corresponding to the rotation angle achieved by the current rotation transformation; in Figure 1 In the illustrated embodiment, the second input of the fourth point cloud multiplier is connected to the output of the register COS (the box marked with COS). The register COS is used to buffer the cosine function value transmitted from the interconnect bus, and then transmit the currently buffered cosine function value to the second input of the fourth point cloud multiplier. The fourth point cloud multiplier controls the multiplication of the ordinate of the point cloud received at its first input with the cosine function value corresponding to the rotation angle achieved by the current rotation transformation received at its second input, and then outputs the product.
[0050] The first input of the point cloud adder is connected to the output of the third point cloud multiplier, and the second input of the point cloud adder is connected to the output of the fourth point cloud multiplier. The first input of the point cloud adder is used to receive the product value output by the third point cloud multiplier. The second input of the point cloud adder is used to receive the product value output by the fourth point cloud multiplier. The point cloud adder is used to control the addition of the product value output by the third point cloud multiplier and the product value output by the fourth point cloud multiplier, and then outputs the sum value, setting it as the ordinate value of the rotated point cloud obtained after the current rotation transformation. The point cloud adder is also used to transmit the output difference to the point cloud discrete submodule, and set the sum value output by the point cloud adder as the ordinate value of the current rotation transformation output by the second pipeline structure, so as to execute the rotation transformation next time.
[0051] In the embodiments of the first and second pipeline structures, the clock cycle delay of the output results of both the first and second pipeline structures depends on the number of pipeline stages, specifically the number of cascaded computational units used within each pipeline structure. The embodiments of the first and second pipeline structures use a rotation matrix as the basic operational architecture, employing only adders, subtractors, and multipliers to construct a parallel pipeline structure that simultaneously rotates and transforms the x-coordinate and y-coordinate of the point cloud. This structure receives and processes the trigonometric function values corresponding to the pre-calculated step rotation angles, eliminating the need for a trigonometric function hardware calculation module. Furthermore, it controls the point cloud rotation submodule to iteratively execute the rotation transformation based on the step rotation, obtaining the rotated x-coordinate and y-coordinate, which are then provided to the point cloud discretization submodule to accelerate the discretization operation.
[0052] As one embodiment, the point cloud processing module further includes a point cloud discretization submodule; the point cloud discretization submodule includes a third pipeline structure; the third pipeline structure is used, under the control of the state machine module, to read the horizontal coordinate result of the current rotation transformation output by the first pipeline structure (essentially the output result of the first pipeline structure under a specific clock cycle), then control the horizontal coordinate result of the current rotation transformation to perform discretization, then set the discretization result as the horizontal coordinate value of the discrete point cloud, and then store the horizontal coordinate value of the discrete point cloud in the memory module through the interconnect bus.
[0053] The third pipeline structure includes a first discrete adder, a first discrete subtractor, and a first discrete multiplier; the first discrete adder is a type of adder, in... Figure 1 In the discrete point cloud submodule, circles are marked with "+"; the first discrete subtractor is a subtractor, which is manifested in... Figure 1 The point cloud discrete submodule is marked with a "-" circle; the first discrete multiplier belongs to the multipliers and is represented as follows. Figure 1 The point cloud discrete submodule is marked with " A circle.
[0054] The first input of the first discrete adder is connected to the output of the point cloud subtractor in the first pipeline structure. The first input of the first discrete adder is used to receive the x-coordinate result of the current rotation transformation.
[0055] The second input of the first discrete adder is used to receive the horizontal coordinate of the robot position transmitted from the interconnect bus, wherein the horizontal coordinate of the robot position is a pre-calculated horizontal axis coordinate value of the robot in the world coordinate system; preferably, the horizontal coordinate of the robot position transmitted from the interconnect bus can be stored in a register inside the point cloud discrete submodule, and the second input of the first discrete adder receives the horizontal coordinate of the robot position transmitted from the interconnect bus through a connected register. Figure 1 As shown, the second input terminal of the first discrete adder is connected to the register. (marked) The boxes are connected together, where the registers are... The system caches the horizontal coordinates of the robot's position transmitted via the interconnect bus, and then transmits the currently cached horizontal coordinates of the robot's position to the second input of the first discrete adder. The horizontal coordinates of the robot's position are pre-calculated (by software or a CPU unit) as the robot's horizontal axis coordinates in the world coordinate system. The lidar is mounted on the robot and serves as a sensor for robot positioning. The first discrete adder controls the addition of the horizontal coordinate result from the current rotation transformation to the horizontal coordinates of the robot's position, and then outputs the sum, making this sum the horizontal axis coordinate value of the point cloud transformed into the world coordinate system.
[0056] The first input of the first discrete subtractor is connected to the output of the first discrete adder; the second input of the first discrete subtractor is used to receive the maximum abscissa value of the map transmitted from the interconnect bus; preferably, the maximum abscissa value of the map transmitted from the interconnect bus can be stored in a register inside the point cloud discrete submodule, and the second input of the first discrete subtractor receives the maximum abscissa value of the map transmitted from the interconnect bus through the connected register. Figure 1 As shown, the second input terminal of the first discrete subtractor is connected to the register. (marked) The boxes are connected together, where the registers are... This register is used to cache the maximum horizontal coordinate value of the map transmitted from the interconnect bus. The maximum horizontal coordinate value is preferably a boundary coordinate on the horizontal axis of the map. The maximum horizontal coordinate value of the currently cached map is also transmitted to the second input of the first discrete subtractor. The maximum horizontal coordinate value of the map originates from the map size register and is transmitted from the map size register to the interconnect bus; wherein, the map size register is a parameter register set inside the hardware acceleration circuit, used to store the size range of the raster map that meets the transmission requirements of the bus bit width; Figure 1 The parameter register group shown includes a map size register. A first discrete subtractor controls the subtraction of the maximum abscissa value of the map with the sum output of the first discrete adder, and then outputs the difference. This difference output by the first discrete subtractor becomes the abscissa value of the raster map that meets the bus width transmission requirements.
[0057] The first input terminal of the first discrete multiplier is connected to the output terminal of the first discrete subtractor; the second input terminal of the first discrete multiplier is used to receive the reciprocal of the map resolution transmitted from the interconnect bus; preferably, the reciprocal of the map resolution transmitted from the interconnect bus can be stored in a register inside the point cloud discrete submodule, and the second input terminal of the first discrete multiplier receives the reciprocal of the map resolution transmitted from the interconnect bus through the connected register.
[0058] exist Figure 1 In the illustrated embodiment, the second input of the first discrete multiplier is connected to register 1 / R (a box marked with 1 / R). Register 1 / R is used to cache the reciprocal of the map resolution transmitted from the interconnect bus, and then transmits the currently cached reciprocal of the map resolution to the second input of the first discrete multiplier, allowing the second input of the first discrete multiplier to receive the reciprocal of the map resolution transmitted from the interconnect bus. The reciprocal of the map resolution originates from the map resolution register and is transmitted to the interconnect bus by the map resolution register. The map resolution register is a parameter register set inside the hardware acceleration circuit, used to store the resolution information of the first raster map to be searched for the corresponding layer. Figure 1 The parameter register group shown includes a map resolution register. A first discrete multiplier controls the multiplication of the reciprocal of the map resolution with the difference output by a first discrete subtractor, outputs the product, and configures this product as the abscissa value of the discrete point cloud. Another first discrete multiplier outputs the product to the memory module via the interconnect bus. The product output by the first discrete multiplier is configured as the abscissa value of the discrete point cloud, thus completing the discretization of the abscissa and aligning the currently stored point cloud abscissa values to the coordinate system of the raster map to be searched. Simultaneously, the product output by the first discrete multiplier is set as the discretization result output by the third pipeline structure.
[0059] As one embodiment, the point cloud discretization submodule further includes a fourth pipeline structure; the fourth pipeline structure is used, under the control of the state machine module, to read the ordinate result of the current rotation transformation output by the first pipeline structure (which is essentially the output result of the first pipeline structure under a specific clock cycle), then control the ordinate result of the current rotation transformation to perform discretization, then set the discretization result as the ordinate value of the discrete point cloud, and then store the ordinate value of the discrete point cloud in the memory module through the interconnect bus.
[0060] The fourth pipeline structure includes a first discrete subtractor, a second discrete adder, and a second discrete multiplier; the second discrete adder is a type of adder. Figure 1 In the discrete point cloud submodule, circles are marked with "+"; the second discrete subtractor is a subtractor, in Figure 1 The point cloud discrete submodule is marked with a "-" circle; the second discrete multiplier belongs to the multiplier category, and is... Figure 1 The point cloud discrete submodule is marked with " A circle.
[0061] The first input of the second discrete adder is connected to the output of the point cloud adder in the second pipeline structure. The first input of the second discrete adder is used to receive the ordinate result of the current rotation transformation.
[0062] The second input of the second discrete adder is used to receive the ordinate of the robot's position transmitted from the interconnect bus, wherein the ordinate of the robot's position is a pre-calculated ordinate value of the robot's vertical axis in the world coordinate system; preferably, the ordinate of the robot's position transmitted from the interconnect bus can be stored in a register inside the point cloud discrete submodule, and the second input of the second discrete adder receives the ordinate of the robot's position transmitted from the interconnect bus through a connected register. Figure 1 As shown, the second input terminal of the second discrete adder is connected to the register. (marked) The boxes are connected together, where the registers are... The system is used to cache the ordinate of the robot position transmitted from the interconnect bus, and then transmit the currently cached ordinate of the robot position to the second input of the second discrete adder. The robot position register is used to store the ordinate and abscissa of the robot position. The robot position register is a parameter register set inside the hardware acceleration circuit. The second discrete adder is used to control the addition of the ordinate result of the current rotation transformation with the ordinate of the robot position, and then output the sum, so that the sum becomes the ordinate coordinate value of the point cloud in the world coordinate system.
[0063] The first input of the second discrete subtractor is connected to the output of the second discrete adder; the second input of the second discrete subtractor is used to receive the maximum ordinate value of the map transmitted from the interconnect bus; preferably, the maximum ordinate value of the map transmitted from the interconnect bus can be stored in a register inside the point cloud discrete submodule, and the second input of the second discrete subtractor receives the maximum ordinate value of the map transmitted from the interconnect bus through a connected register. Figure 1 As shown, the second input terminal of the second discrete subtractor is connected to the register. (marked) The boxes are connected together, where the registers are... The maximum ordinate value of the map (preferably a boundary coordinate on the vertical axis of the map) transmitted from the interconnect bus is cached, and then the currently cached maximum ordinate value is transmitted to the second input of the second discrete subtractor. The maximum ordinate value of the map originates from the map size register and is transmitted to the interconnect bus by the map size register; the second discrete subtractor is used to control the subtraction of the maximum ordinate value of the map with the sum output by the second discrete adder, and then outputs the difference obtained by the subtraction; the difference output by the second discrete subtractor becomes the ordinate value of the raster map that meets the transmission requirements of the bus bit width.
[0064] The first input of the second discrete multiplier is connected to the output of the second discrete subtractor; the second input of the second discrete multiplier is used to receive the reciprocal of the map resolution transmitted from the interconnect bus; preferably, the reciprocal of the map resolution transmitted from the interconnect bus can be stored in a register inside the point cloud discrete submodule, and the second input of the second discrete multiplier receives the reciprocal of the map resolution transmitted from the interconnect bus through the connected register. Figure 1 As shown, the second input of the second discrete multiplier is connected to register 1 / R (the box marked 1 / R). The second discrete multiplier controls the multiplication of the reciprocal of the map resolution with the difference output by the second discrete subtractor, outputs the product, and configures this product as the ordinate value of the discrete point cloud. The product output by the second discrete multiplier is configured as the ordinate value of the discrete point cloud, thus completing the discretization of the ordinate, aligning the currently stored ordinate values of the point cloud to the coordinate system of the raster map to be searched, and simultaneously setting the product output by the second discrete multiplier as the result of the discretization output by the fourth pipeline structure. The second discrete multiplier is also used to output the product obtained through multiplication to the memory module via the interconnect bus, and to determine that this product is the ordinate of the currently aligned matching node on the raster map to be searched. The second discrete multiplier is also used to output the product obtained through multiplication to the memory module via the interconnect bus.
[0065] Based on the embodiments of the third and fourth pipeline structures described above, it can be seen that the third and fourth pipeline structures are parallel. For each point cloud, the horizontal and vertical coordinates are read from the storage space where the point cloud is stored and input into the point cloud discretization submodule. Through adders and subtractors, the horizontal and vertical coordinates of the point cloud are transformed from the laser coordinate system to the coordinate system of the raster map to be searched along the adaptive coordinate axis directions with the same offset, including swapping the coordinate axes of the point cloud to achieve coordinate system transformation. Then, it is multiplied by the reciprocal of the map resolution, and the discretization of the horizontal and vertical coordinates of the point cloud is completed through a hardware-based pipeline.
[0066] As one example, such as Figure 1 As shown, the raster indexing module includes a fifth pipeline structure; the fifth pipeline structure includes a first index subtractor and a first index adder; wherein, the first index subtractor is a subtractor, in Figure 1 The raster index module contains circles marked with "-"; the first index adder belongs to the adder class. Figure 1 The raster index module contains circles marked with "+".
[0067] The first input of the first index subtractor is used to receive the abscissa of the discrete point cloud transmitted from the interconnect bus, wherein the abscissa of the discrete point cloud transmitted to the first index subtractor by the interconnect bus originates from the memory module; preferably, the abscissa of the discrete point cloud transmitted from the interconnect bus can be stored in a register inside the raster index module, and the first input of the first index subtractor receives the abscissa of the discrete point cloud transmitted from the interconnect bus through a connected register. Figure 1 In the embodiment shown, the first input terminal of the first index subtractor (in) Figure 1 Within the raster index module, the first subtractor (arranged from top to bottom) and the register (marked) The boxes are connected together, where the registers are... The method is used to cache the horizontal coordinates of the discrete point cloud transmitted from the interconnect bus, and then transmit the currently cached horizontal coordinates of the discrete point cloud to the first input of the first index subtractor, so that the first input of the first index subtractor can complete the reception of the horizontal coordinates of the discrete point cloud transmitted from the interconnect bus; wherein, the discrete point cloud transmitted from the interconnect bus to the first index subtractor comes from the memory module.
[0068] The second input of the first index subtractor is used to receive the horizontal axis coordinate offset value transmitted from the interconnect bus; wherein, the preset coordinate offset value includes the horizontal axis coordinate offset value; preferably, the horizontal axis coordinate offset value transmitted from the interconnect bus can be stored in a register inside the grid index submodule, and the second input of the first index subtractor receives the horizontal axis coordinate offset value transmitted from the interconnect bus through a connected register. Figure 1 As shown, the second input of the first index subtractor is connected to the register. (marked) The boxes are connected together, where the registers are... The system is used to cache the horizontal axis coordinate offset value transmitted from the interconnect bus, and then transmit the currently cached horizontal axis coordinate offset value to the second input of the first index subtractor, so that the second input of the first index subtractor can complete the reception of the horizontal axis coordinate offset value transmitted from the interconnect bus. The preset coordinate offset value includes a horizontal axis coordinate offset value, and the horizontal axis coordinate offset value transmitted from the interconnect bus originates from the preset coordinate offset value stored in the map offset value register. The map offset value register is a parameter register set internally by the hardware acceleration circuit, used to store the coordinate offset value associated with the raster map to be searched. Figure 1 The parameter register group shown includes a map offset value register. The first index subtractor controls the subtraction of the horizontal coordinate of the discrete point cloud received from the first input terminal with the horizontal axis offset value received from the second input terminal, and then outputs the difference.
[0069] The first input of the first index adder is connected to the output of the first index subtractor; the second input of the first index adder is used to receive the horizontal axis coordinate search step size transmitted from the interconnect bus; wherein, the search step size includes the horizontal axis coordinate search step size; preferably, the horizontal axis coordinate search step size transmitted from the interconnect bus can be stored in a register inside the grid index submodule, and the second input of the first index adder receives the horizontal axis coordinate search step size transmitted from the interconnect bus through a connected register. Figure 1 As shown, the second input of the first index adder is connected to the register. (marked) The boxes are connected together, where the registers are... The horizontal axis coordinate search step size transmitted from the interconnect bus is used to cache the current cached horizontal axis coordinate search step size and then transmit it to the second input of the first index adder. The horizontal axis coordinate search step size transmitted from the interconnect bus is derived from the search step size stored in the search window parameter register; the search window parameter register is a parameter register set inside the correlation scan matching hardware acceleration circuit, used to store the position of the node in the search window and the associated child node search information; Figure 1 The parameter register group shown includes a search window parameter register. The sum output by the first index adder is configured as the horizontal axis index value of the discrete point cloud mapped to the map storage space, and is set as the result of the fifth pipeline structure output.
[0070] As one embodiment, the raster indexing module includes a sixth pipeline structure; the sixth pipeline structure includes a second index subtractor and a second index adder; wherein, the second index subtractor is a subtractor, in Figure 1 The raster index module contains circles marked with "-"; the second index adder belongs to the adder category, in... Figure 1The raster index module contains circles marked with "+".
[0071] The first input of the second index subtractor is used to receive the ordinate of the discrete point cloud transmitted from the interconnect bus. Preferably, the ordinate of the discrete point cloud transmitted from the interconnect bus can be stored in a register inside the raster index module, and the first input of the second index subtractor receives the ordinate of the discrete point cloud transmitted from the interconnect bus through a connected register. Figure 1 As shown, the first input terminal of the second index subtractor (in) Figure 1 Within the raster index module, the second subtractor (arranged from top to bottom) and the register (marked) The output of the box is connected, where the register The system is used to cache the ordinates of the discrete point cloud transmitted from the interconnect bus, and then transmits the currently cached ordinates of the discrete point cloud to the first input of the second index subtractor, so that the first input of the second index subtractor can complete the reception of the ordinates of the discrete point cloud transmitted from the interconnect bus; wherein, the ordinates of the discrete point cloud transmitted from the interconnect bus to the second index subtractor are derived from the memory module.
[0072] The second input of the second index subtractor is used to receive the vertical axis coordinate offset value transmitted from the interconnect bus; wherein, the preset coordinate offset value includes the vertical axis coordinate offset value; preferably, the vertical axis coordinate offset value transmitted from the interconnect bus can be stored in a register inside the grid index module, and the second input of the second index subtractor receives the vertical axis coordinate offset value transmitted from the interconnect bus through a connected register. Figure 1 As shown, the second input of the second index subtractor is connected to the register. (marked) The boxes are connected together, where the registers are... The second index subtractor is used to cache the ordinate offset value transmitted from the interconnect bus and then transmit the currently cached ordinate offset value to the second input of the second index subtractor. The preset coordinate offset value also includes a ordinate offset value, which is also derived from the preset coordinate offset value stored in the map offset value register. The second index subtractor controls the subtraction of the ordinate of the discrete point cloud received at the first input with the ordinate offset value received at the second input, and then outputs the difference.
[0073] The first input of the second index adder is connected to the output of the second index subtractor; the second input of the second index adder is used to receive the vertical axis coordinate search step size transmitted from the interconnect bus; preferably, the vertical axis coordinate search step size transmitted from the interconnect bus can be stored in a register inside the grid index submodule, and the second input of the second index adder receives the vertical axis coordinate search step size transmitted from the interconnect bus through a connected register. Figure 1 As shown, the second input of the second index adder is connected to the register. (marked) The boxes are connected together, where the registers are... The search step size is used to cache the y-axis coordinate search step size transmitted from the interconnect bus, and then transmits the currently cached y-axis coordinate search step size to the second input of the second index adder. The search step size also includes a y-axis coordinate search step size, which is also derived from the search step size stored in the search window parameter register. The sum output by the second index adder is configured as the y-axis direction index value of the discrete point cloud mapped to the map storage space, and is set as the result output by the sixth pipeline structure.
[0074] The aforementioned fifth pipeline structure and the aforementioned sixth pipeline structure are parallel within the same grid index module. By using an addition and subtraction operation combination structure, the horizontal axis index value and the vertical axis index value mapped to the map storage space are calculated respectively, thereby converting the horizontal and vertical coordinates of the discrete point cloud into discrete index information of the grid points currently participating in the search of the grid map to be searched.
[0075] Preferably, the raster index module further includes a third index adder and an index multiplier, wherein the third index adder is a type of adder, corresponding to... Figure 1 Within the raster index module, the first adder arranged from left to right; the index multiplier belongs to the multiplier class, and belongs to... Figure 1 The raster index module is uniquely marked with " The index multiplier is connected to the output of the second index adder. The first input of the index multiplier is used to receive the sum output by the second index adder. The second input of the index multiplier is used to receive the number of row grids transmitted from the interconnect bus, where the number of row grids is the number of grids that each row of the map storage space can occupy. Preferably, the number of row grids transmitted from the interconnect bus can be stored in a register inside the grid index module, and the second input of the index multiplier receives the number of row grids transmitted from the interconnect bus through a connected register. Figure 1 In the illustrated embodiment, the second input of the index multiplier is connected to the register. (marked) The boxes are connected together, where the registers are... The system is used to cache the number of row grids transmitted from the interconnect bus, and then transmit the currently cached number of row grids to the second input of the index multiplier, so that the second input of the index multiplier can receive the number of row grids transmitted from the interconnect bus; wherein, the number of row grids is the number of grids that each row of the map storage space can occupy, which is stored in the map size register and transmitted to the interconnect bus by the map size register. Figure 1 The parameter register group shown includes the map size register. The map size register is a parameter register internal to the hardware acceleration circuit, used to store the size range of the raster map to be searched and associated extended information. The index multiplier controls the multiplication of the number of row grid cells with the sum output of the second index adder, and then outputs the product. The first input of the third index adder is connected to the output of the first index adder, and the second input of the third index adder is connected to the output of the index multiplier. The third index adder controls the addition of the product of the number of row grid cells and the sum output of the second index adder to the horizontal axis index value, and then sets the sum as the index value mapped from the discrete point cloud to the map storage space, sending it to the interconnect bus so that the occupancy probability matching the index value can be read from the memory module. In this preferred embodiment, the index multiplier controls the multiplication of the number of row grids and the index value in the vertical direction, and then the third index adder controls the addition of the index value in the horizontal direction with the product output by the index multiplier. The index value of the discrete point cloud mapped to the occupancy probability is calculated by a row scanning query method, which is also used as the index value mapped to the map storage space. This is equivalent to the storage address of the occupancy probability of the corresponding grid point in the map storage space, and equivalent to the read address of the occupancy probability stored in the map storage space, so that the interconnect bus can read the occupancy probability from the memory module.
[0076] Preferably, the raster indexing module further includes a third index adder and an index multiplier, wherein the third index adder is an adder and the index multiplier is a multiplier; the first input of the index multiplier is connected to the output of the first index adder; the second input of the index multiplier is used to receive the number of column grids transmitted from the interconnect bus; wherein, the number of column grids is the number of grids that each column of the map storage space can occupy, stored in the map size register, and transmitted to the interconnect bus by the map size register; the map size register is a parameter register set inside the hardware acceleration circuit, used to store the size range of the raster map to be searched and the associated extended information. The first input of the third index adder is connected to the output of the second index adder, and the second input of the third index adder is connected to the output of the index multiplier; the third index adder is used to control the product of the number of column grids and the sum of the output of the first index adder to the index value in the vertical axis direction, and then set the sum as the index value of the discrete point cloud mapped to the map storage space, and send it to the interconnect bus. In this preferred embodiment, the index multiplier controls the multiplication of the number of column grids and the horizontal axis index value, and then the third index adder controls the addition of the vertical axis index value to the product output by the index multiplier. The index value of the occupancy probability of the discrete point cloud mapped to the corresponding grid point is calculated by column scanning query method. This index value is also used as the index value mapped to the map storage space, which is equivalent to the storage address of the grid point occupancy probability in the map storage space, and equivalent to the read address of the occupancy probability stored in the map storage space, so that the interconnect bus can read the occupancy probability from the memory module.
[0077] Based on the above embodiments, the state machine module is a type of finite state machine. The state machine module schedules the working states of the memory module, the point cloud processing module, and the grid index module, so that each time the point cloud processing module performs a rotation transformation and a discretization, the grid index module calculates the index value of a matching grid point of a point cloud in the grid map to be searched, and determines that a matching operation is completed. This index value is the index value of the occupancy probability of a matching grid point of the point cloud in the grid map to be searched. Specifically, the point cloud processing module is further configured to update the currently stored point cloud using the result of the current rotation transformation after each matching operation or rotation transformation, so that the point cloud processing module only uses the updated currently stored point cloud to perform a new rotation transformation, until the index values of the occupancy probabilities corresponding to all currently acquired point clouds are calculated, i.e., all poses within the search window have been searched, and the occupancy probabilities of all poses matching have been obtained. In the embodiment of the state machine module, the state machine module controls the point cloud processing module to perform a rotation and a discretization process on each point cloud sequentially by means of hardware scheduling of working states and interrupt signals, so as to read the occupancy probability matching the index value from the memory module, realize the operation of the cyclic state, and ensure the real-time performance of the hardware acceleration circuit in searching the map position.
[0078] In this embodiment, the hardware acceleration circuit is controlled by a finite state machine to run a correlation scanning matching algorithm to align the point cloud to the raster map and obtain index values. The finite state machine includes an idle state, a point cloud reading state, a trigonometric function reading state, a map reading state, a read reset state, a point cloud rasterization state, a rasterization reset state, a search state, a loop state, and a data writing state.
[0079] The initial state is an idle state. The working state of the state machine module jumps to the point cloud reading state. At this time, the state machine module is used to first control the memory module to read the currently stored point cloud from the external FIFO, and then store the read point cloud into the first storage space. That is, the point cloud is transferred from the external read FIFO to the block storage space corresponding to the box marked Point Cloud.
[0080] Once the point cloud data for the current cycle has been fully read, the state transitions to the trigonometric function reading state. At this time, the memory module is controlled to read the pre-calculated trigonometric function values from the external FIFO, including the cosine function value and the sine function value corresponding to the rotation angle reached by the current rotation transformation. The pre-calculated trigonometric function values are then stored in the second storage space.
[0081] Once all pre-calculated trigonometric function values have been read, the state transitions to map reading state, controlling the memory module to read the raster map to be searched from the external FIFO, and then storing the read weight values into the map storage space.
[0082] After the raster map to be searched is completely stored in the map storage space, the working state jumps to the read reset state, controls the read address of the memory module to reset, and controls the write address of the memory module to start incrementing, opening up a fourth storage space so that the discrete point cloud output by the point cloud processing module has an empty storage space in the memory module.
[0083] After the write address of the memory module is set by incrementing, the working state transitions to point cloud rasterization state. The point cloud processing module is then controlled to perform the aforementioned rotation transformation and discretization operations. The discretization results (including the outputs of the third and fourth pipeline structures) are then written to the fourth storage space via the interconnect bus. This is equivalent to writing the result of the current coordinate transformation in the correlation scan matching of the raster map to be searched into the fourth storage space. After the data is completely written into the fourth storage space, the working state transitions to rasterization reset state, and the first storage space is controlled. Both the read and write addresses are reset, then the read address of the fourth storage space is reset, and the write address of the fourth storage space starts to increment, so as to continue to allocate empty address space in the fourth storage space for storing the results obtained from the next discretization. The point cloud participating in the next discretization is the result of one or more rotation transformations performed by the point cloud processing module. The number of discretizations varies depending on the search pose defined by the search window. Preferably, the number of rotation transformations is set according to the number of point clouds. In this embodiment, the number of rotation transformations is set to be equal to the number of iterations of the correlation scanning matching algorithm. After setting the address space in the fourth storage space for the results obtained from the next discretization, the working state jumps to the search state. The grid index module calculates the index value of the discrete point cloud mapped to the map storage space, i.e., the index value of the matching grid point of the grid map to be searched. Then, according to the index value, the corresponding occupancy probability is read from the grid map to be searched already stored in the map storage space to obtain the probability value of a pose match found in the search window, and transmitted to the interconnect bus.
[0084] Then the working state transitions to a loop state. At this time, the value of the loop register is set according to the coordinate index value of the current search pose within the search window. If it is determined that the search of all poses within the search window has not been completed, the working state is switched to the point cloud rasterization state, and the point cloud processing module is re-controlled to perform the rotation transformation and discretization to repeat the aforementioned working state. During the repetition of the aforementioned working state, each time a matching operation is completed or each rotation transformation is performed, the result obtained from the current rotation transformation is used to update the currently stored point cloud, so that the point cloud processing module only uses the updated currently stored point cloud to perform a new rotation transformation, until the index value of the occupancy probability corresponding to all currently acquired point clouds is calculated, that is, it is counted that all poses within the search window have been searched and the occupancy probability of all poses matching has been obtained.
[0085] Preferably, if it is determined that the search of all poses within the search window has been completed, the working state switches to the data writing state. That is, the grid index module counts that all existing poses within the search window have been searched, and then writes all the occupancy probabilities obtained by calculation into the external write FIFO through the interconnect bus. After the data writing is completed, the working state switches back to the idle state, waiting for the next accelerated calculation to start.
[0086] As one embodiment, the hardware acceleration circuit is externally provided with a bus interface module, which includes a DMA controller module and a transmission bus; preferably, the bus interface module includes an AXI DMA module and an AXI bus.
[0087] The DMA controller module is used to continuously transfer data stored in non-contiguous physical memory spaces in batches, reducing the number of CPU software interrupts. Specifically, the DMA controller module requires the CPU's device driver to generate a linked list of storage data addresses, using the linked list to describe the non-contiguous physical space. The initial address of the linked list is sent to the DMA controller module. After the DMA controller module transfers a segment of data to the hardware acceleration circuit, it sequentially reads the address of the next linked list until all data transfers are completed.
[0088] The transmission bus includes a first bus and a second bus. Preferably, the transmission bus is an AXI bus, including two types: AXI-Lite bus and AXI-Stream bus. The former is suitable for simple, low-throughput memory-mapped communication, while the latter is for high-speed streaming data. The first bus is preferably an AXI-Lite bus, which establishes a connection between the processor unit and the hardware acceleration circuit and the DMA controller module. It can send control signals to the memory module, point cloud processing module, raster index module, state machine module, and interconnect bus, and monitor and read the working status of the state machine module. The first bus has signal transmission and reception connections with the memory module, point cloud processing module, raster index module, state machine module, interconnect bus, and DMA controller module. The first bus is used to configure data transmission parameters for the DMA controller module. The first bus is also used to configure the parameters stored in the map size register, the parameters stored in the map resolution register, the extended parameters required for the maximum detection radius of the currently stored point cloud, the extended parameters required for performing the discretization (including the preset coordinate offset value), the extended parameters required for performing the rotation transformation, and the search step size, so as to realize memory-mapped communication with the hardware acceleration circuit. The second bus is preferably an AXI-Stream bus, which is connected to the DMA controller module and used to transmit pre-configured trigonometric function values, the raster map to be searched, and the point cloud currently acquired by the LiDAR to the memory module; wherein, the transmission bus follows the AMBA protocol. This embodiment provides a bus interface architecture module for the hardware acceleration circuit and the external data source (controller). Based on the data transmission performance, a first bus suitable for simple, low-throughput memory-mapped communication (transmitting extended parameters, map feature parameters, and associated basic control signals to the registers inside the hardware acceleration circuit) and a second bus for high-speed data streams (to the pre-configured trigonometric function values, the raster map to be searched, and the point cloud currently acquired by the LiDAR) are designed to improve the real-time performance of the hardware acceleration circuit.
[0089] An embodiment of the present invention also discloses a chip that integrates the aforementioned hardware acceleration circuit. When the external processor unit and bus interface of the chip are not integrated with the hardware acceleration circuit on the same chip, the processor unit does not control the parallel acceleration operation performed by the hardware acceleration circuit. The processor unit only provides the hardware acceleration circuit with operation parameters, start signals, interrupt signals, reset signals, and flag clear signals through the bus interface. When the processor unit, bus interface, and hardware acceleration circuit are integrated on the same chip, it is applied to a heterogeneous chip. This heterogeneous chip strikes a balance between accuracy and cost; the hardware acceleration circuit is suitable for data parallel algorithms, so that the acceleration obtained by the heterogeneous chip promotes the real-time processing of high frame rate point cloud maps.
[0090] Another embodiment of the present invention discloses a robot internally equipped with the aforementioned chip for localization in a pre-constructed grid map. This solution addresses the grid map relocalization problem on embedded platforms of mobile robots. Compared to existing technologies where robots execute correlation scanning and matching algorithms via a purely software platform, this technical solution offers a significant speed advantage even with relatively low frequencies of the hardware acceleration circuit, thus better meeting the relocalization requirements of mobile robot platforms.
[0091] The above embodiments are only for illustrating the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent transformations or modifications made in accordance with the spirit and essence of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A hardware acceleration circuit based on a correlation scanning matching algorithm, characterized in that, The hardware acceleration circuit is electrically connected to the lidar; the hardware acceleration circuit includes a memory module, a point cloud processing module, a grid indexing module, a state machine module, and an interconnect bus; the memory module, point cloud processing module, grid indexing module, and state machine module all establish data transmission relationships through the interconnect bus; the point cloud processing module includes a point cloud rotation submodule; the point cloud processing module also includes a point cloud discretization submodule; The point cloud processing module is also used to read the currently stored point cloud from the memory module under the control of the state machine module, and then control the read point cloud to perform rotation transformation. The point cloud processing module is used to read the result of the current rotation transformation under the control of the state machine module, then control the result of the current rotation transformation to perform discretization, then set the discretized result as a discrete point cloud, and then store the discrete point cloud into the memory module through the interconnection bus. The grid index module is used to retrieve discrete point clouds from the memory module under the control of the state machine module, calculate the index value of the discrete point cloud mapped to the map storage space according to the preset coordinate offset value and search step size, and set the index value as the read address of the occupancy probability of the corresponding grid point. The memory module is equipped with a map storage space for storing the raster map to be searched transmitted from the interconnect bus; The memory module is used to store a ring of point cloud acquired by the lidar and preset trigonometric function values; the currently stored point cloud is a ring of point cloud acquired by the lidar. The occupancy probability of a corresponding grid point is the probability value of a matching grid point within the grid map to be searched after the point cloud has been processed by the point cloud processing module; within the grid map to be searched, there exists a matching index value for the occupancy probability of a grid point.
2. The hardware acceleration circuit according to claim 1, characterized in that, The point cloud rotation submodule includes a first register, a second register, a first pipeline structure, and a second pipeline structure; Both the first register and the second register are connected to the first pipeline structure. The first pipeline structure is used to read the horizontal coordinates of the currently stored point cloud from the memory module under the control of the state machine module, and then control the read horizontal coordinates of the point cloud to perform rotation transformation. Both the first register and the second register are connected to the second pipeline structure. The second pipeline structure is used to read the ordinate of the currently stored point cloud from the memory module under the control of the state machine module, and then control the read ordinate of the point cloud to perform rotation transformation. The interconnect bus transmits the x-coordinate of the point cloud to the first register; the x-coordinate of the point cloud transmitted by the interconnect bus to the first register is derived from the x-coordinate of the currently stored point cloud. The interconnect bus caches the ordinates of the point cloud in the second register; the ordinates of the point cloud transmitted by the interconnect bus to the second register are derived from the ordinates of the currently stored point cloud. The first pipeline structure and the second pipeline structure are parallel pipeline structures.
3. The hardware acceleration circuit according to claim 2, characterized in that, The first pipeline structure includes a first point cloud multiplier, a second point cloud multiplier, and a point cloud subtractor; both the first and second point cloud multipliers are multipliers, and the point cloud subtractor is a subtractor. The first input terminal of the first point cloud multiplier is connected to the output terminal of the first register; The second input of the first point cloud multiplier is used to receive the cosine function value corresponding to the rotation angle reached by the current rotation transformation, wherein the rotation angle reached by the current rotation transformation is the sum of the angle search step size and the rotation angle reached by the previous rotation transformation. The first input terminal of the second point cloud multiplier is connected to the output terminal of the second register; The second input terminal of the second point cloud multiplier is used to receive the sine function value corresponding to the rotation angle reached by the current rotation transformation; The first input of the point cloud subtractor is connected to the output of the first point cloud multiplier, and the second input of the point cloud subtractor is connected to the output of the second point cloud multiplier. The point cloud subtractor is used to transmit the output difference to the point cloud discrete submodule, and set the output difference of the point cloud subtractor as the x-coordinate result of the current rotation transformation output by the first pipeline structure.
4. The hardware acceleration circuit according to claim 2, characterized in that, The second pipeline structure includes a third point cloud multiplier, a fourth point cloud multiplier, and a point cloud adder; the third and fourth point cloud multipliers are both multipliers, and the point cloud adder is an adder. The first input terminal of the third point cloud multiplier is connected to the output terminal of the first register; The second input terminal of the third point cloud multiplier is used to receive the sine function value corresponding to the rotation angle reached by the current rotation transformation; wherein, the rotation angle reached by the current rotation transformation is the sum of the angle search step size and the rotation angle reached by the previous rotation transformation. The first input terminal of the fourth point cloud multiplier is connected to the output terminal of the second register; The second input terminal of the fourth point cloud multiplier is used to receive the cosine function value corresponding to the rotation angle reached by the current rotation transformation; The first input of the point cloud adder is connected to the output of the third point cloud multiplier, and the second input of the point cloud adder is connected to the output of the fourth point cloud multiplier. The point cloud adder is used to transmit the output sum to the point cloud discrete submodule, and set the output sum of the point cloud adder as the ordinate result of the current rotation transformation output by the second pipeline structure.
5. The hardware acceleration circuit according to claim 3, characterized in that, The point cloud discretization submodule includes a third pipeline structure. The third pipeline structure is used, under the control of the state machine module, to read the horizontal coordinate result of the current rotation transformation output by the first pipeline structure, then control the horizontal coordinate result of the current rotation transformation to perform discretization, then set the discretization result as the horizontal coordinate value of the discrete point cloud, and then store the horizontal coordinate value of the discrete point cloud in the memory module through the interconnect bus.
6. The hardware acceleration circuit according to claim 5, characterized in that, The third pipeline structure includes a first discrete adder, a first discrete subtractor, and a first discrete multiplier; the first discrete adder is an adder, the first discrete subtractor is a subtractor, and the first discrete multiplier is a multiplier. The first input of the first discrete adder is connected to the output of the point cloud subtractor in the first pipeline structure. The first input of the first discrete adder is used to receive the x-coordinate result of the current rotation transformation. The second input terminal of the first discrete adder is used to receive the horizontal coordinate of the robot position transmitted from the interconnect bus, wherein the horizontal coordinate of the robot position is the pre-calculated horizontal axis coordinate value of the robot in the world coordinate system. The first discrete adder is used to control the addition of the horizontal coordinate result of the current rotation transformation to the horizontal coordinate of the robot position, and then output the sum value, so that the sum value becomes the horizontal axis coordinate value of the point cloud transformed into the world coordinate system. The first input terminal of the first discrete subtractor is connected to the output terminal of the first discrete adder; the second input terminal of the first discrete subtractor is used to receive the maximum horizontal coordinate value of the map transmitted from the interconnection bus. The first input terminal of the first discrete multiplier is connected to the output terminal of the first discrete subtractor; the second input terminal of the first discrete multiplier is used to receive the reciprocal of the map resolution transmitted from the interconnect bus. The first discrete multiplier is used to output the product obtained by multiplication to the memory module through the interconnect bus; the product output by the first discrete multiplier is configured as the abscissa value of the discrete point cloud, and the discretization of the abscissa is completed, so as to align the abscissa value of the currently stored point cloud to the coordinate system of the raster map to be searched, and at the same time, the product output by the first discrete multiplier is set as the discretization result output by the third pipeline structure.
7. The hardware acceleration circuit according to claim 4, characterized in that, The point cloud discretization submodule also includes a fourth pipeline structure; the fourth pipeline structure is used to read the ordinate result of the current rotation transformation output by the second pipeline structure under the control of the state machine module, then control the ordinate result of the current rotation transformation to perform discretization, then set the discretization result as the ordinate value of the discrete point cloud, and then store the ordinate value of the discrete point cloud in the memory module through the interconnect bus.
8. The hardware acceleration circuit according to claim 7, characterized in that, The fourth pipeline structure includes a first discrete subtractor, a second discrete adder, and a second discrete multiplier; all second discrete adders are adders, all second discrete subtractors are subtractors, and all second discrete multipliers are multipliers. The first input of the second discrete adder is connected to the output of the point cloud adder in the second pipeline structure. The first input of the second discrete adder is used to receive the ordinate result of the current rotation transformation. The second input terminal of the second discrete adder is used to receive the vertical coordinate of the robot position transmitted from the interconnect bus, wherein the vertical coordinate of the robot position is the pre-calculated vertical axis coordinate value of the robot in the world coordinate system. The second discrete adder is used to control the addition of the vertical coordinate result of the current rotation transformation to the vertical coordinate of the robot position, and then output the sum value, so that the sum value becomes the vertical axis coordinate value of the point cloud transformed into the world coordinate system. The first input terminal of the second discrete subtractor is connected to the output terminal of the second discrete adder; the second input terminal of the second discrete subtractor is used to receive the maximum vertical coordinate value of the map transmitted from the interconnection bus. The first input of the second discrete multiplier is connected to the output of the second discrete subtractor; the second input of the second discrete multiplier is used to receive the reciprocal of the map resolution transmitted from the interconnect bus; the product value output by the second discrete multiplier is configured as the ordinate value of the discrete point cloud, thus completing the discretization of the ordinate, aligning the ordinate value of the currently stored point cloud to the coordinate system of the raster map to be searched, and setting the product value output by the second discrete multiplier as the discretization result output by the fourth pipeline structure; The second discrete multiplier is also used to output the product obtained by multiplication to the memory module via the interconnect bus.
9. The hardware acceleration circuit according to claim 5, characterized in that, The grid indexing module includes a fifth pipeline structure; the fifth pipeline structure includes a first index subtractor and a first index adder, wherein the first index subtractor is a subtractor and the first index adder is an adder; The first input of the first index subtractor is used to receive the horizontal coordinates of the discrete point cloud transmitted from the interconnect bus; The second input of the first index subtractor is used to receive the horizontal axis coordinate offset value transmitted from the interconnect bus; wherein, the preset coordinate offset value includes the horizontal axis coordinate offset value; The first input of the first index adder is connected to the output of the first index subtractor; the second input of the first index adder is used to receive the horizontal axis coordinate search step size transmitted from the interconnect bus; wherein, the search step size includes the horizontal axis coordinate search step size; the sum value output by the first index adder is configured as the horizontal axis direction index value of the discrete point cloud mapped to the map storage space, and is set as the result output by the fifth pipeline structure.
10. The hardware acceleration circuit according to claim 9, characterized in that, The grid indexing module includes a sixth pipeline structure; the sixth pipeline structure includes a second index subtractor and a second index adder; wherein, the second index subtractor is a subtractor and the second index adder is an adder; The first input of the second index subtractor is used to receive the ordinate of the discrete point cloud transmitted from the interconnect bus, wherein the ordinate of the discrete point cloud transmitted to the second index subtractor by the interconnect bus originates from the memory module. The second input of the second index subtractor is used to receive the vertical axis coordinate offset value transmitted from the interconnect bus; wherein, the preset coordinate offset value includes the vertical axis coordinate offset value; The first input of the second index adder is connected to the output of the second index subtractor; the second input of the second index adder is used to receive the vertical axis coordinate search step size transmitted from the interconnect bus; wherein, the search step size includes the horizontal axis coordinate search step size; the sum value output by the second index adder is configured as the vertical axis direction index value of the discrete point cloud mapped to the map storage space, and is set as the result output by the sixth pipeline structure.
11. The hardware acceleration circuit according to claim 10, characterized in that, The grid index module also includes a third index adder and an index multiplier. The third index adder is an adder, and the index multiplier is a multiplier. The first input of the index multiplier is connected to the output of the second index adder; the second input of the index multiplier is used to receive the number of row grids transmitted from the interconnect bus, wherein the number of row grids is the number of grids that each row of the map storage space can occupy. The first input of the third index adder is connected to the output of the first index adder, and the second input of the third index adder is connected to the output of the index multiplier. The third index adder is used to control the product of the number of row grids and the sum of the output of the second index adder, add it to the horizontal axis index value, and then set the sum obtained by addition as the index value of the discrete point cloud in the map storage space, and send it to the interconnect bus.
12. The hardware acceleration circuit according to claim 10, characterized in that, The grid index module also includes a third index adder and an index multiplier. The third index adder is an adder, and the index multiplier is a multiplier. The first input of the index multiplier is connected to the output of the first index adder; the second input of the index multiplier is used to receive the number of column grids transmitted from the interconnect bus; wherein, the number of column grids is the number of grids that each column of the map storage space can occupy; The first input of the third index adder is connected to the output of the second index adder, and the second input of the third index adder is connected to the output of the index multiplier. The third index adder is used to add the product of the number of column grids and the sum of the output of the first index adder to the index value in the vertical axis direction, and then set the sum obtained by addition as the index value of the discrete point cloud in the map storage space, and send it to the interconnect bus.
13. The hardware acceleration circuit according to any one of claims 1 to 12, characterized in that, The state machine module is a type of finite state machine. The state machine module is used to schedule the working states of the memory module, the point cloud processing module, and the raster index module, so that each time the point cloud processing module performs a rotation transformation and a discretization, the raster index module calculates the index value of a matching raster point in the raster map to be searched for a point cloud, and determines that a matching operation has been completed. This index value is the index value of the occupancy probability of the corresponding raster point.
14. The hardware acceleration circuit according to claim 13, characterized in that, The point cloud processing module is further configured to update the currently stored point cloud with the result of the current rotation transformation after each matching operation or each rotation transformation is performed, so that the point cloud processing module only uses the updated currently stored point cloud to perform a new rotation transformation until the index value of the occupancy probability corresponding to all currently collected point clouds is calculated.
15. The hardware acceleration circuit according to claim 14, characterized in that, The hardware acceleration circuit is externally equipped with a bus interface module, which includes a DMA controller module and a transmission bus. The DMA controller module is used to continuously transfer data stored in non-contiguous physical memory spaces in batches, reducing the number of CPU software interrupts triggered. The transmission bus includes a first bus and a second bus. The first bus has signal transmission and reception connections with the memory module, point cloud processing module, raster index module, state machine module, interconnection bus and DMA controller module respectively. The first bus is used to configure data transmission parameters for the DMA controller module. The first bus is also used to configure the parameter registers internally set by the hardware acceleration circuit. The second bus is connected to the DMA controller module and is used to transmit to the memory module the grid map to be searched pre-built by the CPU, the pre-configured sine function value at the corresponding rotation angle, the pre-configured cosine function value at the corresponding rotation angle, and the point cloud currently collected by the lidar. The transmission bus follows the AMBA protocol.
16. A chip, characterized in that, The chip integrates the hardware acceleration circuitry described in any one of claims 1 to 15.
17. A robot, characterized in that, The robot is internally equipped with the chip described in claim 16 for positioning in a pre-constructed grid map.
Citation Information
Patent Citations
Storage systems and methods for robotic picking
CA3149178A1
Laser radar data read-write control system and chip based on a robot
CN109857702A