Hardware acceleration circuit, chip and robot for point cloud transformation
By using hardware-accelerated point cloud rotation and discrete sub-modules and a pipelined structure for parallel computation, the problem of high computational complexity caused by state machine scheduling is solved, and the matching speed and efficiency of point cloud transformation to raster map are improved.
Patent Information
- Application Number
- CN202111202163.4
- 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
In existing SLAM algorithms for LiDAR-based mobile robots, the state machine scheduling of point cloud rotation and translation transformations results in high computational complexity, making it difficult to deploy on computing platforms with limited computing power.
A hardware acceleration circuit without state machine control is used to perform point cloud rotation and discretization through point cloud rotation submodule and point cloud discretization submodule, and parallel computing is performed using pipeline structure, eliminating the need for state machine control and hardware calculation of trigonometric functions.
It reduces working state cycles, counting triggers, and clock delays, improves the matching speed and parallel computing efficiency of point cloud transformation to raster map, and reduces system load.
Smart Images

Figure CN115984345B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of hardware accelerators, and more particularly to hardware acceleration circuits, chips, and robots for point cloud transformation. Background Technology
[0002] Currently, in SLAM algorithms for mobile robots based on LiDAR, correlation scanning matching algorithms are generally used to align the current LiDAR point cloud with the map through rotation and translation transformations; or to transform two or more adjacent LiDAR point clouds to the same coordinate system through coordinate transformations; or to register the LiDAR point cloud with a known map.
[0003] To ensure that point clouds can hit every region on the map at different rotation angles, existing accelerators use state machines in digital circuit systems to control the point cloud's continuous coordinate transformations to match it onto the grid map and predict and update the robot's pose in the grid map. However, scheduling coordinate rotation and translation transformations using state machines involves numerous working state loops, frequent counting triggers, clock delays, and, when necessary, CPU polling, further increasing the system's computational complexity and making it difficult to deploy on SLAM computing platforms with limited computing power. Summary of the Invention
[0004] To address the issues of massive computational load and latency encountered during state machine scheduling of laser point clouds, this invention employs a hardware acceleration method under non-state machine control to speed up the point cloud transformation process. The specific technical solution is as follows:
[0005] A hardware acceleration circuit for point cloud transformation is disclosed, electrically connected to a lidar system. The hardware acceleration circuit includes a point cloud processing module and a memory module. The point cloud processing module includes a point cloud rotation submodule and a point cloud discretization submodule. Both the point cloud rotation submodule and the point cloud discretization submodule are electrically connected to the memory module. The point cloud rotation submodule 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 discretization submodule reads the output result of the point cloud rotation submodule under 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. The memory module has a map storage space for storing a pre-built map to be searched. The memory module also stores a ring of point cloud acquired by the lidar and pre-set trigonometric function values. The currently stored point cloud is a ring of point cloud acquired by the lidar.
[0006] Compared to existing technologies, this technical solution does not utilize a state machine to control hardware acceleration circuits for point cloud rotation and translation transformations. It achieves point cloud transformation onto a raster map, enabling registration of the laser point cloud with a known map. It can directly interact with the memory without requiring a bus protocol to coordinate the state machine's operation. Furthermore, the point cloud processing module is designed as a pipelined structure for coordinate system transformations, eliminating the need for a state machine to index address information at specific clock cycles. This avoids issues such as looping work states, frequent counting triggers, and clock delays, reducing the load on the circuit system and accelerating parallel computing.
[0007] As a technical solution, the point cloud rotation submodule includes a first register, a second register, a first pipeline structure, and a second pipeline structure. Both the first and second registers are connected to the first pipeline structure, which reads the horizontal coordinates of the currently stored point cloud from the memory module and then controls the read horizontal coordinates to perform a rotation transformation. Both the first and second registers are also connected to the second pipeline structure, which reads the vertical coordinates of the currently stored point cloud from the memory module and then controls the read vertical coordinates to perform a rotation transformation. The memory module transmits the horizontal coordinates of the point cloud to the first register; the horizontal coordinates of the point cloud transmitted from the memory module to the first register are derived from the currently stored horizontal coordinates of the point cloud. The memory module caches the vertical coordinates of the point cloud in the second register; the vertical coordinates of the point cloud transmitted from the memory module to the second register are derived from the currently stored vertical coordinates of the point cloud. The first and second pipeline structures are parallel pipeline structures.
[0008] Furthermore, 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 preset trigonometric function value includes the cosine function value corresponding to the rotation angle reached in the current rotation transformation; the first input of the second point cloud multiplier is connected to the output 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 in the current rotation transformation, wherein the pre-set trigonometric function value includes the sine function value corresponding to the rotation angle reached in the current rotation transformation; the first input terminal of the point cloud subtractor is connected to the output terminal of the first point cloud multiplier, and the second input terminal of the point cloud subtractor is connected to the output terminal 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 abscissa result of the current rotation transformation output by the first pipeline structure.
[0009] Furthermore, 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 preset trigonometric function value includes the sine function value corresponding to the rotation angle reached in the current rotation transformation; the first input of the fourth point cloud multiplier is connected to the output of the second register. The connection includes: a second input terminal of the fourth point cloud multiplier, used to receive the cosine function value corresponding to the rotation angle reached by the current rotation transformation; wherein the pre-set trigonometric function value includes the cosine function value corresponding to the rotation angle reached by the current rotation transformation; a first input terminal of the point cloud adder is connected to the output terminal of the third point cloud multiplier, and a second input terminal of the point cloud adder is connected to the output terminal 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 sum output by the point cloud adder as the ordinate result of the current rotation transformation output by the second pipeline structure.
[0010] The two aforementioned technical solutions use a rotation matrix as the basic combinational logic operation architecture. They only use adders, subtractors, and multipliers to construct a parallel pipeline structure that simultaneously rotates and transforms the horizontal and vertical coordinates of the point cloud. This structure is used to receive and process the trigonometric function values pre-calculated by the software, eliminating the need for a hardware trigonometric function calculation module.
[0011] 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 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.
[0012] 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 terminal of the first discrete adder is connected to the output terminal of the point cloud subtractor in the first pipeline structure, and the first input terminal of the first discrete adder is used to receive the horizontal 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 memory module, 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, such that the sum is... 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 memory module. 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 memory module. The first discrete multiplier outputs the product value to the memory module. The product value output by the first discrete multiplier is configured as the horizontal coordinate value of the discrete point cloud, thus completing the discretization of the horizontal coordinates. This transforms the horizontal coordinate values of the currently stored point cloud into the coordinate system of the map to be searched. Simultaneously, the product value output by the first discrete multiplier is set as the discretization result output by the third pipeline structure.
[0013] Furthermore, 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, 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.
[0014] 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 of 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 memory module, 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, making the sum equal to... 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 memory module. 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 memory module. 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 and transforming the ordinate value of the currently stored point cloud into the coordinate system of the map to be searched. At the same time, the product value output by the second discrete multiplier is set 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.
[0015] The technical solutions of the aforementioned third and fourth pipeline structures both construct combinational logic circuit structures. For each point cloud, the horizontal and vertical coordinates are read from the storage space containing the point cloud 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 raster coordinate system of the map to be searched, with the same offset along each adaptive coordinate axis. This includes swapping the coordinate axes of the point cloud to achieve coordinate system transformation. Then, it is multiplied by the reciprocal of the map resolution, considering that the map positioning accuracy is limited by the map resolution. Thus, the discretization of the horizontal and vertical coordinates of the point cloud is completed through a hardware-based pipeline.
[0016] A chip integrating the aforementioned hardware acceleration circuitry. This facilitates the addition of peripheral interface circuitry to build embedded systems, enabling acceleration for both grid-based maps and TSDF maps.
[0017] A robot is equipped with a lidar sensor on its body for collecting point clouds. The robot also has a built-in chip that converts the collected point clouds onto a pre-built search map, improving parallelism and reducing the number of switches between the application and driver layers. This further enhances the real-time performance of the robot's scanning and matching capabilities. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of a hardware acceleration circuit for point cloud transformation disclosed in an embodiment of the present invention. Detailed Implementation
[0019] 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.
[0020] One embodiment of the present invention discloses a hardware acceleration circuit for point cloud transformation, wherein the hardware acceleration circuit is electrically connected to a lidar; the hardware acceleration circuit includes a point cloud processing module and a memory module; the point cloud processing module includes a point cloud rotation submodule and a point cloud discretization submodule; both the point cloud rotation submodule and the point cloud discretization submodule are electrically connected to the memory module; the point cloud rotation submodule is used to read the currently stored point cloud from the memory module and then control the read point cloud to perform a rotation transformation; the point cloud discretization submodule is used to read the output result of the point cloud rotation submodule under the current rotation transformation, 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 in the memory module; the memory module is provided with a map storage space for storing a pre-built map to be searched; the memory module is used to store a ring of point cloud collected by the lidar and pre-set trigonometric function values; the currently stored point cloud is a ring of point cloud collected by the lidar. In this embodiment, the pipeline structure set inside the point cloud processing module and the pipeline structure set inside the node search module are parallel, but a finite state machine is not required to schedule the data transmission between the modules.
[0021] The point cloud processing module is used to read the currently stored point cloud from the memory module and then control the read point cloud to perform rotation transformation; wherein, the currently stored point cloud is a batch of point clouds that have undergone correlation scanning and matching operations in the hardware acceleration circuit, referred to as the currently processed batch of point clouds, specifically from... Figure 1The 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.
[0022] The point cloud processing module reads the result of the current rotation transformation (the latest batch of point clouds being processed) from the memory module, then controls the result of the current rotation transformation to perform discretization, including sequentially performing offset transformations of the horizontal and vertical coordinate values and adjusting the map resolution. The discretized result is then set as a discrete point cloud, falling into the coordinate system of the map to be searched, thus transforming the currently processed batch of point clouds into the coordinate system of the map to be searched. The discrete point cloud is then stored in the memory module. It is important to emphasize that each matching process in the correlation scan matching of the point cloud to the map to be searched includes one rotation transformation and one discretization to obtain a discrete point cloud, thereby discretizing the point cloud onto the coordinate system (raster coordinate system) of the map to be searched. Discretization includes coordinate translation and resolution conversion. The currently stored point cloud, i.e. Figure 1 The point cloud contained within the boxes marked "Point Cloud" originates from LiDAR data collection. It should be noted that within the aforementioned search map, the value within each grid cell represents the probability that the cell is occupied. The process of aligning the point cloud to the search map can be understood as: the point cloud, scanned by the LiDAR and used to represent obstacles, is rotated and translated to the obstacle grid cells within the search map. Preferably, the point cloud processing unit calls associated computing units to perform the rotation and translation to achieve overlap between the point cloud and the obstacles, improving robustness. It should be noted that the search map is a pre-constructed grid map.
[0023] The memory module includes a map storage space for storing a pre-built map to be searched; another memory module stores a ring of point clouds acquired by the LiDAR and pre-set trigonometric function values. It should be noted that the occupancy probability of each point cloud in the map to be searched has a matching index value. Those skilled in the art, based on their understanding of the raster map constructed from LiDAR point clouds, can easily understand that the occupancy probability of a point cloud is a matching index value for the occupancy probability of the point cloud in the raster map, and also the probability value of the matched raster points being occupied after the point cloud is converted into a raster within the map to be searched by the point cloud processing module.
[0024] 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 disclosed in this invention is, but is not limited to, a digital circuit module compiled by the designer using the hardware description language Verilog HDL, or a digital circuit module formed by the designer through circuit drawing or compilation on 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.
[0025] Compared to existing technologies, this embodiment does not utilize a state machine to control hardware acceleration circuits for point cloud rotation and translation transformations. Instead, it transforms the point cloud onto a raster map, achieving laser point cloud registration with a known map with minimal clock signal triggering. It can directly interact with the memory without requiring a bus protocol to coordinate the state machine's operation. Furthermore, the point cloud processing module is designed as a pipelined structure for coordinate system transformations, eliminating the need for a state machine to index raster address information at specific clock cycles. This reduces the frequency of enable timing signals and accelerates parallel computing.
[0026] 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 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 a rotation transformation; both the first register and the second register are connected to the second pipeline structure, which reads the vertical coordinates of the currently stored point cloud from the memory module and then controls the read vertical coordinates of the point cloud to perform a rotation transformation; wherein, the memory module transmits the horizontal coordinates of the point cloud to the first register; the horizontal coordinates of the point cloud transmitted by the memory module to the first register are derived from the horizontal coordinates of the currently stored point cloud; wherein, the memory module caches the vertical coordinates of the point cloud in the second register; the vertical coordinates of the point cloud transmitted by the memory module to the second register are derived from the vertical coordinates of the currently stored point cloud; wherein, the first pipeline structure and the second pipeline structure are parallel pipeline structures.
[0027] 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 "-".
[0028] The first input of the first point cloud multiplier is connected to the output of the first register; wherein, the memory module transmits the x-coordinate of the point cloud to the input of the first register; the x-coordinate of the point cloud transmitted by the memory module to the first register is derived from the x-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.
[0029] 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 memory module 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 memory module through a connected register. Figure 1In 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 cache the cosine function value transmitted from the memory module, and then transmit the currently cached 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. The memory module includes the search window parameter register.
[0030] The first input of the second point cloud multiplier is connected to the output of the second register; wherein, the memory module caches the ordinate of the point cloud in the second register; the ordinate of the point cloud transmitted by the memory module to the second register is derived from the ordinate of the currently stored point cloud; in 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.
[0031] 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 memory module 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 memory module through a connected register. Figure 1In 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 cache the sine function value transmitted from the memory module, and then transmits the currently cached 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.
[0032] 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.
[0033] 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 "+".
[0034] 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.
[0035] 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 memory module 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 memory module 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 cache the sine function value transmitted from the memory module, and then transmits the currently cached 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 memory module with the sine function value corresponding to the rotation angle achieved in the current rotation transformation, and then outputs the product.
[0036] 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.
[0037] 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 cache the cosine function value transmitted from the memory module, and then transmit the currently cached 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.
[0038] 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.
[0039] In the embodiments of the first and second pipelined structures, the clock cycle delay of the output results of both the first and second pipelined structures depends on the number of pipeline stages, specifically the number of cascaded computational units used within each pipelined structure. The embodiments of the first and second pipelined structures use a rotation matrix as the basic combinational logic operation architecture. They construct a parallel pipelined structure that simultaneously rotates and transforms the horizontal and vertical coordinates of the point cloud using only adders, subtractors, and multipliers. This structure receives and processes the trigonometric function values corresponding to the pre-calculated step rotation angles, eliminating the need for a hardware trigonometric function calculation module and accelerating the discretization operation.
[0040] 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 to read the horizontal coordinate result of the current rotation transformation output by the first pipeline structure (which is essentially the output result of 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.
[0041] 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.
[0042] 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.
[0043] The second input of the first discrete adder is used to receive the horizontal coordinate of the robot's position transmitted from the memory module, wherein the horizontal coordinate of the robot's position is a pre-calculated horizontal axis coordinate value of the robot in the world coordinate system; preferably, the horizontal coordinate of the robot's position transmitted from the memory module 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's position transmitted from the memory module 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 first discrete adder is used to cache the horizontal coordinates of the robot's position transmitted from the memory module, 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 the 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 device 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.
[0044] 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 memory module; preferably, the maximum abscissa value of the map transmitted from the memory module 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 memory module 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... The register is used to cache the maximum horizontal coordinate value of the map transmitted from the memory module. The maximum horizontal coordinate value is preferably a boundary coordinate along the horizontal axis of the map. The currently cached maximum abscissa value of the map is also transmitted to the second input of the first discrete subtractor. The maximum abscissa value originates from the map size register and is transmitted from the map size register to the memory module; wherein, the map size register is a parameter register internally set in the hardware acceleration circuit, used to store the size range of the raster map that meets the bus width transmission requirements; the memory module includes the map size register. The 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 obtained from the subtraction. The difference output by the first discrete subtractor becomes the abscissa value of the raster map that meets the bus width transmission requirements.
[0045] 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 memory module; preferably, the reciprocal of the map resolution transmitted from the memory module can be stored in a register inside the point cloud discrete submodule, and the second input of the first discrete multiplier receives the reciprocal of the map resolution transmitted from the memory module through the connected register. 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 memory module, 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 memory module. The reciprocal of the map resolution originates from the map resolution register, and the memory module includes the map resolution register. The map resolution register is a parameter register set internally by the hardware acceleration circuit, used to store the resolution information of the map to be searched.
[0046] The first discrete multiplier is used to control the multiplication of the reciprocal of the map resolution with the difference output by the first discrete subtractor, and then output the product value, which is configured as the abscissa value of the discrete point cloud; the first discrete multiplier is used to output the product value to the memory module; the product value output by the first discrete multiplier is configured as the abscissa value of the discrete point cloud, thus completing the discretization of the abscissa, realizing the transformation of the abscissa value of the currently stored point cloud to the coordinate system of the 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.
[0047] As one embodiment, the point cloud discretization submodule further includes a fourth pipeline structure; the fourth pipeline structure is used 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.
[0048] 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.
[0049] 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.
[0050] The second input of the second discrete adder is used to receive the ordinate of the robot's position transmitted from the memory module, 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 memory module 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 memory module 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 memory module is used to cache the ordinate of the robot's position transmitted from the memory module, and then transmits the currently cached ordinate of the robot's 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's position. The robot position register is a parameter register set inside the hardware acceleration circuit. The memory module includes the robot position register; 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's position, and then output the sum, so that the sum becomes the ordinate coordinate value of the point cloud in the world coordinate system.
[0051] 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 memory module; preferably, the maximum ordinate value of the map transmitted from the memory module 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 memory module 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 memory module is used to cache the maximum vertical coordinate value of the map (preferably a boundary coordinate on the vertical axis of the map) transmitted from the memory module, and then transmit the currently cached maximum vertical coordinate value to the second input of the second discrete subtractor. The maximum vertical coordinate value of the map originates from the map size register, and the memory module includes the map size register; the second discrete subtractor is used to control the subtraction of the maximum vertical coordinate value of the map with the sum output of the second discrete adder, and then output the difference obtained by the subtraction; the difference output by the second discrete subtractor becomes the vertical coordinate value of the raster map that meets the transmission requirements of the bus width.
[0052] 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 memory module; preferably, the reciprocal of the map resolution transmitted from the memory module 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 memory module through the connected register. Figure 1 As shown, the second input of the second discrete multiplier is connected to register 1 / R (marked with a box labeled 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, transforming the currently stored ordinate values of the point cloud into the coordinate system of the 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 by multiplication to the memory module through the memory module, and to determine that this product is the ordinate of the currently aligned and matched node on the map to be searched. The second discrete multiplier is also used to output the product obtained by multiplication to the memory module.
[0053] 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 combinational logic structures. For each point cloud, the horizontal and vertical coordinates are read from the storage space containing the point cloud 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 raster coordinate system of the map to be searched along the adaptive coordinate axes 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, considering that the map positioning accuracy is limited by the map resolution. Thus, the discretization of the horizontal and vertical coordinates of the point cloud is completed through a hardware-based pipeline.
[0054] One 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, enabling the acceleration obtained by the heterogeneous chip to promote real-time conversion and matching of high frame rate point cloud maps, which can accelerate both occupied raster maps and TSDF maps.
[0055] Another embodiment of the present invention discloses a robot internally equipped with the aforementioned chip, used to convert the collected point cloud onto a pre-constructed search map, improving parallelism and reducing the number of switching between the application layer and the driver layer. This further improves the real-time performance of robot scanning and matching. Even with a relatively low frequency of the hardware acceleration circuit, this technical solution still has a significant advantage in operating speed, and can better meet the real-time requirements of mobile robot navigation and positioning.
[0056] 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 for point cloud transformation, characterized in that, The hardware acceleration circuit is electrically connected to the lidar; the hardware acceleration circuit includes a point cloud processing module and a memory module. The point cloud processing module includes a point cloud rotation submodule and a point cloud discrete submodule; both the point cloud rotation submodule and the point cloud discrete submodule are electrically connected to the memory module. The point cloud rotation submodule is used to read the currently stored point cloud from the memory module and then control the read point cloud to perform rotation transformation; The point cloud discretization submodule is used to read the output result of the point cloud rotation submodule under the current rotation transformation, 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 in the memory module. The memory module is equipped with map storage space for storing pre-built maps to be searched; 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 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 is used to read the horizontal coordinates of the currently stored point cloud from the memory 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, which is used to read the ordinate of the currently stored point cloud from the memory module and then control the read ordinate of the point cloud to perform a rotation transformation. The memory module transmits the x-coordinate of the point cloud to the first register; the x-coordinate of the point cloud transmitted by the memory module to the first register is derived from the x-coordinate of the currently stored point cloud. The memory module caches the ordinates of the point cloud in the second register; the ordinates of the point cloud transmitted by the memory module to the second register are derived from the ordinates of the currently stored point cloud. Among them, the first pipeline structure and the second pipeline structure are parallel pipeline structures; The point cloud discretization submodule includes a third pipeline structure; the third pipeline structure is used 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.
2. The hardware acceleration circuit according to claim 1, 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 terminal 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 pre-set trigonometric function value includes the cosine function value corresponding to the rotation angle reached by the current 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, wherein the preset trigonometric function value includes 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.
3. The hardware acceleration circuit according to claim 1, 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 preset trigonometric function value includes the sine function value corresponding to the rotation angle reached by the current 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; wherein, the preset trigonometric function value includes 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.
4. The hardware acceleration circuit according to claim 2, 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 memory module, 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 memory module. 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 memory module. The first discrete multiplier is used to output the product value obtained by multiplication to the memory module; 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, so as to transform the horizontal coordinate value of the currently stored point cloud into the coordinate system of the map to be searched, and at the same time, the product value output by the first discrete multiplier is set as the discretization result output by the third pipeline structure.
5. The hardware acceleration circuit according to claim 3, characterized in that, The point cloud discretization submodule further 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, 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.
6. The hardware acceleration circuit according to claim 5, 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 memory module, 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 memory module. 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 memory module; 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, transforming the ordinate value of the currently stored point cloud into the coordinate system of the 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.
7. A chip, characterized in that, The chip integrates the hardware acceleration circuit described in any one of claims 1 to 6.
8. A robot, wherein a lidar is mounted on the robot's body for collecting point clouds; characterized in that, The robot is internally equipped with the chip described in claim 7, which is used to convert the collected point cloud onto a pre-built map to be searched.
Citation Information
Patent Citations
Laser radar data read-write control system and chip based on a robot
CN109857702A
Laser positioning system based on hardware acceleration and chip
CN111679286A