LiDAR-based vehicle positioning methods, devices, equipment, and media
By collecting and processing point cloud data using lidar, the unmanned trucks can achieve efficient and accurate positioning, solving the problem that unmanned trucks cannot accurately locate charging stations and ensuring the charging efficiency of unmanned trucks.
Patent Information
- Application Number
- CN202211007852.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-22
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2042-08-22
AI Technical Summary
Existing technologies cannot effectively enable unmanned trucks to accurately park at charging stations, affecting their range and charging efficiency.
The vehicle localization method based on lidar uses lidar to collect point cloud data, extracts the point cloud data of the vehicle under test, projects it onto the target plane, and performs line fitting processing to obtain the vehicle localization results, including accurate positioning of direction and position.
It achieves efficient and accurate positioning of unmanned trucks, and can quickly guide unmanned trucks to the correct parking and charging position at the charging station to meet the needs of the scenario.
Smart Images

Figure CN115372981B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of port automation technology, and more specifically, to a vehicle positioning method, apparatus, equipment, and medium based on lidar. Background Technology
[0002] With the rapid development of technology, port operations are showing a trend towards automation. Automation technology can significantly improve operational efficiency and reduce labor costs.
[0003] In the daily operations of ports, unmanned tractor-trailers form unmanned container trucks to complete the container transportation process. Ensuring the endurance of these unmanned container trucks so that they can operate continuously is a key aspect of port automation technology.
[0004] To ensure that unmanned trucks can charge normally, they need to be accurately parked in the designated parking and charging positions at charging stations. This poses a significant challenge to sensing technology, and currently there is no effective method to accurately park unmanned trucks in the designated parking and charging positions at charging stations.
[0005] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] In view of this, the present invention provides a vehicle positioning method, device, equipment and medium based on lidar, which can efficiently and accurately obtain the vehicle positioning result through a positioning algorithm based on lidar to estimate the vehicle's position status. The positioning accuracy can meet the requirements of the scenario, so when applied to the unmanned truck charging scenario, it can quickly guide the unmanned truck to accurately stop at the parking and charging position of the charging station.
[0007] According to one aspect of the present invention, a vehicle positioning method based on lidar is provided, comprising: extracting point cloud data of a vehicle under test from point cloud data acquired by lidar; projecting the point cloud data of the vehicle under test onto a target plane to obtain target point cloud data; performing linear fitting processing on the target point cloud data to obtain a fitted straight line characterizing the position state of the vehicle under test in the target plane; and obtaining the positioning result of the vehicle under test based on the fitted straight line and the target straight line characterizing the target direction and target position in the target plane.
[0008] In some embodiments, the target plane is established based on a vehicle length coordinate axis extending parallel to the target direction and a vehicle width coordinate axis perpendicular to the vehicle length coordinate axis; obtaining the positioning result of the vehicle under test includes: obtaining the angle between the vehicle length direction of the vehicle under test and the target direction based on the slope of the fitted straight line and the slope of the target straight line; and obtaining the positioning result of the vehicle under test based on the target direction based on the angle.
[0009] In some embodiments, when the included angle exceeds a set angle threshold, a positioning result of the vehicle under test deviating from the target direction is obtained; the vehicle positioning method further includes: generating a control command to adjust the vehicle under test to match the target direction based on the included angle and the angle threshold.
[0010] In some embodiments, when the included angle is less than a set angle threshold, a positioning result of the vehicle under test matching the target direction is obtained; obtaining the positioning result of the vehicle under test further includes: obtaining a vehicle length coordinate value based on a vehicle width coordinate value according to the linear equation of the fitted straight line; wherein, the vehicle width coordinate value is the coordinate value of a reference point on the target straight line on the vehicle width coordinate axis; and obtaining a positioning result of the vehicle under test based on the target position according to the difference between the vehicle length coordinate value and the coordinate value of the reference point on the vehicle length coordinate axis.
[0011] In some embodiments, when the difference exceeds a set distance threshold, a positioning result is obtained indicating that the vehicle under test has deviated from the target position; the vehicle positioning method further includes: generating a control command based on the difference and the distance threshold to adjust the vehicle under test to match the target position.
[0012] In some embodiments, the step of extracting point cloud data of the vehicle under test includes: extracting point cloud data within the spatial range corresponding to the size data from the point cloud data collected by the lidar, based on the size data of the vehicle under test, and using this as the point cloud data of the vehicle under test.
[0013] In some embodiments, projecting the point cloud data of the vehicle under test onto the target plane includes: projecting the point cloud data of the vehicle under test onto the target plane according to the transformation matrix between the coordinate system of the lidar and the reference coordinate system constructed based on the target plane.
[0014] In some embodiments, after projecting the point cloud data of the vehicle under test onto the target plane, the method further includes: downsampling the point cloud data projected onto the target plane to obtain the target point cloud data.
[0015] In some embodiments, the linear fitting process for the target point cloud data includes: performing linear fitting processing on the target point cloud data based on a random sampling consensus algorithm.
[0016] According to another aspect of the present invention, a vehicle positioning device based on lidar is provided, comprising: a point cloud data extraction module for extracting point cloud data of a vehicle under test from point cloud data acquired by lidar; a target data acquisition module for projecting the point cloud data of the vehicle under test onto a target plane to obtain target point cloud data; a straight line equation fitting module for performing straight line fitting processing on the target point cloud data to obtain a fitted straight line characterizing the position state of the vehicle under test in the target plane; and a positioning result determination module for obtaining the positioning result of the vehicle under test based on the fitted straight line and a target straight line characterizing the target direction and target position in the target plane.
[0017] According to another aspect of the present invention, an electronic device is provided, comprising: a processor; a memory storing executable instructions; wherein, when the executable instructions are executed by the processor, they implement the vehicle positioning method based on lidar as described in any of the above embodiments.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided for storing a program that, when executed by a processor, implements the vehicle positioning method based on lidar as described in any of the above embodiments.
[0019] The beneficial effects of this invention compared to the prior art include at least the following:
[0020] The vehicle positioning scheme based on lidar of the present invention collects point cloud data around the target location using lidar, and extracts the point cloud data of the vehicle under test from it; by projecting the point cloud data of the vehicle under test onto the target plane, a fitting straight line representing the vehicle's position state is obtained by fitting the target point cloud data; thus, based on the fitting straight line and the target straight line representing the target direction and target position, the positioning result of the direction and position of the vehicle under test is obtained.
[0021] The positioning algorithm based on LiDAR to estimate vehicle position status of the present invention can obtain vehicle positioning results efficiently and accurately. The positioning accuracy can meet the requirements of the scenario. Therefore, when applied to the unmanned truck charging scenario, it can quickly guide the unmanned truck to the parking and charging position of the charging station.
[0022] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description
[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0024] Figure 1 The diagram illustrates the steps of a vehicle positioning method based on lidar in one embodiment of the present invention.
[0025] Figure 2 This diagram illustrates a scenario of vehicle positioning based on lidar according to an embodiment of the present invention.
[0026] Figure 3 This diagram illustrates the steps for obtaining the positioning result of the vehicle under test in one embodiment of the present invention.
[0027] Figure 4 This diagram illustrates the alignment of the fitted line and the target line in one embodiment of the present invention.
[0028] Figure 5 This diagram illustrates the steps for obtaining the positioning result of the vehicle under test in another embodiment of the present invention.
[0029] Figure 6 A schematic diagram of a vehicle positioning device based on lidar is shown in one embodiment of the present invention;
[0030] Figure 7 A schematic diagram of the structure of an electronic device according to an embodiment of the present invention is shown. Detailed Implementation
[0031] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to fully and completely convey the concept of the exemplary embodiments to those skilled in the art.
[0032] The accompanying drawings are merely illustrative of the invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0033] Furthermore, the processes shown in the accompanying drawings are merely illustrative and do not necessarily include all steps. For example, some steps can be broken down, some steps can be combined or partially combined, and the actual execution order may change depending on the actual situation. It should be noted that, unless otherwise specified, embodiments of the present invention and features in different embodiments can be combined with each other.
[0034] Figure 1 This illustrates the main steps of a vehicle localization method based on lidar in one embodiment, with reference to... Figure 1 As shown, in one embodiment, the vehicle localization method based on lidar includes:
[0035] Step S110: Extract the point cloud data of the vehicle under test from the point cloud data collected by the lidar.
[0036] LiDAR can be mounted on top of a target location to collect point cloud data around that location. For example, in an unmanned truck charging scenario, a LiDAR mounted on top of a charging station can collect point cloud data around the parking and charging area. Based on the point cloud data collected by the LiDAR, the point cloud data of the vehicle being tested located around the target location can be extracted.
[0037] Step S120: Project the point cloud data of the vehicle under test onto the target plane to obtain the target point cloud data.
[0038] The target plane is the plane containing the target location. For example, in an unmanned truck charging scenario, the target plane is parallel to the plane where the charging station's parking and charging positions are located, and can be the ground. By projecting the point cloud data of the vehicle under test onto the target plane, it becomes easier to subsequently use the target point cloud data to fit and obtain a fitted straight line representing the vehicle's positional state.
[0039] Step S130: Perform linear fitting processing on the target point cloud data to obtain a fitted straight line that characterizes the position state of the vehicle under test in the target plane.
[0040] The fitted line is specifically the diagonal line of the vehicle under test projected onto the target plane. By fitting the line, the orientation, position, and other positional states of the vehicle under test in the target plane can be characterized.
[0041] Step S140: Based on the fitted straight line and the target straight line in the target plane that represents the target direction and target position, obtain the positioning result of the vehicle under test.
[0042] The target straight line is pre-marked based on the target direction and position in the target plane. For example, in an unmanned truck charging scenario, based on the direction and position of the unmanned truck defined by the parking and charging location, a target straight line is pre-marked in the target plane. Specifically, the target straight line is the diagonal line projected from the parking and charging location onto the target plane. Therefore, by fitting the straight line and comparing it with the target straight line based on direction and position, the positioning results of the vehicle's direction and position can be obtained.
[0043] Therefore, the aforementioned positioning algorithm based on LiDAR to estimate vehicle position status can efficiently and accurately obtain vehicle positioning results, and the positioning accuracy can meet the requirements of the scenario. When the aforementioned LiDAR-based vehicle positioning solution is applied to the unmanned truck charging scenario, it can quickly guide the unmanned truck to accurately stop at the parking and charging position of the charging station.
[0044] In one embodiment, extracting point cloud data of the vehicle under test from the point cloud data collected by the lidar includes: extracting point cloud data within the spatial range corresponding to the size data from the point cloud data collected by the lidar based on the size data of the vehicle under test, and using this as the point cloud data of the vehicle under test.
[0045] The dimensions of the vehicle under test, including length, width, and height, can be measured and calibrated in advance. Based on the dimensions of the vehicle under test, the ROI (Region of Interest) can be determined from the LiDAR observation data. This ROI, which is the spatial range corresponding to the dimensions, ensures that the ROI covers the vehicle under test, thereby extracting the point cloud data of the vehicle under test.
[0046] In subsequent straight line fitting, only the point cloud data extracted from the ROI region is fitted to reduce the amount of data and quickly and accurately obtain the fitted straight line representing the position state of the vehicle under test.
[0047] In one embodiment, projecting the point cloud data of the vehicle under test onto the target plane includes: projecting the point cloud data of the vehicle under test onto the target plane according to the transformation matrix between the coordinate system of the lidar and the reference coordinate system constructed based on the target plane.
[0048] The transformation matrix is pre-calibrated based on the coordinate system of the LiDAR and the reference coordinate system before executing the vehicle positioning scheme. The transformation matrix can correct and transform the coordinate system of the LiDAR to compensate for the installation error of the LiDAR. According to the transformation matrix, the point cloud data of the vehicle under test is projected onto the target plane to obtain the target point cloud data.
[0049] Furthermore, in one embodiment, after projecting the point cloud data of the vehicle under test onto the target plane, the method further includes: downsampling the point cloud data projected onto the target plane to obtain target point cloud data.
[0050] Downsampling can eliminate redundant data, reducing the computational load for subsequent line fitting. Specifically, downsampling can be performed using a raster downsampling method. First, a raster is set on the target plane (e.g., the YOZ plane) of the reference coordinate system according to a pre-defined resolution. Then, only points in the point cloud data projected onto the target plane that fall within the raster are retained, thus obtaining the target point cloud data.
[0051] In one embodiment, performing linear fitting processing on the target point cloud data includes: performing linear fitting processing on the target point cloud data based on a random sampling consensus algorithm.
[0052] The Random Sample Consensus (RANSAC) algorithm iteratively estimates the parameters of a mathematical model from observed data. Specifically, fitting a straight-line model of the vehicle under test based on the RANSAC algorithm includes: randomly selecting two points as a pair in the target point cloud data; assuming K iterations are performed to obtain K straight-line models, a total of K pairs of points are selected; for each pair of points, the model equation is solved using the remaining points through least squares; when the distance from a point in the remaining points to the straight-line model is less than a set threshold, this point is considered an interior point of the current solved model; the straight-line model with the most interior points among the K straight-line models is taken as the final fitting result.
[0053] Figure 2 This illustration shows a scenario where vehicle positioning is based on LiDAR. This embodiment takes the application of a LiDAR-based vehicle positioning solution to an unmanned truck charging scenario as an example. Figure 2 The view shown is a side view.
[0054] Reference Figure 2 As shown, in the unmanned truck charging scenario, the LiDAR 20 is installed on the top of the charging station, and its coordinate system can use its default coordinate system. Before vehicle positioning, the transformation matrix for rotating the LiDAR's coordinate system to the reference coordinate system XYZ is pre-calibrated. The reference coordinate system XYZ follows the right-hand rule, with its X-axis pointing perpendicularly to the ground, its Y-axis parallel to the ground and extending parallel to the direction of travel, and its Z-axis (…). Figure 2 (Not specifically shown in the image) Extends perpendicular to the direction of travel. A transformation matrix can be used to correct and transform the coordinate system of the lidar, compensating for installation errors and ensuring that the X-axis is perpendicular to the ground and the Y-axis is parallel to the ground.
[0055] The target plane is selected as the YOZ plane from a top-down view. The unmanned truck 21 can be in a state where an unmanned tractor is carrying a trailer, or it can only contain an unmanned tractor. Ideally, the unmanned truck 21 moves along the lane lines (the direction of travel is the extension of the lane lines) to the parking and charging position of the charging station to achieve smooth charging. In some scenarios, the unmanned truck 21 may deviate from the parking and charging position (including positional deviation and directional deviation), affecting normal charging. In this case, a vehicle positioning solution based on LiDAR 20 is needed to guide the unmanned truck 21 to accurately park at the parking and charging position of the charging station.
[0056] Specifically, the vehicle positioning method based on LiDAR described in the above embodiments first extracts the point cloud data of the unmanned truck 21 from the point cloud data collected by the LiDAR 20; then, it projects the point cloud data of the unmanned truck 21 onto a target plane (YOZ plane) to obtain target point cloud data, and performs line fitting processing based on the target point cloud data to obtain a fitted straight line characterizing the position of the unmanned truck 21 in the YOZ plane. The obtained fitted straight line is specifically the diagonal of the top-view perspective of the unmanned truck 21 projected onto the YOZ plane, which characterizes the direction, position, and other positional states of the unmanned truck 21 in the YOZ plane. A target straight line characterizing the target direction (i.e., the direction of travel) and target position (i.e., the charging / parking position) is also pre-defined in the YOZ plane; the target straight line is represented by the diagonal of the top-view perspective of the charging / parking position projected onto the YOZ plane. By comparing the fitted straight line with the target straight line, the positioning results of the unmanned truck 21's direction and position can be obtained. Finally, by comparing the positioning results of the unmanned truck 21 with the predetermined charging and parking location, it can be determined whether the current parking direction and position of the unmanned truck 21 are reasonable and whether they meet the positioning requirements of the charging scenario. If they do not meet the requirements, the position status of the unmanned truck 21 can be further adjusted to enable normal charging.
[0057] Figure 3 This illustrates the process of obtaining the positioning result of the vehicle under test in one embodiment, with reference to... Figure 3 As shown, in one embodiment, the target plane is established based on a vehicle length coordinate axis extending parallel to the target direction and a vehicle width coordinate axis perpendicular to the vehicle length coordinate axis; obtaining the positioning result of the vehicle under test specifically includes:
[0058] Step S310: Based on the slope of the fitted straight line and the slope of the target straight line, obtain the angle between the length direction of the vehicle under test and the target direction.
[0059] The fitted line is the diagonal of the vehicle under test projected onto the target plane, and the target plane is established based on the vehicle length and width coordinate axes. Therefore, the slope of the fitted line can express the vehicle length direction. The slope of the target line is the ideal target direction.
[0060] Step S320: Based on the included angle, obtain the positioning result of the vehicle under test based on the target direction.
[0061] The angle between the length direction of the vehicle under test and the target direction represents the deviation angle of the length direction of the vehicle under test relative to the target direction, thereby determining the orientation positioning result of the vehicle under test.
[0062] Step S320 specifically includes: Step S320a, when the included angle exceeds the set angle threshold, obtaining the positioning result of the vehicle under test deviating from the target direction; Step S320b, when the included angle is less than the set angle threshold, obtaining the positioning result of the vehicle under test matching the target direction.
[0063] For example, if the set angle threshold is 2°, then if the included angle exceeds 2°, it is determined that the vehicle under test deviates from the target direction; otherwise, it is determined that the vehicle under test matches the target direction.
[0064] Of course, the angle threshold can be adjusted as needed depending on the positioning requirements of different scenarios, and is not limited to the examples above.
[0065] Figure 4 This diagram illustrates the alignment of the fitted line and the target line in one embodiment. Figure 4 As shown, taking the above-mentioned unmanned truck charging scenario as an example, the vehicle length coordinate axis is the Y-axis, the vehicle width coordinate axis is the Z-axis, and the target plane is the YOZ plane. The target straight line 410 is pre-calibrated, and the fitted straight line 420 is estimated. By comparing the slope of the fitted straight line 420 with the slope of the target straight line 410, it can be determined whether the unmanned truck deviates from the target direction, that is, whether it is parked crookedly.
[0066] Furthermore, continue to refer to Figure 3 As shown, after obtaining the positioning result of the vehicle under test deviating from the target direction, the vehicle positioning method further includes: step S330, generating a control command to adjust the vehicle under test to match the target direction based on the included angle and angle threshold.
[0067] Charging is impossible when a vehicle is parked crookedly, so its orientation needs to be adjusted. Specifically, the included angle is subtracted from an angle threshold to obtain the angle to be adjusted, and a control command is generated based on the angle to guide the vehicle under test to adjust to match the target orientation along its length.
[0068] Figure 5 This illustrates the process of obtaining the positioning result of the vehicle under test in another embodiment, combined with Figure 3 and Figure 5 As shown, when the vehicle under test matches the target direction, the positioning result of the vehicle under test also includes:
[0069] Step S540: Based on the linear equation of the fitted straight line, obtain the vehicle length coordinate value based on a vehicle width coordinate value; wherein, the vehicle width coordinate value is the coordinate value of a reference point on the target straight line on the vehicle width coordinate axis.
[0070] If the direction of the vehicle under test meets the requirements, then further determine whether the position of the vehicle under test meets the requirements. This can be combined with... Figure 4 As shown, the vehicle width coordinate value z1 is the coordinate value of a reference point 410' on the target straight line 410 on the Z-axis; by substituting the vehicle width coordinate value z1 into the linear equation of the fitted straight line 420, the vehicle length coordinate value y2 can be obtained.
[0071] Step S550: Based on the difference between the vehicle length coordinate value and the coordinate value of the reference point on the vehicle length coordinate axis, obtain the positioning result of the vehicle under test based on the target position.
[0072] Continue to combine Figure 4 As shown, the coordinate value of reference point 410' on the Y-axis is y1; the difference between the vehicle length coordinate value y2 and the coordinate value y1 of reference point 410' represents the deviation distance of the position of the vehicle under test relative to the target position, thereby determining the position positioning result of the vehicle under test.
[0073] Step S550 specifically includes: Step S550a, when the difference exceeds the set distance threshold, the positioning result of the vehicle under test deviating from the target position is obtained; in addition, when the difference is less than the set distance threshold, the positioning result of the vehicle under test matching the target position can be obtained.
[0074] The specific value of the distance threshold can be set according to different positioning scenarios.
[0075] Furthermore, continue to refer to Figure 5 As shown, after obtaining the positioning result of the vehicle under test deviating from the target position, the vehicle positioning method further includes: step S560, generating a control command to adjust the vehicle under test to the matching target position based on the difference and distance threshold.
[0076] Charging is impossible if the vehicle deviates from the target position, so its position needs to be adjusted. Specifically, a distance threshold can be subtracted from the difference to obtain the distance to be adjusted, and a control command can be generated based on the distance to be adjusted to guide the vehicle under test to adjust its position to match the target position.
[0077] The vehicle positioning methods based on LiDAR in the above embodiments collect point cloud data around the target location using LiDAR, and extract the point cloud data of the vehicle to be tested from it; by projecting the point cloud data of the vehicle to be tested onto the target plane, a fitting straight line representing the vehicle's position state is obtained using the target point cloud data; thus, based on the fitting straight line and the target straight line representing the target direction and target position, the positioning result of the vehicle's direction and position is obtained; the above positioning algorithm based on LiDAR to estimate the vehicle's position state can efficiently and accurately obtain the vehicle's positioning result, and the positioning accuracy can meet the requirements of the scenario. Therefore, when applied to the unmanned truck charging scenario, it can quickly guide the unmanned truck to accurately park at the charging parking position of the charging station.
[0078] This invention also provides a vehicle positioning device based on LiDAR, which can be used to implement the LiDAR-based vehicle positioning method described in any of the above embodiments. The features and principles of the vehicle positioning methods described in any of the above embodiments can be applied to the following vehicle positioning device embodiments. In the following vehicle positioning device embodiments, the already explained features and principles of vehicle positioning will not be repeated.
[0079] Figure 6 This diagram illustrates the main modules of a vehicle positioning device based on lidar in one embodiment, with reference to... Figure 6 As shown, in one embodiment, the vehicle positioning device 600 based on lidar includes: a point cloud data extraction module 610, used to extract point cloud data of the vehicle under test from the point cloud data collected by lidar; a target data acquisition module 620, used to project the point cloud data of the vehicle under test onto a target plane to obtain target point cloud data; a straight line equation fitting module 630, used to perform straight line fitting processing on the target point cloud data to obtain a fitted straight line characterizing the position state of the vehicle under test in the target plane; and a positioning result determination module 640, used to obtain the positioning result of the vehicle under test based on the fitted straight line and the target straight line characterizing the target direction and target position in the target plane.
[0080] Furthermore, the vehicle positioning device 600 based on lidar may also include modules that implement other process steps of the above-described embodiments of the vehicle positioning method based on lidar. The specific principles of each module can be referred to the descriptions of the above-described embodiments of the vehicle positioning method, and will not be repeated here.
[0081] The vehicle positioning device based on lidar of the present invention can collect point cloud data around the target location using lidar and extract the point cloud data of the vehicle under test from it; by projecting the point cloud data of the vehicle under test onto the target plane, a fitting straight line representing the vehicle's position state is obtained by fitting the target point cloud data; thus, based on the fitting straight line and the target straight line representing the target direction and target position, the positioning results of the direction and position of the vehicle under test can be obtained efficiently and accurately, and the positioning accuracy can meet the requirements of the scenario. When applied to the unmanned truck charging scenario, it can quickly guide the unmanned truck to accurately stop at the charging parking position of the charging station.
[0082] This invention also provides an electronic device, including a processor and a memory, wherein the memory stores executable instructions, and when the executable instructions are executed by the processor, the vehicle positioning method based on lidar described in any of the above embodiments is implemented.
[0083] The electronic device of the present invention can collect point cloud data around the target location using lidar and extract the point cloud data of the vehicle under test from it; by projecting the point cloud data of the vehicle under test onto the target plane, a fitting straight line representing the vehicle's position state is obtained by fitting the target point cloud data; thus, based on the fitting straight line and the target straight line representing the target direction and target position, the positioning results of the direction and position of the vehicle under test can be obtained efficiently and accurately, and the positioning accuracy can meet the requirements of the scenario. When applied to the unmanned truck charging scenario, it can quickly guide the unmanned truck to accurately stop at the charging parking position of the charging station.
[0084] Figure 7 This is a schematic diagram of the structure of the electronic device in an embodiment of the present invention. It should be understood that... Figure 7 The modules are merely shown schematically. These modules can be virtual software modules or actual hardware modules. The merging, splitting, and addition of other modules are all within the scope of protection of this invention.
[0085] like Figure 7 As shown, the electronic device 700 is presented in the form of a general-purpose computing device. The components of the electronic device 700 include, but are not limited to: at least one processing unit 710, at least one storage unit 720, a bus 730 connecting different platform components (including storage unit 720 and processing unit 710), a display unit 740, etc.
[0086] The storage unit 720 stores program code, which can be executed by the processing unit 710, causing the processing unit 710 to perform the steps of the LiDAR-based vehicle localization method described in any of the above embodiments. For example, the processing unit 710 can perform actions such as... Figure 1 The steps are shown.
[0087] Storage unit 720 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 7201 and / or cache memory 7202, and may further include a read-only memory (ROM) 7203.
[0088] The storage unit 720 may also include a program / utility 7204 having one or more program modules 7205, such program modules 7205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0089] Bus 730 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.
[0090] Electronic device 700 can also communicate with one or more external devices, such as keyboards, pointing devices, Bluetooth devices, etc. These external devices enable users to interact and communicate with electronic device 700. Electronic device 700 can also communicate with one or more other computing devices, including routers and modems. This communication can be performed via input / output (I / O) interface 750. Furthermore, electronic device 700 can communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via network adapter 760. Network adapter 760 can communicate with other modules of electronic device 700 via bus 730. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.
[0091] This invention also provides a computer-readable storage medium for storing a program that, when executed, implements the LiDAR-based vehicle positioning method described in any of the above embodiments. In some possible implementations, various aspects of this invention can also be implemented as a program product comprising program code that, when run on a terminal device, causes the terminal device to execute the LiDAR-based vehicle positioning method described in any of the above embodiments.
[0092] When executed by a processor, the storage medium of this invention can collect point cloud data around a target location using a lidar, and extract the point cloud data of the vehicle under test from it. By projecting the point cloud data of the vehicle under test onto a target plane, a fitted straight line representing the vehicle's position state is obtained using the target point cloud data. Thus, based on the fitted straight line and the target straight line representing the target direction and target position, the positioning results of the direction and position of the vehicle under test can be obtained efficiently and accurately. The positioning accuracy can meet the requirements of the scenario, and when applied to the charging scenario of unmanned trucks, it can quickly guide unmanned trucks to accurately stop at the charging parking position of the charging station.
[0093] The storage medium may be a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the storage medium of the present invention is not limited thereto, and may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0094] The storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media include, but are not limited to: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0095] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable signal medium may also be any readable medium other than a readable storage medium, capable of transmitting, propagating, or transmitting a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the readable signal medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.
[0096] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device, for example, via the Internet using an Internet service provider.
[0097] The above description, in conjunction with specific preferred embodiments, provides a further detailed explanation of the present invention. It should not be construed that the specific implementation of the present invention is limited to these descriptions. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such modifications and substitutions should be considered within the scope of protection of the present invention.
Claims
1. A vehicle positioning method based on lidar, characterized in that, include: The point cloud data of the vehicle under test is extracted from the point cloud data around the target location collected by the lidar; wherein, in the unmanned truck charging scenario, the lidar is installed on the top of the charging station. The point cloud data of the vehicle under test is projected onto the target plane to obtain the target point cloud data; The target point cloud data is subjected to linear fitting processing to obtain a fitted straight line characterizing the position state of the vehicle under test in the target plane. The positioning result of the vehicle under test is obtained based on the fitted straight line and the target straight line in the target plane that represents the target direction and the target position. The target plane is established based on a vehicle length coordinate axis extending parallel to the target direction and a vehicle width coordinate axis perpendicular to the vehicle length coordinate axis. Obtaining the positioning result of the vehicle under test includes: obtaining the angle between the vehicle length direction of the vehicle under test and the target direction based on the slope of the fitted straight line and the slope of the target straight line; and obtaining the positioning result of the vehicle under test based on the target direction based on the angle. Specifically, when the included angle is less than a set angle threshold, the positioning result of the vehicle under test matching the target direction is obtained; obtaining the positioning result of the vehicle under test further includes: obtaining the vehicle length coordinate value based on a vehicle width coordinate value according to the linear equation of the fitted straight line; wherein the vehicle width coordinate value is the coordinate value of a reference point on the target straight line on the vehicle width coordinate axis; and obtaining the positioning result of the vehicle under test based on the target position according to the difference between the vehicle length coordinate value and the coordinate value of the reference point on the vehicle length coordinate axis.
2. The vehicle positioning method as described in claim 1, characterized in that, When the included angle exceeds the set angle threshold, the positioning result of the vehicle under test deviating from the target direction is obtained; The vehicle positioning method also includes: Based on the included angle and the angle threshold, a control command is generated to adjust the vehicle under test to match the target direction.
3. The vehicle positioning method as described in claim 1, characterized in that, When the difference exceeds the set distance threshold, the positioning result of the vehicle under test deviating from the target position is obtained; The vehicle positioning method also includes: Based on the difference and the distance threshold, a control command is generated to adjust the vehicle under test to match the target position.
4. The vehicle positioning method as described in claim 1, characterized in that, The extraction of point cloud data of the vehicle under test includes: Based on the size data of the vehicle under test, point cloud data within the spatial range corresponding to the size data is extracted from the point cloud data collected by the lidar and used as the point cloud data of the vehicle under test.
5. The vehicle positioning method as described in claim 1, characterized in that, The step of projecting the point cloud data of the vehicle under test onto the target plane includes: The point cloud data of the vehicle under test is projected onto the target plane based on the transformation matrix between the coordinate system of the lidar and the reference coordinate system constructed based on the target plane.
6. The vehicle positioning method as described in claim 1, characterized in that, After projecting the point cloud data of the vehicle under test onto the target plane, the method further includes: The point cloud data projected onto the target plane is downsampled to obtain the target point cloud data.
7. The vehicle positioning method as described in claim 1, characterized in that, The process of performing linear fitting on the target point cloud data includes: Based on the random sampling consensus algorithm, the target point cloud data is subjected to linear fitting processing.
8. A vehicle positioning device based on lidar, characterized in that, include: The point cloud data extraction module is used to extract the point cloud data of the vehicle under test from the point cloud data around the target location collected by the LiDAR; wherein, in the unmanned truck charging scenario, the LiDAR is installed on the top of the charging station. The target data acquisition module is used to project the point cloud data of the vehicle under test onto the target plane to obtain the target point cloud data; The linear equation fitting module is used to perform linear fitting processing on the target point cloud data to obtain a fitted straight line that characterizes the position state of the vehicle under test in the target plane. The positioning result determination module is used to obtain the positioning result of the vehicle under test based on the fitted straight line and the target straight line in the target plane that represents the target direction and the target position; The target plane is established based on a vehicle length coordinate axis extending parallel to the target direction and a vehicle width coordinate axis perpendicular to the vehicle length coordinate axis. The positioning result determination module obtains the positioning result of the vehicle under test, including: obtaining the angle between the vehicle length direction of the vehicle under test and the target direction based on the slope of the fitted straight line and the slope of the target straight line; and obtaining the positioning result of the vehicle under test based on the target direction based on the angle. Specifically, when the included angle is less than a set angle threshold, a positioning result of the vehicle under test matching the target direction is obtained; the positioning result determination module obtains the positioning result of the vehicle under test, which further includes: obtaining a vehicle length coordinate value based on a vehicle width coordinate value according to the linear equation of the fitted straight line; wherein the vehicle width coordinate value is the coordinate value of a reference point on the target straight line on the vehicle width coordinate axis; and obtaining a positioning result of the vehicle under test based on the target position according to the difference between the vehicle length coordinate value and the coordinate value of the reference point on the vehicle length coordinate axis.
9. An electronic device, characterized in that, include: processor; A memory, wherein executable instructions are stored; When the executable instructions are executed by the processor, they implement the vehicle positioning method based on lidar as described in any one of claims 1-7.
10. A computer-readable storage medium for storing a program, characterized in that, When the program is executed by the processor, it implements the vehicle positioning method based on lidar as described in any one of claims 1-7.
Citation Information
Patent Citations
Calculation method and device for included angle of vehicle, computer equipment and storage medium
CN113917479A