Positioning processor and laser point data processing system
By setting up multiple data channels in the positioning processor to perform position transformation in parallel and using the state machine control module to perform synchronous calculations, the problems of excessive resource consumption and slow positioning speed caused by laser point cloud processing in the existing technology are solved, achieving a more efficient The laser point data processing and positioning speed is improved.
Patent Information
- Application Number
- CN202310159818.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-24
- Publication Date
- 2024-08-27
AI Technical Summary
In the existing technology, when a cleaning robot uses a laser map for indoor positioning, the software algorithm needs to perform a large number of iterative calculations to process the laser point cloud, resulting in excessive system resource consumption, causing bus data congestion, and reducing the algorithm positioning speed.
A positioning processor and laser point data processing system is designed. By setting up multiple data channels to perform position transformation in parallel, and using the state machine control module to synchronously calculate angle deflection and coordinate offset, it can reduce the delay time of each working state entry and improve processing efficiency.
The efficiency of the laser point data processing system is improved, the output delay time of the positioning processor is shortened, the execution speed of the positioning software algorithm is accelerated, and the hardware resource occupation and chip area are reduced.
Smart Images

Figure CN118550852A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of algorithm hardware implementation, and in particular to a positioning processor and a laser point data processing system. Background Art
[0002] For cleaning robots that use laser maps for indoor positioning, the industry mostly uses software algorithms to implement it, performing a large number of iterative calculations to process laser point clouds, so as to obtain the target location information on the map. This consumes a lot of software resources and squeezes out the needs of other applications in the system for the same memory bandwidth, which can easily cause bus data congestion and reduce the algorithm positioning speed.
[0003] The prior art sets two channels in the hardware computing circuit to perform batch data multiplication and addition calculations alternately, or configures multiple data signals to one channel for multiplication and addition calculations, resulting in a long delay time before the read-write state machine enters a new working state each time, for example, waiting for at least one round of multiplication and addition calculation time before other rounds of multiplication and addition calculations can be performed, thereby affecting the execution efficiency of the software algorithm. Summary of the invention
[0004] This application discloses a positioning processor and a laser point data processing system, and the specific technical solutions include: The positioning processor is configured to be connected to the cache memory, and the cache memory is connected to the DDR memory; a state machine control module and a position transformation processing module are set inside the positioning processor; a plurality of data channels are set inside the position transformation processing module; the DDR memory is used to store laser point data; the cache memory is used to read out the laser point data from the DDR memory in bursts or in a single time under the control of the state machine control module; the position transformation processing module is used to read out the laser point data from the cache memory in bursts under the control of the state machine control module, and then transmit each laser point data read out in bursts to each data channel at the same time, and control each data channel to start synchronously from the corresponding transformation starting point reference amount. Multiple rounds of position transformation are performed so that each data channel simultaneously obtains multiple target offset coordinates and their corresponding positioning probability values; the transformation starting point reference quantities corresponding to each data channel are different from each other, and the number of rounds of position transformation required for each data channel is equal; a position transformation processing module is used to accumulate the positioning probability values corresponding to the target offset coordinates obtained by the same round of position transformation in each data channel in turn to obtain a positioning probability and value; a positioning processor is used to, under the control of a state machine control module inside the processor, burst write the accumulated positioning probability and value into a cache memory, or write it into the cache memory once; the cache memory is used to burst write the positioning probability and value into the DDR memory under the control of the state machine control module.
[0005] Furthermore, the target on-chip memory is not provided inside the positioning processor, so that the cache memory replaces the target on-chip memory to cache the data transmitted between the positioning processor and the DDR memory.
[0006] Furthermore, the positioning processor is also used to support software instructions to select a positioning probability and value with the largest value from all positioning probabilities and values required for locating a target position, and then set the correction position corresponding to the positioning probability and value with the largest value as the position relocated by the positioning processor in the block map; whenever a preset number of laser point data are all processed by the position transformation processing module as positioning probabilities and values at corresponding correction positions, all positioning probabilities and values required for locating a target position are obtained; wherein, the number of rounds of position transformation required for the same laser point data in a data channel is equal to the number of positioning probabilities and values accumulated by the preset number of laser point data in a data channel; the correction position corresponding to a positioning probability and value is represented in the block map, and is the coordinate position obtained by a round of target transformation relative to the origin of the coordinate system; the target transformation is a round of position transformation required by the position transformation processing module to obtain the same positioning probability and value.
[0007] Furthermore, the positioning probability value corresponding to the target offset coordinates indicates the probability that the laser point data of the target offset coordinates obtained after a round of position transformation falls into the corresponding position of the block map, or indicates the probability that the laser sensor falls into the corresponding position of the block map, or indicates the probability that the cell position of the block map is occupied by an obstacle that reflects the laser point data; each target offset coordinate obtained after a round of position transformation of the laser point data corresponds to a positioning probability value, and is pre-set for the position transformation processing module to call; the outside of the DDR memory is constructed to connect to the laser sensor so that the DDR memory stores the laser point data collected by the laser sensor; wherein, the current position of the laser sensor is used as the origin of the coordinate system, and the block map is generated within the effective detection range of the laser sensor; the block map is a local map of a preset size.
[0008] Further, the position transformation processing module includes a preset parallel number of angle deflection calculation units, a preset parallel number of coordinate offset calculation units, and a preset parallel number of accumulators; the preset parallel number of angle deflection calculation units are each marked with a serial number, the preset parallel number of coordinate offset calculation units are each marked with a serial number, and the preset parallel number of accumulators are each marked with a serial number; the serial numbers marked by the preset parallel number of angle deflection calculation units are different, the serial numbers marked by the preset parallel number of coordinate offset calculation units are different, and the serial numbers marked by the preset parallel number of accumulators are different; the serial numbers marked by the preset parallel number of angle deflection calculation units, the serial numbers marked by the preset parallel number of coordinate offset calculation units, and the serial numbers marked by the preset parallel number of accumulators are all within the same numerical range; an angle deflection calculation unit is connected A coordinate offset calculation unit with the same serial number, a coordinate offset calculation unit connected to an accumulator with the same serial number, an angle deflection calculation unit, a coordinate offset calculation unit and an accumulator with the same serial number are sequentially connected into a data channel and marked as a data channel with the corresponding serial number; when the transformation starting point reference quantity is expressed as the reference deflection angle required by the angle deflection calculation unit, the difference between the reference deflection angle of the i-th angle deflection calculation unit and the reference deflection angle of the (i-1)-th angle deflection calculation unit is equal to the product of the target deflection number and the angle deflection step length, wherein i is set to be greater than or equal to 2, and i is set to be less than or equal to the preset parallel number; for the same laser point data input into each data channel, the number of angle deflections required to be executed by each angle deflection calculation unit is equal.
[0009] Furthermore, the state machine control module includes a burst read control module, a single read control module and a transformation control module; an angle deflection calculation unit is used to read a batch of laser point data from the cache memory in burst under the triggering action of the burst read command issued by the burst read control module, wherein the number of the batch of laser point data is equal to the burst length; or, under the triggering action of the single read command issued by the single transmission control module, read a batch of laser point data from the cache memory in a single time, wherein the number of the batch of laser point data is equal to the single length; the burst read control module or the single read control module schedules the angle deflection by counting. The laser point data is read out by the rotation calculation unit multiple times, so that the preset positioning number of laser point data are read into the position transformation processing module; the preset parallel number of angle deflection calculation units are used to control the laser point data in parallel to perform angle deflection calculation whenever the laser point data is obtained in parallel, obtain the corresponding reference coordinates, and then transmit the reference coordinates to the coordinate offset calculation unit with the same serial number; the reference coordinates obtained in each angle deflection calculation unit are different; the preset parallel number of coordinate offset calculation units are used to control the reference coordinates in parallel to perform coordinate offset along the same coordinate axis direction whenever the reference coordinates are obtained in parallel; the preset parallel number of A number of coordinate offset calculation units are also used to set the reference coordinates after the parallel acquired reference coordinates after a coordinate offset in the direction of the first coordinate axis and a coordinate offset in the direction of the second coordinate axis as the target offset coordinates, and then index the positioning probability value corresponding to the target offset coordinates; in each data channel, the transformation control module first triggers the coordinate offset calculation unit to index the positioning probability value corresponding to the target offset coordinates obtained by the same round of position transformation by counting, and then orderly outputs the target offset coordinates obtained by the same round of position transformation to the accumulator connected to the coordinate offset calculation unit. The corresponding positioning probability value; a preset parallel number of accumulators, used to receive the positioning probability values in parallel in a first-in-first-out manner, and then accumulate each received positioning probability value once in each accumulator, and whenever the transformation control module counts that the number of accumulations in the accumulator reaches the preset positioning number, the current accumulation result is set as a positioning probability sum value, and it is determined that the number of laser point data participating in the same round of position transformation reaches the preset positioning number; wherein the preset parallel number is pre-configured; the preset positioning number represents the number of laser point data required for locating a target position of the block map.
[0010] Furthermore, whenever an angle deflection calculation is performed on the same laser point data, a new reference coordinate is obtained, and then a coordinate offset calculation is performed on the new reference coordinate to obtain a new target offset coordinate and index it to a corresponding positioning probability value; a round of position transformation includes an angle deflection calculation and a coordinate offset calculation, and a coordinate offset calculation includes a horizontal coordinate offset calculation and a vertical coordinate offset calculation; wherein, the same type of angle deflection calculation and the same type of coordinate offset calculation are represented by the same round of position transformation; when the same type of angle deflection calculation and the same type of coordinate offset calculation are represented by the same round of position transformation, in each coordinate offset calculation unit, the same type of coordinate offset calculation refers to the horizontal coordinate offset calculation method and the vertical coordinate offset calculation method are the same coordinate transformation calculation, so that the laser point data after the same type of angle deflection calculation and the same type of coordinate offset calculation in the same data channel have the same relative posture relationship with the laser point data before the calculation; wherein, when the same laser point data is subjected to angle deflection calculation in different angle deflection calculation units, the required reference deflection angle is different.
[0011] Furthermore, a round of position transformation includes: each time the position transformation processing module performs an angle deflection operation, the position transformation processing module controls the corresponding reference coordinate to first perform a coordinate offset along the first coordinate axis direction, and then perform a coordinate offset along the second coordinate axis direction to form a coordinate offset calculation method; wherein, when the first coordinate axis direction represents the horizontal coordinate axis direction, the second coordinate axis direction represents the vertical coordinate axis direction; or, when the first coordinate axis direction represents the vertical coordinate axis direction, the second coordinate axis direction represents the horizontal coordinate axis direction.
[0012] Furthermore, when the block map is represented as a grid map, the maximum number of grids allowed to be accommodated in the horizontal axis direction of the block map is greater than or equal to the product of the maximum number of offsets allowed for the same reference coordinate in the horizontal axis direction of the block map and the horizontal axis offset step, and the maximum number of grids allowed to be accommodated in the vertical axis direction of the block map is greater than or equal to the product of the maximum number of offsets allowed for the same reference coordinate in the vertical axis direction of the block map and the vertical axis offset step; wherein the position transformation processing module is pre-configured with the maximum number of offsets allowed for the reference coordinate in the horizontal axis direction of the block map and its coordinate offset step in the horizontal axis direction, and the maximum number of offsets allowed for the reference coordinate in the vertical axis direction of the block map and its coordinate offset step in the vertical axis direction.
[0013] Furthermore, each angle deflection calculation unit is used to, after acquiring the laser point data, respectively start from the corresponding reference deflection angle, rotate the target deflection times along the predetermined clock direction and around the origin of the coordinate system of the block map, and save the reference coordinates obtained from each rotation in sequence, so that each angle deflection calculation unit obtains reference coordinates equal to the target deflection times and transmits them to the coordinate offset calculation unit with the same serial number; each coordinate offset calculation unit is used to, after acquiring the reference coordinate, perform a coordinate offset calculation for a first preset number of traversals along the first coordinate axis direction of the block map and save the offset result of each coordinate offset in sequence, so as to obtain an offset result equal to the first preset number of traversals in the first coordinate axis direction of the block map; each coordinate offset calculation unit is also used to control the reference coordinate after the aforementioned coordinate offset to be moved along the first coordinate axis direction of the block map whenever a reference coordinate has performed a coordinate offset calculation once along the first coordinate axis direction of the block map. A coordinate offset calculation of a second preset number of traversals is performed in the direction of the second coordinate axis, and the offset results of each coordinate offset are saved in sequence to obtain offset results of the second preset number of traversals in the direction of the second coordinate axis, until the offset results obtained by performing coordinate offset calculation for a reference coordinate along the direction of the first coordinate axis are all coordinate offset calculations of the second preset number of traversals performed along the direction of the second coordinate axis, and a cumulative number of target offset coordinates of the product of the first preset number of traversals and the second preset number of traversals are obtained; and then in each data channel, when the same laser point data rotates through the target deflection number, the cumulative number of target offset coordinates obtained is the product of the target deflection number, the preset parallel number, the first preset number of traversals and the second preset number of traversals; wherein the number of coordinate offsets is obtained by counting the transformation control module to provide a basis for its scheduling; wherein, when the first coordinate axis is the horizontal coordinate axis, the second coordinate axis is the vertical coordinate axis; or, when the first coordinate axis is the vertical coordinate axis, the second coordinate axis is the horizontal coordinate axis.
[0014] Furthermore, the angle deflection calculation unit is used to perform an angle deflection calculation on the laser point data using pre-configured angle deflection information to obtain a reference coordinate, which is the coordinate of the laser point data on the block map after the angle deflection calculation; wherein, for each angle deflection calculation performed on the same laser point data in the same angle deflection calculation unit, the corresponding reference coordinates obtained are different; for each angle deflection calculation performed in parallel on the same laser point data in different angle deflection calculation units, the corresponding reference coordinates obtained are different; in different angle deflection calculation units, the reference coordinates obtained for the same laser point data at the same number of deflections have the same relative posture relationship with the reference coordinates obtained by the first angle deflection calculation.
[0015] Furthermore, the process of performing an angle deflection calculation on the laser point data using the pre-configured angle deflection information includes: establishing a trigonometric function relationship using the product of the deflection angle step and the current number of deflections, the sum of the initial deflection angle and the reference deflection angle corresponding to the laser point data, and the scanning radius of the laser sensor to calculate the reference coordinates generated by the current angle deflection calculation; wherein the information carried by the laser point data includes the scanning radius, the initial deflection angle formed by the coordinate position corresponding to the laser point data relative to the coordinate axis of the block map, and the angle deflection information of the laser point data, the scanning radius is the distance between the laser sensor and the coordinate position corresponding to the laser point data currently participating in the angle deflection calculation; the angle deflection information of the laser point data includes the deflection angle step required to be configured for the coordinate position corresponding to the laser point data to rotate around the origin of the coordinate system of the block map, the current number of deflections, and the target number of deflections; the scanning radius does not exceed the effective detection range of the laser sensor.
[0016] Furthermore, the state machine control module also includes a single write control module; the positioning processor also includes a write FIFO module; the position transformation processing module is used to write the positioning probabilities and values calculated by each accumulator into the write FIFO module in a single write according to a predetermined coordinate traversal order under the triggering action of a single write command issued by the single write control module; wherein the number of positioning probabilities and values written in a single time is the single length; wherein the predetermined coordinate traversal order is the order of traversing the coordinate positions in the block map by row change, or the order of traversing the coordinate positions in the block map by column change.
[0017] Furthermore, the state machine control module also includes a burst write control module; a write FIFO module, which is used to cache the positioning probabilities and values output by the position transformation processing module in a first-in-first-out storage manner, and burst-write the cached positioning probabilities and values into the cache memory under the triggering action of the burst write command issued by the burst write control module; wherein, whenever the number of positioning probabilities and values cached by the write FIFO module reaches the burst length, the burst write control module triggers the write FIFO module to write the positioning probabilities and values of the burst length into the cache memory at one time; the burst write control module counts the number of positioning probabilities and values cached by the write FIFO module by counting.
[0018] Furthermore, the commands issued by the burst read control module, the commands issued by the transformation control module, the commands issued by the single write control module, and the commands issued by the burst write control module all support the use of enable signals, count signals, or set signals, and are configured by registers set in each module; wherein the burst read control module, the transformation control module, the single write control module, and the burst write control module are all state machines implemented in hardware language, and the state machines are formed by connecting state registers of corresponding functions and combinational logic circuits; and are used to schedule the positioning processor to cyclically jump to different working states to keep reading multiple laser point data from the cache memory, and keep writing multiple positioning probabilities and values to the cache memory.
[0019] A laser point data processing system comprises a cache memory, a DDR memory and the positioning processor; the cache memory is connected between the positioning processor and the DDR memory, the outside of the DDR memory is constructed to be connected to a laser sensor, and the DDR memory stores the laser point data collected by the laser sensor.
[0020] Furthermore, the cache memory includes a first cache line and a second cache line; the cache memory is used to read the laser point data stored in the DDR memory and store it in the first cache line according to the read request instruction of the positioning processor, and then notify the positioning processor to read the data in the first cache line; wherein the read address information in the read request instruction of the positioning processor is derived from the burst read command issued by the burst read control module; the cache memory is also used to receive the positioning probability and value output by the positioning processor according to the write request instruction of the positioning processor, and store the positioning probability and value in the second cache line, and then notify the DDR memory to read the positioning probability and value in the second cache line; wherein the write address information in the write request instruction of the positioning processor is derived from the burst write command issued by the burst write control module.
[0021] Furthermore, before the positioning processor reads the laser point data from the cache memory each time, it indexes the data of each first cache line in turn; if the laser point data to be read exists in a first cache line of the current index, the laser point data to be read is read from a first cache line of the current index; if the laser point data to be read does not exist in all the first cache lines in the cache memory, the cache memory is triggered to burst read the data from the DDR memory, and store it to update the data in the corresponding first cache line, until the positioning processor reads the required laser point data from the first cache line.
[0022] Furthermore, if the number of laser point data obtained by the cache memory in a burst read from the DDR memory is less than or equal to the cache line length, the data burst read from the DDR memory is cached in a preset first cache line that is earliest read by the positioning processor to update part or all of the data in a preset first cache line that is earliest read by the positioning processor; wherein the cache line length is the number of consecutive address units set in a first cache line to determine the number of consecutive data in the address units in a first cache line; and the data storage capacity of each address unit is equal.
[0023] Furthermore, the number of address units on which the positioning processor has performed a burst transfer operation on the cache memory in one clock cycle is equal to the number of address units on which the positioning processor has performed a single transfer operation on the cache memory in one clock cycle; when the positioning processor accesses the external memory in a target type transfer operation, obtaining data from the cache memory is faster than obtaining data from the DDR memory; wherein the target type transfer operation is a burst transfer operation or a single transfer operation; wherein the burst transfer operation is a burst read operation or a burst write operation, and the single transfer operation is a single read operation or a single write operation.
[0024] The technical effects of this application are: Compared with the prior art, the positioning processor disclosed in the present application is provided with multiple data channels with different transformation starting point reference quantities, so as to support the parallel execution of different wheel position transformations for the same laser point data, and the corresponding wheel position transformations can be synchronously started in each data channel by setting the angle deflection difference, and each data channel does not repeatedly execute the same wheel position transformation for the same laser point data (the angle deflection calculation is the same (starting from the same transformation starting point reference quantity, the angles rotated at the same number of deflections are equal) and the coordinate offset calculation is the same (the coordinate offsets shifted at the same number of offsets in the same coordinate axis direction are equal)). Based on the state machine control logic, the positioning processor, under the control of the built-in state machine control module, reads a preset number of laser point data for positioning from the cache memory as source data (which can form a laser point cloud), and then shares it with each data channel, and allocates corresponding multiple rounds of position transformations (distinguished by the transformation starting point reference quantity) to each source data in each data channel, so that each data channel synchronously performs multiple rounds of position transformations that are different from each other, thereby shortening the delay time required for the state machine to enter a new working state, and the shortening multiple is positively correlated with the number of data channels.
[0025] The position transformation processing module inside the positioning processor will obtain multiple reference coordinates by performing the same number of angle deflection calculations as the number of rounds of position transformation, and then synchronously perform traversal and coordinate offset calculations on the calculated reference coordinates in each coordinate axis direction, so as to index and obtain the corresponding positioning probability value within the corresponding coordinate offset range; then the corresponding positioning probability values obtained by the same round of position transformation in the data channel can be accumulated through the accumulator, and after the same round of position transformation is performed in sequence in the same data channel for the number of laser points with a preset positioning number, the preset positioning number of target offset coordinates are obtained and the same number of positioning probability values are indexed and sent to the accumulator of the data channel. Under the counting control of the state machine control module, whenever the number of consecutive accumulations of the accumulator is equal to the preset number of positioning, a positioning probability and value is obtained, and then the positioning probability and value corresponding to the same laser point data in each round of position transformation are synchronously calculated by multiple data channels, thereby saving the time required for the position transformation processing module to wait for calculation, and improving the multiplexing ability and iterative processing speed of the laser point data of the position transformation processing module; therefore, under the condition of certain hardware resources and occupied chip area, the more data channels used for position transformation, the faster the speed of obtaining the positioning probability and value, and the faster the execution efficiency of the positioning software algorithm, which is equivalent to shortening the output delay time of the processor as a whole.
[0026] In order to obtain a positioning probability and value, it is necessary to synchronously control the reference coordinates obtained through different types of angle deflection calculations to be offset along the horizontal axis direction of the block map and along the vertical axis direction of the block map in the same data channel, and output a sufficient number of coordinate offset states in parallel for the positioning of the repositioning algorithm at the software execution level to ensure the accuracy of repositioning; then the positioning probability values (corresponding to the target offset coordinates obtained by the same type of angle deflection calculation and the same type of coordinate offset calculation) synchronously output by the same data channel through the index cache are accumulated, so that each data channel can obtain a positioning probability and value with positioning value separately, without setting two channels to perform batch data multiplication and addition calculations alternately, so as to speed up the software instructions to select the positioning probability and value with the largest value from all the positioning probabilities and values required for locating a target position, and then set the correction position corresponding to the positioning probability and value with the largest value as the position relocated by the positioning processor in the block map.
[0027] In the case where the preset parallel number of angle deflection calculation units simultaneously control the laser point data to perform angle deflection calculation, the difference between the reference deflection angle of the i-th angle deflection calculation unit and the reference deflection angle of the (i-1)-th angle deflection calculation unit is equal to the product of the target deflection number (the maximum angle deflection number allowed by the position transformation processing module) and the angle deflection step length, so that the angle difference between two angle deflection starting points with adjacent serial numbers is constructed as the difference in the reference amount of the transformation starting point. For the same laser point data, within all data channel angles, the angle deflection conditions executed in parallel are fully reflected as all angle deflection conditions of a laser point data in a continuous manner). In this embodiment, multiple data channels are set to synchronously perform different rounds of position transformation; even if the laser points are discretely distributed in the block map, through the traversal and caching of the accumulator, the multiple positioning probability values transmitted in parallel are all positioning probability values corresponding to the target offset coordinates obtained by different rounds of position transformation, and the positioning probability and value can be obtained by direct traversal and accumulation. This speeds up the acquisition of positioning probability and value, speeds up the execution efficiency of the positioning software algorithm, and is equivalent to shortening the output delay time of the processor as a whole. If the robot where the positioning processor is located moves, the laser point data in the angle deflection calculation unit will be updated with the newly collected data. As long as the positioning processor keeps refreshing the positioning probability value in real time under the cyclic scheduling of the state machine control module, the new relocation position can be matched with the new positioning probability and value, speeding up the overcoming of the influence of point cloud data noise and positioning error collected by the laser sensor, improving the real-time performance of the positioning system processor in various positioning environments, and being able to efficiently complete the relocation of the laser map where the block map is located.
[0028] In the present application, if the robot equipped with the positioning processor loses its positioning, the positioning processor controls the angle deflection calculation unit to perform an offset operation on the laser point data according to the set angle deflection step length, and obtains the reference coordinates transformed into the corresponding laser point data after the angle deflection, so as to correct the angle deflection error of the robot posture, and facilitate the positioning algorithm of the prior art to obtain the probability value at the corresponding coordinate position and perform the offset calculation in the coordinate axis direction within a small range. To adapt to the phenomenon of left and right deflection during the repositioning process of the mobile robot. The number of all positioning probabilities and values required for locating a target position is equal to the product of the maximum number of offsets of the same laser point data in the ordinate axis direction of the block map, the maximum number of offsets of the same laser point data in the abscissa axis direction of the block map, and the maximum number of angle deflections of the same laser point data around the origin of the coordinate system of the block map, wherein the maximum number of offsets in various coordinate axis directions and the maximum number of angle deflections around the origin of the coordinate system of the block map are pre-set to allow the positioning algorithm used in the current scene to filter out a positioning probability and value with the largest value.
[0029] Compared with the existing software CPU processing point cloud data of the same size, in the laser point data processing system disclosed in the present application, the working state control of the state machine control module and the position transformation processing module perform angle deflection calculation and coordinate offset calculation in parallel, taking into account the errors generated during the rotation of the laser sensor or the movement of the laser point data processing system, and the cache memory is set between the positioning processor and the DDR memory as a cache intermediary, supporting the cache of laser point data and map information (angle, coordinate and probability value). When the positioning processor accesses the DDR memory through the cache memory, it will not occupy a large amount of DDR bandwidth, reducing the frequency requirements, and can also achieve the maximum saving of hardware resources. Speed up the parallel calculation speed of the reference coordinates within the offset area of the block map. Shorten the calculation time of the position probability information; then write the positioning probability and value to the DDR memory through the cache memory for software call to complete the repositioning, and realize the multi-channel and batch synchronous accumulation operation output of the positioning probability and value by the positioning processor.
[0030] Under the premise that the positioning processor does not use large-capacity embedded SRAM and embedded flash to cache laser point data and map data, a dedicated cache memory is connected between the positioning processor and its external DDR memory to replace the on-chip memory to perform large-capacity application storage functions and cache laser point data (sampling data) and map data (coordinate probability information required for positioning calculation), thereby eliminating the need to develop a larger-capacity processor chip in the laser point data processing system, overcoming the problem of needing to expand the processor chip area due to the capacity of the embedded memory and reducing the development cost of the processor chip. In the case where the cache memory allows the DDR memory to be accessed in a burst transfer operation mode, and the positioning processor allows the cache memory to be accessed in a single transfer operation mode, since the number of address units that the positioning processor has performed a burst transfer operation on the cache memory in one clock cycle is equal to the number of address units that the positioning processor has performed a single transfer operation on the cache memory in one clock cycle, the number of data transferred by the positioning processor in the same clock cycle when the positioning processor accesses the cache memory in a burst transfer operation and when the positioning processor accesses the cache memory in a single transfer operation mode is the same; therefore, the access of the positioning processor to the DDR memory without setting the target on-chip memory will not be affected by the single transfer operation (derived from the access efficiency restriction of the single transfer operation), and since the positioning processor accesses the cache memory faster than the DDR memory when the positioning processor performs the same type of transfer operation mode; therefore, in the case where the cache memory has pre-stored data that the positioning processor needs to access, the positioning processor will preferentially search in the corresponding cache line of the cache memory in a burst transfer operation mode or a single transfer operation mode, thereby improving the access efficiency to the DDR memory. Moreover, when the cache memory is configured to access the DDR memory in a burst transfer operation mode and the positioning processor is configured to access the cache memory in a single transfer operation mode, the corresponding read and write efficiency is higher than the read and write efficiency generated by the positioning processor accessing the DDR memory in a single transfer operation mode. The problem of low efficiency when the positioning processor directly accesses the DDR memory in a single transfer operation mode is solved. Therefore, the cooperation between the cache memory and the DDR memory ensures that the instruction fetch operation of the positioning processor can be performed quickly and efficiently.
[0031] Outside the positioning processor, the cache memory can read the data of a cache line from the large-capacity DDR memory at one time, so as to update and replace the data corresponding to a cache line in the cache memory, thereby refreshing the cache data with a cache line length as the granularity, and realizing that the positioning processor indexes the first target data to be read from the corresponding cache line of the plug-in with a cache line length as the granularity, taking into account both the accuracy and real-time performance of the positioning processor accessing data and the space capacity burden of the embedded memory of the positioning processor; the positioning processor does not need to move the laser point data and map data to the on-chip storage area, but only needs to access and refresh the cache data from the cache memory on demand, thereby reducing the intervention of the software on the positioning processor, allowing the positioning processor to release more hardware computing resources to the position transformation processing module to perform angle deflection calculation and coordinate offset calculation, thereby accelerating the positioning processor to generate positioning probability and value. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A schematic diagram of a laser point data processing system equipped with a positioning processor is disclosed for this embodiment. Implementation
[0033] The specific implementation methods of the present invention are further described below in conjunction with the accompanying drawings. Each module involved in the following implementation methods is a logic circuit unit. A logic circuit unit can be a physical unit, or a state machine composed of multiple logic devices according to certain read and write timings and signal logic changes, or a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of the present application, the implementation methods of the present application do not introduce units that are not closely related to solving the technical problems proposed by the present invention, but this does not mean that there are no other units in the implementation methods of the present invention.
[0034] When the mobile robot walks in the environment area, it uses a laser sensor to scan the surrounding environment, collects laser points fed back from various directions, and converts them into a unified coordinate system to establish a laser map, which can also be regarded as a combination of block maps in multiple local coordinate systems into a laser map; then the target position can be determined based on the probability information of the collected laser points falling into the corresponding map coordinate position, so that the mobile robot can use the laser map to relocate the target position, which is the position where the robot has located but lost its coordinate information. Specifically, the laser sensor is a laser radar that can rotate 360 degrees. The laser radar has a built-in laser probe and a motion rotation mechanism. The motion rotation mechanism can support the 360-degree rotation of the laser probe. Therefore, under the driving action of the motion rotation mechanism, the laser probe revolves around the rotation center of the laser radar, and each rotation obtains laser point cloud data, that is, a collection of laser points formed around the laser probe. The laser point data scattered in the block map are all necessary data for positioning. When the target position to be positioned is lost in the map, it is necessary to restore the positioning of the target position. However, the distribution of large amounts of map information or laser points is often discrete. Therefore, the present application designs a logic circuit module to process data in parallel. Specifically, an off-chip memory is used to store the laser point data scanned by the laser and the map data of the pre-built block map. Then, a hardware circuit is used to implement a repositioning algorithm, that is, the laser point data is iteratively processed by a hardware circuit to obtain the probability and value, and then the probability and value are written into a special storage device to accelerate the process of traversing and obtaining the probability and value, so that the software can obtain the target position on the map only by comparing the probability and value.
[0035] As an embodiment, a positioning processor is disclosed, referring to Figure 1It can be seen that the positioning processor is configured to be connected to the cache memory, and the cache memory is connected to the DDR memory; the positioning processor is internally provided with a state machine control module and a position transformation processing module; the state machine control module adopts a state machine control method to generate a control signal for controlling the operation of the position transformation processing module, which is also regarded as controlling the operation of the positioning processor; if a plurality of computing units are divided in the position transformation processing module, and each computing unit has an iterative calculation requirement of a corresponding iterative starting point, then the state machine control module configures a state machine for each computing unit to ensure that the computing unit starts iterative calculation from the corresponding iterative starting point, and at the same time, the state machine control module also sets relevant registers to provide read instructions and write instructions specifically for each state machine, including but not limited to the control functions of triggering, enabling, setting, resetting, clearing, conversion of working state, and beating counting. There are multiple data channels in the position transformation processing module, each of which includes the aforementioned various computing units, and supports reading, writing and iterative calculation under the control of the state machine, and runs in parallel. The DDR memory is used to store the laser point data collected by the external laser sensor, and provide the positioning processor with source data for indexing probability information.
[0036] In this embodiment, the positioning processor is used to read out the laser point data from the cache memory in a burst or in a single time under the control of the internally set state machine control module, and then transmit each laser point data read out to each data channel at the same time, so that each data channel obtains the same laser point data at the same time; the positioning processor also controls each data channel to synchronously perform multiple rounds of position transformation from the corresponding transformation starting point reference quantity, so that each data channel synchronously obtains multiple different target offset coordinates and their corresponding positioning probability values, wherein the transformation starting point reference quantity corresponding to each data channel is different from each other, and the starting point of the position transformation of the laser point data cached by each data channel is different and different types of angle deflection calculations will be performed in the same clock cycle to perform different rounds of position transformation respectively. In order to ensure that each data channel obtains the same number of positioning probability values, it is necessary to control the number of rounds of position transformation required for each data channel to be equal, that is, it is necessary to control the number of target offset coordinates output by each data channel to be equal.
[0037] It should be noted that a target offset coordinate calculated in the positioning processor is the result of a laser point data undergoing a round of position transformation in a data channel. A target offset coordinate can be indexed to a corresponding positioning probability value. Multiple rounds of position transformation can be performed in a data channel or multiple rounds of position transformation can be performed successively, so that a data channel can obtain multiple target offset coordinates and their corresponding positioning probability values. However, other data channels perform other rounds of position transformation on the same laser point data, which may be a larger round of position transformation, that is, more angle deflections (larger deflection angles relative to the transformation starting point reference amount) or more coordinate offsets (larger coordinate offsets relative to the transformation starting point reference amount).
[0038] The position transformation processing module is used to accumulate the positioning probability values corresponding to the target offset coordinates obtained by the same round of position transformation in each data channel in turn to obtain the positioning probability and value, so that each data channel of the position transformation processing module can obtain multiple positioning probability and values at the same time, wherein the positioning probability and value is accumulated by a preset number of positioning probability values in one data channel, and the target offset coordinates corresponding to the preset number of positioning probability values are respectively derived from the laser point data that have performed the same round of position transformation in the same data channel. One round of position transformation means that an angle deflection is first performed on a laser point data, and then a coordinate offset is performed along one coordinate axis direction, and then a coordinate offset is performed along another coordinate axis direction; for the target offset coordinates generated by multiple different laser point data after the same round of position transformation, the angle deflection amount generated relative to the transformation starting point reference amount is not necessarily equal, and the angle deflection amount generated relative to the transformation starting point reference amount is not necessarily equal. Inside the positioning processor, the number of data channels is fixed and does not change due to changes in instructions.
[0039] The positioning processor is used to write the positioning probability and value obtained by the internal position transformation processing module into the cache memory in burst under the control of the internal state machine control module, or write the positioning probability and value obtained by the internal position transformation processing module into the cache memory once. The cache memory is used to write the positioning probability and value into the DDR memory in burst under the control of the state machine control module, which is more efficient than the cache memory writing the positioning probability and value into the DDR memory once in the same time.
[0040] In this embodiment, the cache memory is arranged between the positioning processor and the DDR memory as a cache intermediary, and supports caching laser point data and map information (angle, coordinates and probability values). When the positioning processor accesses the DDR memory through the cache memory, it will not occupy a large amount of DDR bandwidth, reduce the frequency requirement, and can also achieve the maximum saving of hardware resources, and speed up the parallel calculation speed of the reference coordinates within the offset area of the block map matching. On the other hand, between the positioning processor (regarded as a general microcontroller) and the cache memory, the number of address units that the positioning processor has performed a burst transfer operation on the cache memory in one clock cycle is equal to the number of address units that the positioning processor has performed a single transfer operation on the cache memory in one clock cycle; wherein the burst transfer operation is a burst read operation or a burst write operation, and the single transfer operation is a single read operation or a single write operation.
[0041] Compared with the prior art, the positioning processor disclosed in the present application is provided with a plurality of data channels with different transformation starting point reference quantities, so as to support the parallel execution of different wheel position transformations for the same laser point data, and the corresponding wheel position transformations can be synchronously started in each data channel by setting the angle deflection difference, and each data channel does not repeatedly execute the same wheel position transformation for the same laser point data (the angle deflection calculation is the same (starting from the same transformation starting point reference quantity, the angles rotated at the same number of deflections are equal) and the coordinate offset calculation is the same (the coordinate offsets shifted at the same number of offsets in the same coordinate axis direction are equal)); but it will continuously execute multiple rounds of position transformations (the angle deflection calculation is different (starting from the same transformation starting point reference quantity, the angles rotated at different numbers of deflections are not equal) and the coordinate offset calculation is different (the coordinate offsets shifted at different numbers of offsets in the same coordinate axis direction are not equal)). Based on the state machine control logic, the positioning processor, under the control of the built-in state machine control module, reads a preset number of laser point data from the cache memory as source data (which can form a laser point cloud), and then shares it with each data channel, and allocates corresponding multiple rounds of position transformations to each source data in each data channel (distinguished by the transformation starting point reference amount), so that each data channel can synchronously perform multiple rounds of position transformations that are different from each other, thereby shortening the delay time required for the state machine to enter a new working state, and the shortening multiple is positively correlated with the number of data channels.
[0042] The position transformation processing module inside the positioning processor will obtain multiple reference coordinates by performing the same number of angle deflection calculations as the number of rounds of position transformation, and then synchronously perform traversal and coordinate offset calculations on the calculated reference coordinates in each coordinate axis direction, so as to index and obtain the corresponding positioning probability value within the corresponding coordinate offset range; then, the corresponding positioning probability values obtained by the same round of position transformation in the data channel can be accumulated through the accumulator, and after the same round of position transformation is performed in sequence in the same data channel for the number of laser points with a preset positioning number, the preset positioning number of target offset coordinates are obtained and the same number of positioning probability values are indexed and sent to the accumulator of the data channel. Under the counting control of the state machine control module, whenever the number of consecutive accumulations of the accumulator is equal to the preset number of positioning, a positioning probability and value is obtained, and then the positioning probability and value corresponding to the same laser point data in each round of position transformation are synchronously calculated by multiple data channels, thereby saving the time required for the position transformation processing module to wait for calculation, and improving the multiplexing ability and iterative processing speed of the laser point data of the position transformation processing module; therefore, under the condition of certain hardware resources and occupied chip area, the more data channels used for position transformation, the faster the speed of obtaining the positioning probability and value, and the faster the execution efficiency of the positioning software algorithm, which is equivalent to shortening the output delay time of the processor as a whole.
[0043] In particular, the positioning processor does not have a target on-chip memory inside, and the target on-chip memory, such as an on-chip SARM memory or an on-chip flash memory, is used to cache data required to be accessed from the DDR memory; instead, a cache memory is set outside the positioning processor to cache data required to be accessed from the DDR memory, thereby minimizing the occupation of the on-chip cache space of the positioning processor. Preferably, the target on-chip memory includes an embedded SRAM and an embedded flash; when the positioning processor, the cache memory and the DDR memory are arranged on the same circuit board, the target on-chip memory is embedded in the chip where the positioning processor is located, but the design cost of the embedded SRAM and the embedded flash is very high, so the wafer area of the two cannot be made very large, which will restrict the use of the positioning processor, and therefore it is necessary to use the cache memory and the DDR memory disclosed in the aforementioned embodiment as off-chip memory, and do not retain the data caching function of the embedded SRAM and the embedded flash. Then, when the positioning processor, the cache memory and the DDR memory are arranged on the same circuit board, the positioning processor is not embedded in the target on-chip memory, and the cache memory and the DDR memory disclosed in the aforementioned embodiment are directly used as off-chip memory, and the target on-chip memory is no longer used for data caching, thereby saving the design cost of the positioning processor.
[0044] Preferably, the AHB bus parsing module is classified as a state machine in the state machine control module, which plays a role in transmission control; the positioning processor can use the AHB bus parsing module (which can be understood as a register module) to interact with the cache memory on the AHB bus, and the cache memory can also use the AHB bus parsing module (which can be understood as a register module) to interact with the DDR memory on the AHB bus; the AHB bus parsing module is used to parse the bus protocol instructions, convert the data signal and address signal transmitted by the bus, and access the cache memory according to the bus address after the positioning processor issues an addressing instruction. The cache memory can also access each data channel of the positioning processor according to the bus address. Therefore, the bus address includes the addressing address of the cache memory, and the bus address includes the addressing address of each data channel. The bus protocol used in this embodiment is the AHB bus protocol, in which the control function of the burst read operation, the control function of the single write operation, and the control function of the burst write operation are all specified by the AHB bus protocol specification (this on-chip system bus protocol as SOC), so that the AHB bus parsing module can be divided into Figure 1 The burst read control module, single read control module, single write control module and burst write control module shown. In the process of the positioning processor performing the burst transmission operation of data through the internal state machine control module, the addresses issued are all aligned, and the storage space (logical bank) is divided in the form of aligned addresses. When accessing the burst read or burst write data externally, this division is required. The aligned address is determined by the width of the data transmitted per beat. The aligned address belongs to a continuous address, and the number of existing addresses is the burst length. In the process of the positioning processor performing the single write operation of data through the internal state machine control module, the number of continuous addresses transmitted at one time is the single length. When reading or writing data externally once, the single length is determined by the continuous data of the address transmitted per beat. Among them, the single length is less than the burst length, and the single length is greater than or equal to the value 1; the burst length represents the number of continuous address units transmitted under one burst transmission operation; the burst transmission operation is a burst read operation or a burst write operation; the single length represents the number of continuous address units transmitted under one single transmission operation; the single transmission operation is a single read operation or a single write operation. In this embodiment, the ratio of the amount of data read in a burst to the amount of data read in a single time is a preset integer value, so that the positioning processor writes the positioning probability and value into the write FIFO module through a single write operation of the preset integer value, and then a new round of position transformation is performed on the laser point data read by the positioning processor in a burst, thereby avoiding the multi-channel burst transmission of data faster than the calculation speed of each round of position transformation, causing data congestion on the AHB bus.
[0045] It should be noted that DDR SDRAM (DDR for short) is a double data rate synchronous dynamic random access memory. The DDR memory can establish an electrical connection with a bus outside the positioning processor through a DDR interface to transform the memory system in the relocation system into a double data rate (DDR) memory system. DDR memory can not only be used as the largest capacity memory in the relocation system, but the DDR interface of the DDR memory can significantly increase the data transmission rate without changing the maximum signal frequency of the system; even if the maximum frequency of the data signal is increased by two times, the DDR signal enables the external access device to double the throughput while maintaining the currently feasible maximum clock frequency.
[0046] As an embodiment, the positioning processor supports software instructions to select a positioning probability and value with the largest value from all positioning probabilities and values required for positioning a target position, and then set the correction position corresponding to the positioning probability and value with the largest value as the position relocated by the repositioning system in the block map, wherein the correction position corresponding to the positioning probability and value is used as a candidate coordinate position of the target position, which is not equivalent to the target offset coordinate. In order to reduce the number of accesses to the positioning processor and the usage of its internal computing resources, whenever the preset number of positioning laser point data are all processed by the position transformation processing module as the positioning probability and value output at the corresponding correction position, the software instructions can filter out the positioning probability and value with relatively large values from the DDR memory and index them to the corresponding correction coordinates, and then as the machine moves, this maximum positioning probability and value will be updated accordingly.
[0047] In the positioning processor, whenever a preset number of laser point data are all processed by the position transformation processing module into positioning probabilities and values at corresponding correction positions, all positioning probabilities and values required for positioning a target position are obtained, and the number of rounds of position transformation required for the same laser point data is equal to the product of the number of angular deflections, the number of horizontal coordinate offsets and the number of vertical coordinate offsets cumulatively generated by the position transformation processing module in the corresponding position transformation process, and is all the positioning probabilities and values cumulatively output by all data channels in the corresponding position transformation process, and the number of cumulatively output positioning probabilities and values in each data channel is equal to the ratio of the number of rounds of position transformation required for the same laser point data (not limited to data channels) to the number of data channels.
[0048] The corrected position corresponding to a positioning probability and value is represented in the block map as the coordinate position obtained by a round of target transformation relative to the origin of the coordinate system; the target transformation is a round of position transformation required by the position transformation processing module to obtain the same positioning probability and value; so that the target transformation and the position transformation are the same in the angle deflection calculation method, and the target transformation and the position transformation are the same in the horizontal coordinate offset calculation method, and the target transformation and the position transformation are the same in the vertical coordinate offset calculation method; wherein, the current position of the laser sensor is used as the origin of the coordinate system, and the block map is generated within the effective detection range of the laser sensor.
[0049] As an embodiment, the positioning processor is arranged inside a mobile device, the mobile device is equipped with at least one laser sensor, and the exterior of the repositioning system is constructed to connect the laser sensor so that the DDR memory stores the laser point data collected by the laser sensor; the mobile device may be a robot, and the laser sensor may be a laser radar installed on the body. Among them, the preset positioning number of laser point data is a batch of laser point data obtained by the robot using the laser radar to scan a circle at the target position, which can be marked as laser point cloud data. The positioning probability value corresponding to the target offset coordinates indicates the probability that the laser point data of the target offset coordinates obtained after a round of position transformation falls into the corresponding position of the block map, or indicates the probability that the mobile device falls into the corresponding position of the block map, or indicates the probability that the cell position of the block map is occupied by an obstacle reflecting the laser point data; each target offset coordinate obtained after a round of position transformation of each laser point data has a corresponding relationship with a positioning probability value, and is pre-set so that the position transformation processing module can call it.
[0050] In this embodiment, the current position of the laser sensor is used as the origin of the coordinate system, and the block map is generated within the effective detection range of the laser sensor; the block map is a local map of a preset size, which is used to describe the area within the effective detection range of the laser sensor, covering the position drift range generated at various angles and coordinate axis directions. Preferably, the block map is a local map of a preset size configured according to the positioning algorithm used in the current scene, and is a grid map within the effective detection range of the laser sensor; when the laser sensor is moved to a new position, the effective detection range of the laser sensor is updated, so that the information of the block map configured by the positioning algorithm also changes.
[0051] It should be emphasized that the embodiment takes a partial environmental map as an example, that is, the current position of the robot equipped with the positioning processor is taken as the origin, and a block map is generated within the effective search range of the laser sensor. Considering that the laser beam emitted by the laser sensor has a certain range, that is, it can only scan areas within a certain range, preferably, when determining the search range, the range of the laser beam can be used as a basis, and a block map can be generated within a range of 5 meters in front, behind, left and right of the robot. When the robot loses its positioning, there is a certain deviation in the current posture. For this reason, this embodiment transforms the position based on the current posture according to the set angle deflection and coordinate offset; when the robot moves, there is a certain drift error in the current posture. For this reason, the embodiment transforms the grid position based on the current posture according to the coordinate offset and angle deflection set on the environmental map to obtain the transformed robot posture information. Furthermore, the positioning probability and value are used to reflect the accurate positioning of the robot in the block area. Figure 1 The greater the probability of the location, the more accurate the robot is positioned in the block. Figure 1 The greater the probability of the location. Optionally, when determining the positioning probability value of an area in an environmental map, the environmental map can be processed to obtain a corresponding grid map, and the positioning probability corresponding to the obstacles in the grid map can obey a normal distribution. There is a corresponding coordinate range for each grid length in the grid map, and the environmental map contains obstacles and blank areas; after the grid map is determined, it can be saved so that it can be used directly the next time the positioning is restored. On this basis, according to the current posture of the robot, the position of the robot in the grid map can be determined, and then the positioning probability and value can be obtained based on the sum of the positioning probability values of each corresponding grid point scanned by the laser probe.
[0052] Therefore, when the positioning processor processes all the preset positioning number of laser point data into all the positioning probabilities and values required for positioning a target position through its internal position transformation processing module, the repositioning algorithm can select the correction position corresponding to the positioning probability and value with the largest value as the repositioned position, that is, the position restored on the block map is positioned with the preset positioning number of laser point data as a unit. If the robot where the positioning processor is located moves, the laser point data stored in the cache memory will be updated by the newly collected data. As long as the positioning processor keeps refreshing the positioning probability value in real time under the cyclic scheduling of the state machine control module, the new repositioning position can be matched with the new positioning probability and value, which speeds up the overcoming of the influence of the point cloud data noise and positioning error collected by the laser sensor, so that the positioning processor maintains a high system performance in various positioning environments and can efficiently complete the repositioning of the laser map where the block map is located.
[0053] As an example, see Figure 1 It can be seen that the cache memory is connected between the positioning processor and the DDR memory, and the DDR memory and the cache memory are both off-chip memories of the positioning processor; Figure 1 As shown, the DDR memory is connected to the cache memory, and the upward arrow between the DDR memory and the cache memory indicates that the cache memory reads data from the interface of the DDR memory, and the downward arrow between the DDR memory and the cache memory indicates that the cache memory writes data to the interface of the DDR memory. The cache memory, referred to as cache, is used to cache the data that the positioning processor needs to read from the DDR memory and the data that the positioning processor needs to write to the DDR memory. The positioning processor can indirectly access the DDR memory through the cache memory, and can directly read a part of the data to be accessed from the cache memory each time (equivalent to several instructions in a section of an instruction set originally stored in the DDR memory, and several instructions are pre-read to the cache memory). Of course, the positioning processor can also write a small part of the instructions into the cache memory to play a role in data backup. It is worth noting that the input rate supported by the interface of the cache memory is preferably not different from its output rate, so there is no need to set a data buffer in the device accessing the cache memory to balance this difference, thereby reducing the complexity of the access control of the positioning processor.
[0054] In this embodiment, relative to the positioning processor, the data stored in the DDR memory is external data, including instructions and data blocks that need to be called by the positioning processor; in order to meet the storage requirements of laser point data and map information, the capacity of the DDR memory is greater than the capacity of the cache memory.
[0055] As an embodiment, the position transformation processing module includes a preset number of parallel angle deflection calculation units, a preset number of parallel coordinate offset calculation units, and a preset number of parallel accumulators; a plurality of data channels are orderly arranged inside the position transformation processing module, and each data channel is marked with a serial number, which can be arranged in order from small to large values. Figure 1 As shown, the preset parallel number is represented by n, and preferably, n is an integer greater than 3. The preset parallel number of angle deflection calculation units are each marked with a serial number, and correspondingly, Figure 1In the embodiment, the n angle deflection calculation units are represented from top to bottom as angle deflection calculation unit_1, angle deflection calculation unit_2, ..., angle deflection calculation unit_n to distinguish them; each of the preset parallel coordinate offset calculation units is marked with a serial number, and correspondingly, in Figure 1 In the figure, the n coordinate offset calculation units are represented from top to bottom as coordinate offset calculation unit_1, coordinate offset calculation unit_2, ..., coordinate offset calculation unit_n to distinguish them; each of the preset parallel number accumulators is marked with a serial number, and correspondingly, in Figure 1 In the example, the n accumulators are represented from top to bottom as accumulator_1, accumulator_2, ..., accumulator_n. An angle deflection calculation unit is connected to a coordinate offset calculation unit with the same serial number, a coordinate offset calculation unit is connected to an accumulator with the same serial number, and an angle deflection calculation unit, a coordinate offset calculation unit and an accumulator with the same serial number are sequentially connected to form a data channel; correspondingly, in Figure 1 In the embodiment, the angle deflection calculation unit_1 is connected to the coordinate offset calculation unit_1, and the coordinate offset calculation unit_1 is connected to the accumulator_1, so as to form data channel 1 in the position transformation processing module. The angle deflection calculation unit_2 is connected to the coordinate offset calculation unit_2, and the coordinate offset calculation unit_2 is connected to the accumulator_2, so as to form data channel 2 in the position transformation processing module. The angle deflection calculation unit_n is connected to the coordinate offset calculation unit_n, and the coordinate offset calculation unit_n is connected to the accumulator_n, so as to form data channel n in the position transformation processing module. It is worth noting that when the transformation starting point reference amount is expressed as the reference deflection angle required by the angle deflection calculation unit, the difference between the reference deflection angle of the i-th angle deflection calculation unit and the reference deflection angle of the (i-1)-th angle deflection calculation unit is equal to the product of the target deflection number and the angle deflection step, so that there is a difference between the reference deflection angles required by the angle deflection calculation units with adjacent serial numbers and the corresponding angle difference is fixed, wherein i is set to be greater than or equal to 2, and i is set to be less than or equal to n, and the angle deflection step required for each angle deflection calculation is equal, and is not limited to which laser point data is used to perform which round of position transformation; for the same laser point data input into each data channel, the number of angle deflections required to be executed by each angle deflection calculation unit is equal, and is equal to the ratio of the maximum number of angle deflections allowed by the position transformation processing module to the preset parallel number, so that equal angle deflections are generated in each data channel starting from different reference deflection angles.
[0056] It should be noted that the transformation control module, as a state machine that schedules the angle deflection calculation unit, the coordinate offset calculation unit, and the accumulator to process data in a loop, can make new data wait while executing the calculation function of old data. In combination with the above-mentioned embodiment, it can be known that under the scheduling of the transformation control module, whenever there is idle data cache space in the accumulator, the coordinate offset calculation unit connected to the accumulator inputs the positioning probability value indexed by it into the accumulator, and the accumulator can receive the positioning probability value input by the coordinate offset calculation unit in a first-in-first-out storage manner. In addition, under the scheduling of the transformation control module, whenever there is idle data cache space in the coordinate offset calculation unit, the angle deflection calculation unit connected to the coordinate offset calculation unit inputs the reference coordinates obtained under each angle deflection calculation into the coordinate offset calculation unit. To trigger the data channel to continue a new round of position transformation of the laser point data.
[0057] If necessary, a mapping relationship between coordinates and positioning probability values is constructed in the coordinate offset calculation unit, and the coordinate offset calculation unit stores the indexed positioning probability values in the corresponding address units.
[0058] It should be noted that a storage array can be set in the coordinate offset calculation unit, and the coordinates or positioning probability values can be "filled" in. Just like the retrieval principle of a table, first specify a row and then specify a column to accurately find the required cell. This is the basic principle of memory chip addressing. Similarly, the address information of the stored positioning probability value can also be specified to read it out, thereby speeding up the data transmission speed of the data channel.
[0059] As an embodiment, the state machine control module includes a burst read control module, a single read control module and a transformation control module; the angle deflection calculation unit is used to burst read a batch of laser point data from the cache memory under the triggering action of the burst read command issued by the burst read control module, wherein the number of the batch of laser point data is equal to the burst length; the burst read control module schedules the angle deflection calculation unit to burst read the laser point data multiple times by counting, so that the preset positioning number of laser point data are read into the position transformation processing module; the number of laser point data read out in each burst is the burst length. Alternatively, under the triggering action of the single read command issued by the single transmission control module, a batch of laser point data is read out from the cache memory once, wherein the number of the batch of laser point data is equal to the single length; the burst read control module or the single transmission control module schedules the point cloud storage module to read out the laser point data multiple times by counting so that the preset positioning number of laser point data are transmitted to the position transformation processing module in sequence, and the number of laser point data read out each time is the single length, and generally, the burst length is greater than the single length.
[0060] In this embodiment, a preset parallel number of angle deflection calculation units are used to control the laser point data in parallel to perform angle deflection calculations to obtain corresponding reference coordinates whenever laser point data is acquired in parallel. The number of reference coordinates is equal to the number of angle deflection calculations, and each reference coordinate obtained in each angle deflection calculation unit is different; the reference coordinates are then transmitted to the coordinate offset calculation unit with the same serial number; then, in each data channel, one laser point data is controlled by one angle deflection calculation unit to perform angle deflection calculations for the target number of deflections, so that the number of reference coordinates obtained in the same data channel is equal to the target number of deflections, and the ratio of the maximum number of angle deflections allowed by the position transformation processing module to the preset parallel number is equal to the target number of deflections, so that all angle deflection calculations performed on the same laser point data by the preset parallel number of angle deflection calculation units represent all angle deflection situations of the laser point data, and output different reference coordinates for the target number of deflections.
[0061] A preset parallel number of coordinate offset calculation units are used to control the reference coordinates to perform coordinate offset in parallel along the same coordinate axis direction whenever the reference coordinates are acquired in parallel; the preset parallel number of coordinate offset calculation units are also used to set the reference coordinates after the same round of position transformation as the target offset coordinates after the reference coordinates acquired in parallel undergo a coordinate offset in the first coordinate axis direction and a coordinate offset in the second coordinate axis direction, and then index the positioning probability value corresponding to the target offset coordinates. In each data channel, for the preset positioning number of laser point data read in burst, the number of positioning probability values corresponding to the target offset coordinates obtained by the same round of position transformation is the preset positioning number, wherein the preset parallel number is pre-configured; the preset positioning number represents the number of laser point data required to locate a target position of the block map.
[0062] Based on the area cost constraint of the circuit chip, the preset positioning number is preferably a value of 200, and the preset parallel number is preferably a value of 4. Then, in each data channel, the number of positioning probability values corresponding to the target offset coordinates obtained by the same round of position transformation is a value of 4, but it has not reached the preset positioning number. Therefore, it is necessary to continue to perform the same round of position transformation on the newly input laser point data to index multiple batches of positioning probability values corresponding to the target offset coordinates obtained by the same round of position transformation in parallel. After the number reaches the preset positioning number, continue to index multiple batches of positioning probability values corresponding to the target offset coordinates obtained by other rounds of position transformation in parallel.
[0063] Preferably, after a reference coordinate is offset in the direction of the horizontal axis by the first preset traversal times, the horizontal axis offset results of the first preset traversal times are obtained. After each horizontal axis offset result is offset in the direction of the vertical axis by the second preset traversal times, the same laser point data is cumulatively obtained as the product of the first preset traversal times and the second preset traversal times. Further, in each data channel, when the same laser point data is rotated by the target deflection times, the cumulative number of target offset coordinates obtained is the product of the target deflection times, the first preset traversal times and the second preset traversal times. In some parallel computing circuits, it can be obtained in parallel. Provide enough coordinate offset states for the positioning algorithm at the software execution level to ensure the accuracy of positioning or repositioning.
[0064] In each of the data channels, the transformation control module first triggers the coordinate offset calculation unit to index the positioning probability value corresponding to the target offset coordinates obtained by the same round of position transformation by counting, and then orderly outputs the positioning probability value corresponding to the target offset coordinates obtained by the same round of position transformation to the accumulator connected to the coordinate offset calculation unit, wherein the positioning probability values corresponding to the preset number of target offset coordinates obtained by one round of position transformation are output first, and then the positioning probability values corresponding to the preset number of target offset coordinates obtained by another round of position transformation are output, so as to realize the accumulator to perform cumulative calculation on the positioning probability values corresponding to the preset number of target offset coordinates obtained by one round of position transformation.
[0065] A preset number of parallel accumulators are used to receive the positioning probability values in parallel in a first-in-first-out manner, that is, each accumulator receives the positioning probability values corresponding to the target offset coordinates obtained by different rounds of position transformation; then, each accumulator accumulates the positioning probability values received each time, sets the current accumulated result as a positioning probability sum value, and uses the current accumulated result as the initial sum value for the next accumulation; whenever the transformation control module counts that the number of accumulations reaches the preset positioning number, the current accumulated result is set as a positioning probability sum value, and the initial accumulated sum value is set to a value of 0, and it is determined that the number of laser point data participating in the same round of position transformation reaches the preset positioning number; at the same time, other accumulators (the number of accumulations counted in other accumulators also reaches the preset positioning number) output the positioning probability sum values in parallel, and each outputted positioning probability sum value corresponds to one round of position transformation.
[0066] It should be noted that the counting method in the transformation control module can be obtained by counting at the same clock edge by the counter set in the transformation control module, which serves as the scheduling basis of each working state. That is, when the count reaches a certain clock cycle and the calculation time requirement of the relevant unit is met, the working state can be scheduled to avoid congestion in data transmitted on the bus and data transmitted between related units.
[0067] In order to obtain a positioning probability and value, the position transformation processing module needs to synchronously control the reference coordinates obtained through the same type of angle deflection calculation to be offset along the horizontal axis direction of the block map and along the vertical axis direction of the block map in the same data channel, and output a sufficient number of coordinate offset states in parallel for the positioning of the repositioning algorithm at the software execution level to ensure the accuracy of repositioning; then the positioning probability values (corresponding to the target offset coordinates obtained by the same type of angle deflection calculation and the same type of coordinate offset calculation) synchronously output by the same data channel through the index cache are accumulated, so that each data channel can obtain a positioning probability and value with positioning value separately, without setting two channels to perform batch data multiplication and addition calculations alternately, so as to speed up the software instructions to select the positioning probability and value with the largest value from all the positioning probabilities and values required for locating a target position, and then set the correction position corresponding to the positioning probability and value with the largest value as the position relocated by the positioning processor in the block map.
[0068] In some embodiments, the preset positioning quantity is a value of 200, the preset parallel quantity is a value of 4; the number of angle deflection calculations required to be performed for the same laser point data is a value of 20, and after being evenly distributed to each angle deflection calculation unit, the number of angle deflection calculations required to be performed by each angle deflection calculation unit is a value of 5, that is, the target deflection number is a value of 5; if the angle deflection step is 10 degrees, the base deflection angle of the first angle deflection calculation unit is 0 degrees, the base deflection angle of the second angle deflection calculation unit is 50 degrees, the base deflection angle of the third angle deflection calculation unit is 100 degrees, and the base deflection angle of the fourth angle deflection calculation unit is 100 degrees. The reference deflection angle is 150 degrees; the number of times the coordinate offset calculation unit marked with the same serial number performs the horizontal coordinate offset calculation is 7, and the number of times the coordinate offset calculation unit marked with the same serial number performs the vertical coordinate offset calculation is 7; if a positioning probability and value are calculated in units of 200 laser point data, then the number of all positioning probabilities and values required to locate a target position is 20x7x7=280; therefore, the coordinate traversal time required for the position transformation processing module to transform the laser point data is one-fourth of the traversal calculation time required to transform the 200 laser point data using only a single channel.
[0069] Preferably, the preset positioning number is set to 200, and the laser point data of the preset positioning number represents 200 laser point data, specifically, there are 200 horizontal axis (horizontal axis) coordinates and 200 vertical axis (vertical axis) coordinates. The burst length can be set to 8, and the laser point data on the address unit of one burst length represents the coordinate values on 8 consecutive address units.
[0070] During the hardware implementation process, the coordinate offset performed by the coordinate offset calculation unit is performed by an adder-subtractor, and the coordinate offset operation can also be performed using an arithmetic logic circuit composed of a shift register; the coordinate offset direction, that is, the direction of the coordinate axis along which the coordinate offset is taken is: adaptively configured in the associated register according to the requirements of the positioning algorithm.
[0071] In summary, when the preset parallel number of angle deflection calculation units simultaneously control the laser point data to perform angle deflection calculation, the difference between the reference deflection angle of the i-th angle deflection calculation unit and the reference deflection angle of the (i-1)-th angle deflection calculation unit is equal to the product of the target deflection number (the maximum angle deflection number allowed by the position transformation processing module) and the angle deflection step length, so that the angle difference between two angle deflection starting points with adjacent serial numbers is constructed as the difference in the reference amount of the transformation starting point. For the same laser point data, within all data channel angles, the angle deflection situation executed in parallel is fully reflected as all angle deflection situations of a laser point data in a continuous manner). In this embodiment, multiple data channels are set to synchronize different rounds of position transformation; even if the laser points are discretely distributed in the block map, through the traversal and caching of the accumulator, the multiple positioning probability values transmitted in parallel are all positioning probability values corresponding to the target offset coordinates obtained by different rounds of position transformation, and the positioning probability and value can be obtained by direct traversal and accumulation. This speeds up the acquisition of positioning probability and value, speeds up the execution efficiency of the positioning software algorithm, and is equivalent to shortening the output delay time of the processor as a whole. If the robot where the positioning processor is located moves, the laser point data in the angle deflection calculation unit will be updated with the newly collected data. As long as the positioning processor keeps refreshing the positioning probability value in real time under the cyclic scheduling of the state machine control module, the new relocation position can be matched with the new positioning probability and value, speeding up the overcoming of the influence of point cloud data noise and positioning error collected by the laser sensor, improving the real-time performance of the positioning system processor in various positioning environments, and being able to efficiently complete the relocation of the laser map where the block map is located.
[0072] On the basis of the above embodiment, each time an angle deflection calculation is performed on the same laser point data, a new reference coordinate is obtained, and then a coordinate offset calculation is performed on the new reference coordinate to obtain a new target offset coordinate and index to a corresponding positioning probability value; a round of position transformation includes an angle deflection calculation and a coordinate offset calculation, and a coordinate offset calculation includes a horizontal coordinate offset calculation and a vertical coordinate offset calculation. The same type of angle deflection calculation and the same type of coordinate offset calculation are represented by the same round of position transformation; the number of angle deflection calculations required for the same laser point data is preset, which is equal to the product of the target deflection number and the preset parallel number; the number of coordinate offset calculations required for the same reference coordinate is preset and configured by the registers set in the position transformation processing module. When the same type of angle deflection calculation and the same type of coordinate offset calculation are represented by the same round of position transformation, in each coordinate offset calculation unit, the same type of coordinate offset calculation refers to the coordinate transformation calculation in which the horizontal coordinate offset calculation method and the vertical coordinate offset calculation method are the same, and the same type of horizontal coordinate offset calculation refers to at least two calculation methods for horizontal coordinate deflection of a reference coordinate with the same horizontal coordinate axis offset direction, horizontal coordinate offset step, and current offset number; the same type of vertical coordinate offset calculation refers to at least two calculation methods for vertical coordinate deflection of a reference coordinate with the same vertical coordinate axis offset direction, vertical coordinate offset step, and current offset number; the same type of angle deflection calculation refers to at least two calculation methods for angle deflection of a laser point data with the same deflection number, current deflection number, angle deflection step, and deflection direction. So that the laser point data after the same type of angle deflection calculation and the same type of coordinate offset calculation in the same data channel have the same relative posture relationship with the laser point data before the calculation. In this embodiment, when the same laser point data is subjected to angle deflection calculation in different angle deflection calculation units, the required reference deflection angles are different, so that different types of angle deflection calculations are performed in parallel through different angle deflection calculation units, thereby performing position transformations of different wheels in parallel in different data channels.
[0073] It should be emphasized that in the coordinate offset performed in one coordinate axis direction of the block map, the offset of each coordinate offset relative to the origin of the coordinate system of the block map is different, but the coordinate offset step size occurring along the same coordinate axis direction is the same.
[0074] A round of position transformation includes: each time the position transformation processing module performs an angle deflection operation, the position transformation processing module controls the corresponding reference coordinate to first perform a coordinate offset along the first coordinate axis direction, and then perform a coordinate offset along the second coordinate axis direction, so as to form a coordinate offset calculation method; wherein, when the first coordinate axis direction represents the horizontal coordinate axis direction, and the second coordinate axis direction represents the vertical coordinate axis direction, it is equivalent to first performing a horizontal coordinate offset calculation, and then performing a vertical coordinate offset calculation. Alternatively, when the first coordinate axis direction represents the vertical coordinate axis direction, and the second coordinate axis direction represents the horizontal coordinate axis direction, it is equivalent to first performing a vertical coordinate offset calculation, and then performing a horizontal coordinate offset calculation. In the coordinate system of the block map, the first coordinate axis direction and the second coordinate axis direction are vertically set.
[0075] In some embodiments, the number of all positioning probabilities and values required for locating a target position is equal to the product of the maximum number of offsets of the same laser point data in the vertical axis direction of the block map, the maximum number of offsets of the same laser point data in the horizontal axis direction of the block map, and the maximum number of angular deflections of the same laser point data around the origin of the coordinate system of the block map. The maximum number of angular deflections of the same laser point data around the origin of the coordinate system of the block map is allocated to each data channel, and the corresponding number of angular deflection calculations are performed synchronously based on the reference deflection angles required by different angle deflection calculation units; wherein the maximum number of offsets in various coordinate axis directions and the maximum number of angular deflections around the origin of the coordinate system of the block map are pre-set.
[0076] In the case where the block map is represented as a grid map, the maximum number of grids allowed to be accommodated in the horizontal axis direction of the block map is greater than or equal to the product of the maximum number of offsets allowed for the same reference coordinate in the horizontal axis direction of the block map and the horizontal axis offset step, and the maximum number of grids allowed to be accommodated in the vertical axis direction of the block map is greater than or equal to the product of the maximum number of offsets allowed for the same reference coordinate in the vertical axis direction of the block map and the vertical axis offset step; in this embodiment, the position transformation processing module does not restrict the execution order between the horizontal coordinate offset calculation and the vertical coordinate offset calculation in a round of position transformation. Among them, the position transformation processing module is pre-configured with the maximum number of offsets allowed for the reference coordinate in the horizontal axis direction of the block map and its coordinate offset step in the horizontal axis direction, the maximum number of offsets allowed for the reference coordinate in the vertical axis direction of the block map and its coordinate offset step in the vertical axis direction, and can be called by each data channel.
[0077] As an embodiment, each angle deflection calculation unit is used to, after acquiring the laser point data, respectively start from the corresponding reference deflection angle, rotate the target deflection times along the predetermined clock direction and around the origin of the coordinate system of the block map for the same laser point data, and save the reference coordinates obtained by each rotation in sequence, so that each angle deflection calculation unit obtains reference coordinates equal to the target deflection times and transmits them to the coordinate offset calculation unit with the same serial number, so that each reference coordinate performs coordinate offset calculation in the coordinate offset calculation unit with the corresponding serial number; each angle deflection calculation is to continue to perform an angle deflection calculation along the predetermined clock direction on the basis of the result of the previous angle deflection, until the target deflection times are rotated along the predetermined clock direction and around the origin of the coordinate system of the block map, and the rotation of the same laser point data along the predetermined clock direction and around the origin of the coordinate system of the block map is ended, that is, the angle deflection calculation of the same laser point data is stopped. The reference coordinates obtained by each angle deflection calculation unit after the same number of deflections are different; the rotation here is understood to be the deflection in the aforementioned embodiments, and the deflection center uses the origin of the coordinate system of the block map. The number of deflections is equivalent to the number of rotations, the given clockwise direction can be clockwise or counterclockwise, and the deflection starting point is equivalent to the sum of the baseline deflection angle and the initial deflection angle in the laser point data.
[0078] Under the triggering action of the burst read command issued by the burst read control module, the angle deflection calculation unit_1 to the angle deflection calculation unit_n simultaneously burst read out a burst length of the same laser point data (the same batch of laser point data) from the cache memory; under the triggering action of the single read command issued by the single read control module, the angle deflection calculation unit_1 to the angle deflection calculation unit_n simultaneously burst read out a single length of the same laser point data (the same batch of laser point data) from the cache memory.
[0079] The burst read control module schedules the angle deflection calculation unit_1 to the angle deflection calculation unit_n to read out the laser point data multiple times in bursts by counting so that a preset number of laser point data are read into the position transformation processing module, and the number of laser point data read out in each burst is the burst length. The laser point data read out in bursts is cached in the intermediate cache space provided in the angle deflection calculation unit. Alternatively, the single read control module schedules the angle deflection calculation unit_1 to the angle deflection calculation unit_n to read out the laser point data multiple times in single bursts by counting so that a preset number of laser point data are read into the position transformation processing module, and the number of laser point data read out in single bursts each time is the burst length. The laser point data read out in single bursts is cached in the intermediate cache space provided in the angle deflection calculation unit.
[0080] Whenever the angle deflection calculation unit calls a laser point data in the intermediate cache space to perform one or more angle deflection calculations, the laser point data will be read away to free up idle memory space for the intermediate cache space. The subsequently transmitted laser point data can then fill the idle memory space, allowing the intermediate cache space to play the role of continuously caching data.
[0081] Each coordinate offset calculation unit is used to perform a coordinate offset calculation for a reference coordinate along the first coordinate axis direction of the block map for a first preset number of traversals after acquiring a reference coordinate and save the offset results of each coordinate offset in sequence, so as to obtain an offset result with a number of the first preset number of traversals along the first coordinate axis direction of the block map, that is, an offset result with a number of the first preset number of traversals distributed along the first coordinate axis direction. The number of coordinate offsets is obtained by counting the transformation control module, which provides a basis for the working state scheduling of the transformation control module, for example, scheduling the coordinate offset calculation unit to control the reference coordinate to undergo a coordinate offset for a first preset number of traversals along the first coordinate axis direction of the block map, and each coordinate offset is based on the last coordinate offset result and continues to perform a coordinate offset calculation along the first coordinate axis direction of the block map until the first preset number of traversals have occurred along the first coordinate axis direction of the block map, and the coordinate offset calculation for the same reference coordinate along the first coordinate axis direction of the block map is terminated.
[0082] Each coordinate offset calculation unit is further used for controlling the reference coordinate after the aforementioned coordinate offset to perform a coordinate offset calculation for a second preset number of traversals along the second coordinate axis of the block map whenever a reference coordinate has performed a coordinate offset calculation along the first coordinate axis of the block map, and sequentially saving the offset results of each coordinate offset, so as to obtain an offset result for a second preset number of traversals in the second coordinate axis direction, until all offset results obtained by performing a coordinate offset calculation for a reference coordinate along the first coordinate axis direction are coordinate offset calculations for a second preset number of traversals along the second coordinate axis direction, and a cumulative number of target offset coordinates is obtained, which is the product of the first preset number of traversals and the second preset number of traversals; and further, in each data channel, when the same laser point data is rotated by the target deflection number, the cumulative number of target offset coordinates obtained is the product of the target deflection number, the preset parallel number, the first preset number of traversals and the second preset number of traversals.
[0083] Specifically, the offset result obtained by calculating the coordinate offset of a reference coordinate along the first coordinate axis is marked as the horizontal axis offset result. For the same horizontal axis offset result, each coordinate offset is performed based on the previous coordinate offset result and continues to perform a coordinate offset calculation along the second coordinate axis of the block map until the coordinate offset calculation of the second preset traversal times has occurred along the second coordinate axis of the block map, and the coordinate offset calculation of the same reference coordinate along the second coordinate axis of the block map is terminated. Wherein, when the first coordinate axis is the horizontal coordinate axis, the second coordinate axis is the vertical coordinate axis; or, when the first coordinate axis is the vertical coordinate axis, the second coordinate axis is the horizontal and vertical coordinate axes. In this embodiment, whether it is the coordinate offset of the first preset traversal times performed in parallel in one coordinate axis direction of the block map or the coordinate offset of the second preset traversal times performed in parallel in another coordinate axis direction of the block map, the coordinate offset amount of each coordinate offset relative to the origin of the coordinate system of the block map is different, but the coordinate offset step size occurring along the same coordinate axis direction is the same.
[0084] As an embodiment, the angle deflection calculation unit is used to perform an angle deflection calculation on the laser point data using the pre-configured angle deflection information to obtain a reference coordinate, which is the coordinate of the laser point data on the block map after the angle deflection calculation; wherein, from the corresponding reference deflection angle, each angle deflection calculation performed by the same laser point data in the same angle deflection calculation unit, the corresponding reference coordinates obtained are different, and the angles formed by the lines between the reference coordinates and the origin relative to the same coordinate axis are different, but the angle deflection step required for each angle deflection calculation is equal, and the angles generated by two adjacent deflections are increasing or decreasing. In this embodiment, each laser point data includes a horizontal coordinate and a vertical coordinate stored in adjacent address units; the conversion control module is internally provided with a register for configuring a burst read command and recording the number of executions of the angle deflection calculation, that is, specifying the maximum number of angle deflections of the laser point data in the block map. In each angle deflection calculation unit, each time an angle deflection calculation is performed, the coordinate position corresponding to the laser point data is equivalent to rotating a deflection angle step around the coordinate system origin position of the block map, and the rotation is in the direction of the predetermined clock hand. Each time an angle deflection calculation is performed in the same angle deflection calculation unit for the same laser point data, the corresponding reference coordinates obtained are different; each time an angle deflection calculation is performed in parallel for the same laser point data in different angle deflection calculation units, the corresponding reference coordinates obtained are different; in different angle deflection calculation units, the reference coordinates obtained by the same laser point data at the same number of deflections have the same relative posture relationship with the reference coordinates obtained by the first angle deflection calculation, that is, after equal number of deflections, equal angle deflection amounts are generated.
[0085] Specifically, the information carried by the laser point data includes a scanning radius, an initial deflection angle formed by the coordinate position corresponding to the laser point data relative to the coordinate axis of the block map, and the angle deflection information of the laser point data. The scanning radius is the distance between the laser sensor and the coordinate position corresponding to the laser point data currently involved in the angle deflection calculation; the angle deflection information of the laser point data includes the deflection angle step required to rotate the coordinate position corresponding to the laser point data around the origin of the coordinate system of the block map, the current deflection number and the target deflection number (the maximum number of angle deflections allowed to be performed by a single angle deflection calculation unit); the scanning radius does not exceed the effective detection range of the laser sensor; the current deflection number is less than or equal to the maximum angle deflection number; when the block map is a grid map, the scanning radius is proportionally shrunk to be expressed using the number of grids. The reference coordinates can be converted to be expressed using the number of grids, which is convenient for subsequent acquisition of the positioning probability value at the corresponding coordinate position. In different angle deflection calculation units, the corresponding coordinate positions of the laser point data read out will be rotated according to the corresponding reference deflection angle to reach the required transformation starting point in the angle deflection calculation unit, and the transformation starting points in different angle deflection calculation units are different.
[0086] The process of performing an angle deflection calculation on the laser point data using pre-configured angle deflection information includes: establishing a trigonometric function relationship using the product of the deflection angle step and the current number of deflection times, the sum of the initial deflection angle and the reference deflection angle corresponding to the laser point data, and the scanning radius of the laser sensor, and calculating the reference coordinates generated by the current angle deflection calculation, which is equivalent to obtaining the reference coordinates generated by the current angle deflection of each laser point data read by the angle deflection calculation unit through a rotation matrix; wherein the current number of deflections is recorded in real time by the transformation control module, and the trigonometric function relationship can be implemented in the angle deflection calculation unit using basic addition and shift operation registers, and specifically can refer to the CORDIC operation framework disclosed in the prior art to implement matrix operations to obtain the result of the angle rotation transformation, and the specific operation method will not be repeated here. In this embodiment, if the robot equipped with the positioning processor loses its positioning, the positioning processor controls the angle deflection calculation unit to perform an offset operation on the laser point data according to the set angle deflection step length, and obtains the reference coordinates transformed from the corresponding laser point data after the angle deflection, so as to correct the angle deflection error of the robot posture, and facilitate the positioning algorithm of the prior art to obtain the probability value at the corresponding coordinate position and perform the offset calculation of the coordinate axis direction within a small range. This is to adapt to the phenomenon of left and right deflection during the repositioning process of the mobile robot.
[0087] As an embodiment, for positioning of a block map of (4 grids) x (4 grids), this embodiment sets 4 angle deflection calculation units, 4 coordinate offset calculation units and 4 accumulators, which are connected to form 4 data channels supporting parallel calculation; the coordinate offset step length of the horizontal axis is equal to 1 grid, and the coordinate offset step length of the vertical axis is equal to 1 grid. For the reference coordinates in each data channel, a coordinate offset is first performed in parallel along the horizontal axis direction, so that the 4 coordinate offset calculation units control the reference coordinates obtained respectively to complete 4 coordinate offsets cumulatively along the horizontal axis direction of the block map, and obtain different offset results in turn. Through the 4 data channels, the coordinate offset times in the horizontal axis direction of the block map reach the maximum offset times in the horizontal axis direction, that is, the first preset traversal times, which is equal to the maximum number of grids allowed to be accommodated in the horizontal axis direction of the block map. After each data channel completes the coordinate shift in the direction of the horizontal axis in parallel, it continues to perform 4 coordinate shifts along the vertical axis in each data channel, that is, the maximum number of shifts in the vertical axis is reached in a single data channel, that is, the second preset number of traversals is reached, which is equal to the maximum number of grids allowed to be accommodated in the vertical axis of the block map. To overcome the drift error that may exist in the laser point data in the block map. Then, the corresponding positioning probability values after the same round of position transformation are accumulated in parallel in each data channel until the number of reference coordinates that have undergone the same round of position transformation reaches the preset positioning number (for example, 200), and each data channel obtains 4 positioning probability and values, so that the four accumulators obtain 16 positioning probability and values in parallel. Here, 16 is the product of the maximum number of shifts in the horizontal axis and the maximum number of shifts in the vertical axis, and it is also that after the four angle deflection calculation units perform an angle deflection calculation on the preset number of laser point data in parallel, each angle deflection calculation unit obtains a reference coordinate, and then performs the above calculation in the corresponding data channel. Specifically, after each round of position transformation executed in parallel (including coordinate offsets along each coordinate axis and one angle deflection calculation), the four accumulators use the positioning probability values corresponding to 200 reference coordinates as calculation units, perform cumulative summation, and synchronously obtain the aforementioned 16 positioning probability and values. At the same time, the four angle deflection calculation units perform different types of angle deflection calculations on the preset number of laser point data in parallel. The new reference coordinate obtained by the angle deflection calculation is queued for reading by the AHB bus, and then handed over to the four coordinate offset calculation units and the four accumulators for parallel calculation to obtain another 16 positioning probability and values.Each angle deflection calculation unit will start from a different reference deflection angle at the same time, and complete a corresponding rotation in the same deflection direction (the same as the previous rotation direction) (continue to rotate once the deflection angle step on the basis of the original deflection angle), and each angle deflection calculation is performed on the preset positioning number of laser point data, and the number of reference coordinates obtained by each angle deflection calculation unit is equal to the product of the preset positioning number and the target deflection number; then these reference coordinates are handed over to 4 coordinate offset calculation units and 4 accumulators one by one to perform parallel calculations, and then obtain 16 new positioning probabilities and values. When the sum of the number of times the four angle deflection calculation units perform angle deflection calculations reaches the maximum number of angle deflections allowed by the position transformation processing module, the state machine control module triggers the four accumulators to obtain the sum of the number of positioning probabilities and values in parallel: the product of the value 4, the number of target deflections, the value 4, and the value 4, to reach the number of all positioning probabilities and values required to locate a target position, and to allow the positioning algorithm used in the current scene to select the largest positioning probability and value from the positioning probabilities and values under the number conditions. Then, the four angle deflection calculation units receive a new batch of laser point cloud data transmitted from the cache memory in bursts, and cache the new preset positioning number (200) of laser point data into the four angle deflection calculation units at the same time through multiple burst read operations, and at this time, the probability information at the corresponding position in the block map is updated.
[0088] As an example, Figure 1 As shown, the state machine control module also includes a single write control module; the positioning processor also includes a write FIFO module. The position transformation processing module is used to write the positioning probabilities and values calculated by each accumulator into the write FIFO module in a single time according to a predetermined coordinate traversal order under the triggering action of a single write command issued by the single write control module; wherein, the number of positioning probabilities and values written in a single time is the single length. wherein, the predetermined coordinate traversal order is the order of traversing the coordinate positions in the block map by line break, or the order of traversing the coordinate positions in the block map by column break; the coordinate positions in the block map are preferably the positions of the corrected coordinates corresponding to the positioning probabilities and values in the block map.
[0089] In this embodiment, the position transformation processing module is used to write the positioning probability and value of this single length into the write FIFO module in sequence according to the predetermined coordinate traversal order under the triggering action of the single write command issued by the single write control module whenever the number of the positioning probability and value calculated cumulatively reaches a single length. A single length is a value of 2, and the two address values written in a single time are the address value where the horizontal coordinate x is located and the address value where the vertical coordinate y is located, so as to constitute a storage address of the positioning probability and value corresponding to a corrected coordinate.
[0090] In some embodiments, the predetermined coordinate traversal order is expressed as: x0, y0, ..., x0, yn, x1, y0, ..., x1, yn, forming an order of traversing the corrected coordinates corresponding to the positioning probability and value in the block map, which is equivalent to the order of traversing the two-dimensional map area column by column, and specifically, it can be traversing the block map by changing columns along the positive direction of the horizontal axis, so that the write FIFO module obtains the corrected coordinates and their corresponding positioning probability and value in a column-by-column traversal manner. Alternatively, the predetermined coordinate traversal order is expressed as: x0, y0, ..., xn, y0, x0, y1, ..., xn, y1, and the order of traversing the corrected coordinates corresponding to the positioning probability and value in the block map is equivalent to the order of traversing the two-dimensional map area row by row, and specifically, it can be traversing the block map by changing rows along the positive direction of the vertical axis, so that the write FIFO module obtains the corrected coordinates and their corresponding positioning probability and value in a row-by-row traversal manner.
[0091] On the basis of the above embodiment, the state machine control module also includes a burst write control module; a write FIFO module, which is used to cache the positioning probabilities and values output by the position transformation processing module in a first-in-first-out storage manner, and burst-write the cached positioning probabilities and values into the cache memory under the triggering action of the burst write command issued by the burst write control module; wherein, whenever the number of positioning probabilities and values cached by the write FIFO module reaches the burst length, the burst write control module triggers the write FIFO module to write the positioning probabilities and values of the burst length into the cache memory at one time; the burst write control module counts the number of positioning probabilities and values cached by the write FIFO module by counting.
[0092] In some embodiments, the write FIFO module can also be used to burst-write the cached positioning probabilities and values into the cache memory under the triggering action of a single write command issued by a single write control module; wherein, whenever the number of positioning probabilities and values cached by the write FIFO module reaches the single length, the single write control module triggers the write FIFO module to write the single length positioning probabilities and values into the cache memory at one time; the single write control module counts the number of positioning probabilities and values cached by the write FIFO module by counting.
[0093] The first-in-first-out storage method disclosed in the present application refers to a data sending buffer space (such as FIFO) in which the addressing address first sent out is first stored in the data receiving buffer space, and the addressing address stored at the head of the data sending buffer space is first sent to the external data receiving buffer space.
[0094] It should be noted that the commands issued by the burst read control module, the commands issued by the transformation control module, the commands issued by the single read control module, the commands issued by the single write control module, and the commands issued by the burst write control module all support the use of enable signals, count signals, or set signals, and are configured by the registers set in each module; wherein the burst read control module, the transformation control module, the single read control module, the single write control module, and the burst write control module are all state machines implemented by hardware language, and the state machine is formed by connecting the state registers of corresponding functions and combinational logic circuits; it is used to schedule the positioning processor to cyclically jump to different working states to keep reading multiple laser point data from the cache memory, and keep writing multiple positioning probabilities and values to the cache memory. Specifically, the state machine can jump and run in each working state, which requires the configuration of the aforementioned position transformation processing module, write FIFO module, various registers, timers and / or counters. The steps of state jump scheduling may be different, but the jump conditions cannot be separated from the support of these devices; in order to realize the reading of multiple laser point data from the cache memory and the writing of multiple positioning probabilities and values to the cache memory, thereby realizing the angle deflection calculation of the laser point data, the coordinate offset calculation of the reference coordinate in various coordinate axis directions (equivalent to the translation calculation) and the automatic operation of the burst read and write control state and the single read and write control state, so the various modules involved in the aforementioned embodiments all support the construction of digital operation circuits and support the control of the state machine.
[0095] Based on any embodiment of the positioning processor, the present embodiment further discloses a laser point data processing system, the laser point data processing system includes a cache memory, a DDR memory and the positioning processor; the cache memory is connected between the positioning processor and the DDR memory, the outside of the DDR memory is constructed to connect to the laser sensor, and the DDR memory stores the laser point data collected by the laser sensor. Compared with the prior art software CPU processing point cloud data of the same size, in the laser point data processing system disclosed in the present embodiment, the working state scheduling control of the state machine control module and the angle deflection calculation and coordinate offset calculation performed in parallel by the position transformation processing module take into account the errors generated during the rotation of the laser sensor or the movement of the laser point data processing system, and the cache memory is set as a cache intermediary between the positioning processor and the DDR memory, supporting the caching of laser point data and map information (angle, coordinate and probability value), when the positioning processor accesses the DDR memory through the cache memory, it will not occupy a large amount of DDR bandwidth, reduce the frequency requirements, and can also achieve the maximum saving of hardware resources, and accelerate the parallel calculation speed of the reference coordinates within the offset area of the block map. Shorten the calculation time of position probability information; then write the positioning probability and value into DDR memory through cache memory in burst for software call to complete relocation, so as to realize the synchronous accumulation operation and output of each positioning probability and value by multi-channel and batch of positioning processor, without connecting too much memory to the peripheral interface of positioning processor.
[0096] Preferably, the target on-chip memory includes an embedded SRAM and an embedded flash; when the positioning processor, the cache memory and the DDR memory are arranged on the same circuit board, the target on-chip memory is embedded in the chip where the positioning processor is located, but the design cost of the embedded SRAM and the embedded flash is very high, so the wafer area of the two cannot be made very large, which will restrict the use of the positioning processor, and therefore it is necessary to use the cache memory and the DDR memory disclosed in the aforementioned embodiment as off-chip memory, and do not retain the data caching function of the embedded SRAM and the embedded flash. Then, when the positioning processor, the cache memory and the DDR memory are arranged on the same circuit board, the positioning processor is not embedded in the target on-chip memory, and the cache memory and the DDR memory disclosed in the aforementioned embodiment are directly used as off-chip memory, and the target on-chip memory is not specially set up for data caching, thereby saving the design cost of the positioning processor.
[0097] In the laser point data processing system disclosed in the present embodiment, under the premise that the positioning processor does not use a large-capacity embedded SRAM and embedded flash to cache laser point data and map data, a dedicated cache memory is connected between the positioning processor and its external DDR memory to replace the on-chip memory to perform a large-capacity application storage function and cache laser point data (sampling data) and map data (coordinate probability information required for positioning calculation), thereby eliminating the need to develop a larger-capacity processor chip in the laser point data processing system, overcoming the problem of needing to expand the processor chip area due to the capacity of the embedded memory, and both taking advantage of the large capacity of the DDR memory and reducing the development cost of the processor chip. In the case where the cache memory allows the use of burst transfer operations to access the DDR memory, and the positioning processor allows the use of a single transfer operation to access the cache memory, since the number of address units on which the positioning processor has performed burst transfer operations on the cache memory in one clock cycle is equal to the number of address units on which the positioning processor has performed single transfer operations on the cache memory in one clock cycle, the number of data transferred by the positioning processor when accessing the cache memory using a burst transfer operation and the number of data transferred by the positioning processor when accessing the cache memory using a single transfer operation in the same clock cycle are the same; therefore, the access of the positioning processor to the DDR memory without setting the target on-chip memory will not be affected by the single transfer operation (due to the access efficiency constraint of the single transfer operation).
[0098] The cache memory includes a plurality of first cache lines and a plurality of second cache lines; the cache memory is used to read out the laser point data stored in the DDR memory and store it in the first cache line according to the read request instruction of the positioning processor, and then notify the positioning processor to read the data in the first cache line, so that the positioning processor can index the laser point data, wherein the read address information in the read request instruction of the positioning processor is derived from the burst read command issued by the burst read control module, each first cache line is a cache space specifically provided for the position transformation processing module to locate all laser point data required for a target position, specifically, it can cache a preset number of laser point data obtained by scanning the laser sensor at a position; after the old data cached in each first cache line is read by the positioning processor, the address unit where the old data is read can be cached by the new data output by the DDR memory, so that the first cache line is refreshed. The read request instruction of the positioning processor includes the storage address of the laser point data in the DDR memory, or the storage address of the laser point data in the first cache line of the cache memory. In the case where the cache memory has pre-stored the laser point data, the read request instruction of the positioning processor can also support the positioning processor to directly read the laser point data in the corresponding cache line from the cache memory, thereby improving the access speed of the positioning processor.
[0099] The cache memory is also used to receive the positioning probability and value output by the positioning processor according to the write request instruction of the positioning processor, and store the positioning probability and value in the second cache line, and then notify the DDR memory to read the positioning probability and value in the second cache line; wherein the write request instruction of the positioning processor includes the storage address of the positioning probability and value in the DDR memory, or the storage address of the positioning probability and value in the second cache line of the cache memory; the write address information in the write request instruction of the positioning processor is derived from the burst write command issued by the burst write control module. Each second cache line is specifically used to provide the positioning processor with a cache space for the positioning probability and value required to locate a target position and its corresponding corrected coordinates; after the old data cached in each second cache line is read by the DDR memory, the address unit where the old data is read can be cached by the new data transmitted by the positioning processor, so that the second cache line is refreshed, thereby facilitating the software instruction to filter out the corrected position corresponding to the positioning probability and value with the largest value from the DDR memory in real time.
[0100] It should be noted that the write request instructions and read request instructions of the positioning processor are controlled by the instruction fetch interface of the positioning processor and follow the timing characteristics of the AHB bus protocol supported by the positioning processor to ensure that the positioning processor can access multiple laser point data in the cache memory at one time.
[0101] When the positioning processor accesses the cache memory, the positioning processor will first search in the corresponding cache line in the cache memory; when the cache memory does not contain the data that the positioning processor needs to access, the cache memory will be started to access the DDR memory, thereby speeding up the access rate of the positioning processor. Specifically, before reading the laser point data from the cache memory each time, the positioning processor indexes the data of each first cache line in sequence, including indexing each first cache line in order from small to large in order of index number; and indexing each address unit in the current first cache line in order from small to large in order of address value, and then changing the line to continue indexing the address unit in the next first cache line. If the laser point data exists in a first cache line of the current index, the laser point data is read from a first cache line of the current index. If the laser point data does not exist in all the first cache lines in the cache memory, the cache memory is triggered to burst read data from the DDR memory and store it to update the data in the corresponding first cache line, that is, replace the old cache data. After replacing the data in the corresponding cache line, the positioning processor is notified to read the data in the updated first cache line (which can also be regarded as the data in a first cache line of the current index), and it is determined whether the data in a cache line of the current index contains the laser point data. If so, it is determined that the address matches and the index is completed, but it is not necessarily necessary to traverse the entire first cache line; otherwise, it is determined that the cache is lost, and it is necessary to continue to trigger the cache memory to burst read data from the DDR memory, and repeat the update and indexing until the positioning processor reads new laser point data from a first cache line of the current index. In this embodiment, the entire indexing process can be regarded as the hardware read and write operation logic (burst read control module) of the positioning processor issuing a corresponding burst read command to control completion.
[0102] When the positioning processor accesses in the form of a target type transfer operation, it is faster to obtain data from the cache memory than to obtain data from the DDR memory, so that when the positioning processor accesses the external memory in the same clock cycle in the same type of transfer operation, the amount of data obtained by accessing the cache memory is greater than the amount of data obtained by accessing the DDR memory, wherein the positioning processor obtains the first data from the DDR memory relative to the positioning processor obtaining the first data from the cache memory. Delay time; specifically, when the positioning processor accesses in the form of the same type of transfer operation, the delay time generated by obtaining data from the DDR memory relative to obtaining data from the cache memory depends on the number of hosts (such as cache memory or positioning processors) currently accessing the DDR memory, the access priority of each host, the delay required by the data reading mechanism in the DDR memory, and other factors. In this embodiment, the target type transfer operation is a burst transfer operation or a single transfer operation; the burst transfer operation is a burst read or a burst write, and the single transfer operation is a single read or a single write. Furthermore, since the number of address units that the positioning processor has performed a burst transfer operation on the cache memory in one clock cycle is equal to the number of address units that the positioning processor has performed a single transfer operation on the cache memory in one clock cycle, when the cache memory has pre-stored data that the positioning processor needs to access, the positioning processor will first search in the corresponding cache line of the cache memory in a burst transfer operation or a single transfer operation, rather than directly accessing the DDR memory in a single transfer operation, thereby solving the problem of low efficiency of the positioning processor accessing the DDR memory in a single transfer operation. Moreover, when the cache memory is configured to access the DDR memory in a burst transfer operation and the positioning processor is configured to access the cache memory in a single transfer operation, the corresponding read and write efficiency is higher than the read and write efficiency generated by the positioning processor with an internal SRAM accessing the DDR memory in a single transfer operation. The problem of low efficiency of the positioning processor with an on-chip target memory directly accessing the DDR memory in a single transfer operation is solved.
[0103] As an embodiment, if the amount of laser point data obtained by the cache memory from the DDR memory in a burst read is less than or equal to the cache line length, the data burst read from the DDR memory is cached in a preset first cache line that is read earliest by the positioning processor, so as to update part or all of the data in the preset first cache line that is read earliest by the positioning processor, so as to achieve the cache memory accessing the DDR memory with a cache line as an access unit, wherein the cache line length is equal to the burst length. This embodiment may occur when the positioning processor detects that the laser point data does not exist in all the first cache lines in the cache memory, or it may occur before the positioning processor accesses the cache memory for the first time. Therefore, the cache memory can read a cache line of data from a large-capacity DDR memory at one time, so as to update and replace the data corresponding to a cache line in the cache memory, thereby refreshing the cache data with a cache line length as the granularity, and then assisting the positioning processor to index the required laser point data from the corresponding cache line with a cache line length as the granularity, which not only takes into account the accuracy and real-time performance of the positioning processor's access to data, but also shares the space capacity pressure for the embedded memory of the positioning processor. The positioning processor does not need to move the laser point data and map data to the on-chip storage area, but only needs to access and compare the cache memory and refresh the cache data on demand, reducing the intervention of the software on the positioning processor, allowing the positioning processor to release more hardware computing resources to the position transformation processing module for angle deflection calculation and coordinate offset calculation, and speeding up the positioning processor to output positioning probability and value.
[0104] It should be noted that the cache line length is the number of consecutive address units set in a first cache line, and also represents the number of data with consecutive addresses in a first cache line; the data storage capacity of each address unit is equal, and the maximum data capacity cached in a first cache line is equal to the product of the cache line length and the data bit width of a single address unit; one address unit in the first cache line stores one data, and the cache line length is equal to the number of data stored in a first cache line. Preferably, the interface bit width of the cache memory is equal to the bit width of the DDR interface of the DDR memory, and the interface bit width of the cache memory is equal to the bit width of the instruction fetch interface of the positioning processor, which reduces the need to split the transmitted data due to bit width incompatibility, and is conducive to forming an efficient data path.
[0105] In some embodiments, the cache memory reads data in an address unit of a unit access length from the DDR memory at one time through a burst read operation, that is, the cache memory reads data of a unit access length from the DDR memory at one time within a read clock cycle, which can be controlled by the cache memory, the positioning processor or a burst read mode state machine set in the DDR memory; the cache memory also supports writing data of a unit access length into the DDR memory at one time through a burst write operation, that is, the cache memory writes data of the unit access length into the DDR memory at one time within a write clock cycle, which can be controlled by the cache memory, the positioning processor or a burst write mode state machine set in the DDR memory. In this embodiment, the unit access length is equal to the product of a preset integer multiple and a burst length, and the burst length is preferably 4, 8 or 16, and the preset integer multiple takes a matching integer value to meet the data length requirement of the positioning processor reading from the cache memory each time. Preferably, the preset positioning quantity is an integer multiple of the unit access length, so that the positioning processor can obtain the preset positioning quantity of laser point data from the cache memory by repeatedly performing burst read operations.
[0106] It should be noted that the burst length indicates the number of consecutive address units transmitted in one burst operation; the burst operation is a burst read operation or a burst write operation, and the corresponding conversion is made according to the working state of the cache memory; the burst read operation belongs to the operation implemented by the burst read mode state machine in the burst read mode, and the burst write operation belongs to the operation implemented by the burst write mode state machine in the burst write mode. The burst read mode and the burst write mode have dedicated registers for configuring the working mode, among which the burst read mode state machine is Figure 1 The public burst read control module, the burst write mode state machine is Figure 1 Public burst write control module.
[0107] In an application scenario where the cache memory belongs to an SRAM memory, the access of the positioning processor to the cache memory is designed based on the AHB protocol or the AXI protocol, so that the read operation of the positioning processor on the cache memory is a burst read operation or a single read operation, and the write operation of the positioning processor on the cache memory is a burst write operation or a single write operation, and the access to the cache memory based on hardware logic is realized, at least the instruction fetch interface of the positioning processor participates, and data is transmitted according to the AHB or AXI protocol. The read operation of the positioning processor on the cache memory is a burst read operation or a single read operation, and the write operation of the positioning processor on the cache memory is a burst write operation or a single write operation; the number of address units of the cache memory burst transfer operation performed by the positioning processor in one clock cycle is equal to the number of address units of the cache memory single transfer operation performed by the positioning processor in one clock cycle; therefore, when the cache memory is an SRAM memory, there is no difference in access speed between the burst transfer operation and the single transfer operation. Compared with the use of off-chip flash, there is no speed difference between the input and output interfaces, which reduces the need to set up additional cache areas to balance the speed difference, reduces the resources occupied by bus arbitration outside the MCU, and simplifies the access control logic of the MCU.
[0108] It should be noted that the single length represents the number of continuous address units transmitted in a single transfer operation, that is, the number of continuous data of the address units transmitted in a single transfer operation; the single length is smaller than the burst length, preferably 2; the burst transfer operation is a burst read operation or a burst write operation, and the single transfer operation is a single read operation or a single write operation; the cache memory is configured to access the DDR memory in a burst transfer operation mode to improve the access efficiency to the DDR memory, which is higher than the access efficiency generated by the positioning processor or the cache memory in a single transfer operation to the DDR memory; the positioning processor is configured to access the cache memory in a single transfer operation mode, so that the access of the positioning processor to the DDR memory is not affected by the specific bus transfer operation type, so when the cache memory is configured to access the DDR memory in a burst transfer operation mode, even if the positioning processor is configured to access the cache memory in a single transfer operation mode, the corresponding read and write efficiency is higher than the read and write efficiency generated when the positioning processor is configured to access the DDR memory in a single transfer operation mode.
[0109] Preferably, in the cache memory, the number of address units in each cache line is equal, and the data bit width set for each address unit is equal, so that the cache memory is composed of data blocks of multiple rows and columns, and a data block in a certain row and column is equivalent to the address unit of the corresponding column in a cache line set at the row (the number of address units in the first cache line is equal to the number of address units in the second cache line). The cache line length is used as a standard for dividing a row of addresses. When external access is performed to read or store data, this division is used as a prerequisite. The data capacity of the divided address can be determined by the width of the data transmitted in each clock beat; preferably, the data bit width set for each address unit is 64 bits, 32 bits or 16 bits, which can be used as the minimum unit for the positioning processor to access the cache memory. Specifically, when the cache line length is the number of consecutive address units set in a cache line, the capacity of the cache memory is equal to the product of the total number of cache lines, the cache line length and the preset data bit width, wherein the number of consecutive addresses indicated in each cache line is equal and fixed; the data stored in each address unit is an instruction of a preset data bit width, and the preset data bit width can be set to 32 bits. When the cache line length is set to 16, a cache line stores 16 32-bit instructions. Furthermore, when the cache memory is set with 32 cache lines, the capacity of the cache memory is 32*16*32bit.
[0110] In the embodiments provided in the present application, it should be understood that the disclosed systems and processors can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the modules and units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
Claims
1. Positioning processor, It is characterized in that The positioning processor is configured to be connected to the cache memory, and the cache memory is connected to the DDR memory; The internal setting state machine control module and position transformation processing module of the positioning processor; Multiple data channels are set inside the position change processing module; The DDR memory is used to store the laser point data; the cache memory is used to read the laser point data from the DDR memory in bursts under the control of the state machine control module; The position transformation processing module is used to read out the laser point data from the cache memory in burst or single burst under the control of the state machine control module, and then transmit each laser point data read out to each data channel at the same time, and control each data channel to synchronously perform multiple rounds of position transformation from the corresponding transformation starting point reference quantity, so that each data channel can simultaneously obtain multiple target offset coordinates and their corresponding positioning probability values; the transformation starting point reference quantities corresponding to each data channel are different from each other, and the number of rounds of position transformation required for each data channel is equal; A position transformation processing module is used to accumulate the positioning probability values corresponding to the target offset coordinates obtained by the same round of position transformation in each data channel in turn to obtain a positioning probability sum value; The positioning processor is used to write the accumulated positioning probability and value into the cache memory in burst or once under the control of the state machine control module inside the processor; The cache memory is used to write the positioning probability and value burst into the DDR memory under the control of the state machine control module.
2. The positioning processor according to claim 1, It is characterized in that The target on-chip memory is not provided inside the positioning processor, so that the cache memory replaces the target on-chip memory to cache the data transmitted between the positioning processor and the DDR memory.
3. The positioning processor according to claim 2, It is characterized in that The positioning processor is also used to support the software instruction to select a positioning probability and value with the largest value from all positioning probabilities and values required for positioning a target position, and then set the correction position corresponding to the positioning probability and value with the largest value as the position relocated by the positioning processor in the block map; Whenever all the laser point data of the preset positioning number are processed by the position transformation processing module into the positioning probability and value output at the corresponding correction position, all the positioning probabilities and values required for positioning a target position are obtained; wherein the number of rounds of position transformation required for the same laser point data in one data channel is equal to the number of positioning probabilities and values accumulated by the laser point data of the preset positioning number in one data channel; The corrected position corresponding to a positioning probability and value is represented in the block map as a coordinate position obtained by a round of target transformation relative to the origin of the coordinate system; the target transformation is a round of position transformation required by the position transformation processing module in order to obtain the same positioning probability and value.
4. The positioning processor according to claim 3, It is characterized in that The positioning probability value corresponding to the target offset coordinates indicates the probability of the laser point data of the target offset coordinates obtained after a round of position transformation falling into the corresponding position of the block map, or indicates the probability of the laser sensor falling into the corresponding position of the block map, or indicates the probability that the cell position of the block map is occupied by an obstacle that reflects the laser point data; each target offset coordinate obtained after a round of position transformation of each laser point data has a corresponding relationship with a positioning probability value, and is pre-set so as to be called by the position transformation processing module; The exterior of the DDR memory is constructed to be connected to a laser sensor so that the DDR memory stores laser point data collected by the laser sensor; wherein the block map is generated within the effective detection range of the laser sensor with the current position of the laser sensor as the origin of the coordinate system; the block map is a local map of a preset size.
5. The positioning processor according to claim 4, It is characterized in that The position transformation processing module includes a preset parallel number of angle deflection calculation units, a preset parallel number of coordinate offset calculation units, and a preset parallel number of accumulators; A preset number of parallel angle deflection calculation units are each marked with a serial number, a preset number of parallel coordinate offset calculation units are each marked with a serial number, and a preset number of parallel accumulators are each marked with a serial number; The serial numbers of the preset parallel number of angle deflection calculation unit marks are different from each other, the serial numbers of the preset parallel number of coordinate offset calculation unit marks are different from each other, and the serial numbers of the preset parallel number of accumulator marks are different from each other; The serial numbers of the preset parallel number of angle deflection calculation unit marks, the serial numbers of the preset parallel number of coordinate offset calculation unit marks, and the serial numbers of the preset parallel number of accumulator marks are all within the same numerical range; An angle deflection calculation unit is connected to a coordinate offset calculation unit with the same serial number, a coordinate offset calculation unit is connected to an accumulator with the same serial number, an angle deflection calculation unit, a coordinate offset calculation unit and an accumulator with the same serial number are sequentially connected to form a data channel and marked as a data channel with a corresponding serial number; When the transformation starting point reference amount is expressed as the reference deflection angle required by the angle deflection calculation unit, the difference between the reference deflection angle of the i-th angle deflection calculation unit and the reference deflection angle of the (i-1)-th angle deflection calculation unit is equal to the product of the target deflection number and the angle deflection step length, wherein i is set to be greater than or equal to 2, and i is set to be less than or equal to the preset parallel number; For the same laser point data input into each data channel, the number of angle deflections that each angle deflection calculation unit needs to execute is equal.
6. The positioning processor according to claim 5, It is characterized in that The state machine control module includes a burst read control module, a single read control module and a transformation control module; The angle deflection calculation unit is used to read a batch of laser point data from the cache memory in burst mode under the triggering effect of the burst read command issued by the burst read control module, wherein the number of the batch of laser point data is equal to the burst length; or to read a batch of laser point data from the cache memory in a single mode under the triggering effect of the single read command issued by the single transmission control module, wherein the number of the batch of laser point data is equal to the single length; The burst reading control module or the single reading control module schedules the angle deflection calculation unit to read out the laser point data multiple times by counting, so that the laser point data of a preset positioning number are read into the position transformation processing module; A preset number of parallel angle deflection calculation units are used to control the laser point data in parallel to perform angle deflection calculation whenever the laser point data is acquired in parallel, obtain the corresponding reference coordinates, and then transmit the reference coordinates to the coordinate offset calculation unit with the same serial number; the reference coordinates obtained in each angle deflection calculation unit are different; A preset number of parallel coordinate offset calculation units are used to control the reference coordinates to perform coordinate offset in parallel along the same coordinate axis direction whenever the reference coordinates are acquired in parallel; The preset parallel number of coordinate offset calculation units is also used to set the reference coordinates after the reference coordinates obtained in parallel undergo a coordinate offset in the direction of the first coordinate axis and a coordinate offset in the direction of the second coordinate axis as the target offset coordinates, and then index the positioning probability value corresponding to the target offset coordinates; In each data channel, the transformation control module first triggers the coordinate offset calculation unit to index the positioning probability value corresponding to the target offset coordinate obtained by the same round of position transformation by counting, and then sequentially outputs the positioning probability value corresponding to the target offset coordinate obtained by the same round of position transformation to the accumulator connected to the coordinate offset calculation unit; A preset number of parallel accumulators are used to receive the positioning probability values in parallel in a first-in-first-out manner, and then accumulate each received positioning probability value once in each accumulator, and whenever the transformation control module counts that the number of accumulations in the accumulator reaches the preset positioning number, the current accumulation result is set as a positioning probability sum value, and it is determined that the number of laser point data participating in the same round of position transformation reaches the preset positioning number; The preset parallel quantity is pre-configured; the preset positioning quantity represents the quantity of laser point data required for positioning a target position of the block map.
7. The positioning processor according to claim 6, It is characterized in that Each time the angle deflection calculation is performed on the same laser point data, a new reference coordinate is obtained, and then a coordinate offset calculation is performed on the new reference coordinate to obtain a new target offset coordinate and index it to a corresponding positioning probability value; One round of position transformation includes one angle deflection calculation and one coordinate offset calculation, and one coordinate offset calculation includes one horizontal coordinate offset calculation and one vertical coordinate offset calculation; wherein the same type of angle deflection calculation and the same type of coordinate offset calculation are represented by the same round of position transformation; When the same type of angle deflection calculation and the same type of coordinate offset calculation are represented by the same round of position transformation, in each coordinate offset calculation unit, the same type of coordinate offset calculation means that the horizontal coordinate offset calculation method and the vertical coordinate offset calculation method are the same coordinate transformation calculation, so that the laser point data after the same type of angle deflection calculation and the same type of coordinate offset calculation in the same data channel have the same relative posture relationship with the laser point data before the calculation; When the angle deflection calculation is performed on the same laser point data in different angle deflection calculation units, the required reference deflection angles are different.
8. The positioning processor according to claim 7, It is characterized in that One round of position transformation includes: each time the position transformation processing module performs an angle deflection operation, the position transformation processing module controls the corresponding reference coordinate to first perform a coordinate shift along the first coordinate axis direction, and then perform a coordinate shift along the second coordinate axis direction, so as to form a coordinate shift calculation method; When the first coordinate axis direction represents the horizontal coordinate axis direction, the second coordinate axis direction represents the vertical coordinate axis direction; or, when the first coordinate axis direction represents the vertical coordinate axis direction, the second coordinate axis direction represents the horizontal coordinate axis direction.
9. The positioning processor according to claim 8, It is characterized in that When the block map is represented as a grid map, the maximum number of grids allowed to be accommodated in the horizontal axis direction of the block map is greater than or equal to the product of the maximum number of offsets allowed for the same reference coordinate in the horizontal axis direction of the block map and the horizontal axis offset step, and the maximum number of grids allowed to be accommodated in the vertical axis direction of the block map is greater than or equal to the product of the maximum number of offsets allowed for the same reference coordinate in the vertical axis direction of the block map and the vertical axis offset step; Among them, the position transformation processing module is pre-configured with the maximum number of offsets allowed for the reference coordinates in the horizontal axis direction of the block map and the coordinate offset step in the horizontal axis direction, and the maximum number of offsets allowed for the reference coordinates in the vertical axis direction of the block map and the coordinate offset step in the vertical axis direction.
10. The positioning processor according to claim 6, It is characterized in that Each angle deflection calculation unit is used to, after acquiring the laser point data, respectively start from the corresponding reference deflection angle, rotate the target deflection times along the predetermined clock direction and around the origin of the coordinate system of the block map, and sequentially save the reference coordinates obtained by each rotation, so that each angle deflection calculation unit obtains reference coordinates equal to the target deflection times and transmits them to the coordinate offset calculation unit with the same serial number; Each coordinate offset calculation unit is used to perform coordinate offset calculation for a first preset number of traversals on the reference coordinates along the first coordinate axis direction of the block map after obtaining the reference coordinates and sequentially save the offset results obtained by each coordinate offset, so as to obtain offset results for the first preset number of traversals in the first coordinate axis direction of the block map; Each coordinate offset calculation unit is further used for controlling the reference coordinate after the aforementioned coordinate offset to perform a coordinate offset calculation for a second preset number of traversals along the second coordinate axis of the block map whenever a reference coordinate has performed a coordinate offset calculation along the first coordinate axis of the block map, and sequentially saving the offset results of each coordinate offset, so as to obtain an offset result for the second preset number of traversals in the direction of the second coordinate axis, until all offset results obtained by performing a coordinate offset calculation for a reference coordinate along the first coordinate axis are coordinate offset calculations for the second preset number of traversals along the second coordinate axis, and a cumulative number of target offset coordinates is obtained, which is the product of the first preset number of traversals and the second preset number of traversals; and further, in each data channel, when the same laser point data is rotated by the target deflection number, the cumulative number of target offset coordinates obtained is the product of the target deflection number, the preset parallel number, the first preset number of traversals and the second preset number of traversals; The number of coordinate offsets is obtained by counting the transformation control module, which provides a basis for its scheduling; When the first coordinate axis is the horizontal coordinate axis, the second coordinate axis is the vertical coordinate axis; or when the first coordinate axis is the vertical coordinate axis, the second coordinate axis is the horizontal coordinate axis.
11. The positioning processor according to claim 10, It is characterized in that The angle deflection calculation unit is used to perform an angle deflection calculation on the laser point data using pre-configured angle deflection information to obtain a reference coordinate, which is the coordinate of the laser point data on the block map after the angle deflection calculation; wherein, each angle deflection calculation performed on the same laser point data in the same angle deflection calculation unit corresponds to a different reference coordinate; each angle deflection calculation performed in parallel on the same laser point data in different angle deflection calculation units corresponds to a different reference coordinate; in different angle deflection calculation units, the reference coordinates obtained for the same laser point data at the same number of deflections have the same relative posture relationship with the reference coordinates obtained by the first angle deflection calculation.
12. The positioning processor according to claim 11, It is characterized in that The process of performing an angle deflection calculation on the laser point data using the pre-configured angle deflection information comprises: A trigonometric function relationship is established using the product of the deflection angle step and the current number of deflection times, the sum of the initial deflection angle and the reference deflection angle corresponding to the laser point data, and the scanning radius of the laser sensor to calculate the reference coordinates generated by the current angle deflection calculation; The information carried by the laser point data includes a scanning radius, an initial deflection angle formed by the coordinate position corresponding to the laser point data relative to the coordinate axis of the block map, and angle deflection information of the laser point data. The scanning radius is the distance between the laser sensor and the coordinate position corresponding to the laser point data currently involved in the angle deflection calculation; the angle deflection information of the laser point data includes the deflection angle step required to be configured for the coordinate position corresponding to the laser point data to rotate around the origin of the coordinate system of the block map, the current deflection number, and the target deflection number; the scanning radius does not exceed the effective detection range of the laser sensor.
13. The positioning processor according to claim 12, It is characterized in that The state machine control module also includes a single write control module; the positioning processor also includes a write FIFO module; The position transformation processing module is used to write the positioning probabilities and values calculated by each accumulator into the write FIFO module in a single time according to a predetermined coordinate traversal order under the triggering action of the single write command issued by the single write control module; wherein the number of positioning probabilities and values written in a single time is the single length; The predetermined coordinate traversal order is an order of traversing the coordinate positions in the block map in a row-by-row manner, or an order of traversing the coordinate positions in the block map in a column-by-column manner.
14. The positioning processor according to claim 13, It is characterized in that The state machine control module also includes a burst write control module; A write FIFO module is used to cache the positioning probabilities and values output by the position transformation processing module in a first-in-first-out storage manner, and under the triggering action of a burst write command issued by a burst write control module, burst write the cached positioning probabilities and values into the cache memory, or under the triggering action of a single write command issued by a single transmission control module, write the cached positioning probabilities and values into the cache memory once.
15. The positioning processor according to claim 14, It is characterized in that The commands issued by the burst read control module, the commands issued by the conversion control module, the commands issued by the single write control module and the commands issued by the burst write control module all support being represented by an enable signal, a count signal or a set signal, and are configured by registers set in each module; The burst read control module, the conversion control module, the single read control module, the single write control module, and the burst write control module are all state machines implemented by hardware language, and the state machine is formed by connecting state registers of corresponding functions and combinational logic circuits; The method is used to schedule the positioning processor to cyclically jump to different working states so as to keep reading a plurality of laser point data from the cache memory and keep writing a plurality of positioning probabilities and values into the cache memory.
16. A laser point data processing system, It is characterized in that The laser point data processing system comprises a cache memory, a DDR memory and a positioning processor as claimed in any one of claims 1 to 15; The cache memory is connected between the positioning processor and the DDR memory. The exterior of the DDR memory is configured to be connected to the laser sensor. The DDR memory stores the laser point data collected by the laser sensor.
17. The laser point data processing system according to claim 16, It is characterized in that The cache memory includes a first cache line and a second cache line; The cache memory is used to read the laser point data stored in the DDR memory and store it in the first cache line according to the read request instruction of the positioning processor, and then notify the positioning processor to read the data in the first cache line; wherein the read address information in the read request instruction of the positioning processor is derived from the burst read command issued by the burst read control module; The cache memory is also used to receive the positioning probability and value output by the positioning processor according to the write request instruction of the positioning processor, store the positioning probability and value in the second cache line, and then notify the DDR memory to read the positioning probability and value in the second cache line; wherein the write address information in the write request instruction of the positioning processor is derived from the burst write command issued by the burst write control module.
18. The laser point data processing system according to claim 17, It is characterized in that The positioning processor sequentially indexes data of each first cache line before reading laser point data from the cache memory each time; If the laser point data to be read exists in a first cache line of the current index, the laser point data to be read is read from a first cache line of the current index; If the laser point data to be read does not exist in all the first cache lines in the cache memory, the cache memory is triggered to burst read the data from the DDR memory and store it to update the data in the corresponding first cache line until the positioning processor reads the required laser point data from the first cache line.
19. The laser point data processing system according to claim 18, It is characterized in that If the amount of laser point data obtained by burst reading from the DDR memory by the cache memory is less than or equal to the cache line length, the data burst read from the DDR memory is cached in a first cache line that is preset and read earliest by the positioning processor; The cache line length is the number of consecutive address units set in a first cache line to determine the number of consecutive data in the address units in the first cache line; the data storage capacity of each address unit is equal.
20. The laser point data processing system according to claim 19, It is characterized in that The number of address units on which the positioning processor has performed a burst transfer operation on the cache memory in one clock cycle is equal to the number of address units on which the positioning processor has performed a single transfer operation on the cache memory in one clock cycle; When the positioning processor accesses the external memory in a target type transfer operation, obtaining data from the cache memory is faster than obtaining data from the DDR memory; Wherein, the target type transfer operation is a burst transfer operation or a single transfer operation; The burst transfer operation is a burst read operation or a burst write operation, and the single transfer operation is a single read operation or a single write operation.
