Vehicle battery positioning method and system, electronic equipment and medium
Through the laser radar scanning of the battery box, point cloud coordinates and linear fitting technology, the precise positioning of the battery box is achieved, solving the problems of low battery swap efficiency and high environmental requirements in the existing technology, and improving the battery swap efficiency and positioning accuracy.
Patent Information
- Application Number
- CN202311809239.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2025-06-27
AI Technical Summary
In the process of electric truck battery replacement, the parking and environment of battery replacement are high and the battery replacement efficiency is low.
Lidar is used to scan the battery box to obtain scanning data, and through point cloud coordinates, line segment screening and linear fitting, the distance and skew angle between the battery box and the lidar are obtained to achieve accurate positioning.
It improves the efficiency of vehicle battery replacement, reduces parking and environment requirements, and obtains high positioning accuracy.
Smart Images

Figure CN120214741A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of battery swapping, and relates to a method for positioning a vehicle battery, in particular to a method, system, electronic device and medium for positioning a vehicle battery. Background Art
[0002] Currently, in the field of electric truck battery swapping, the precise positioning of battery boxes in a battery swapping station mainly adopts the solutions of laser ranging sensors and visual detection. The laser sensor solution mainly installs multiple laser sensors in the battery swapping channel to respectively detect the sides of the battery box of the battery swapping vehicle, and obtain the positioning dimensions of the driving direction, left and right directions, and skew angle of the battery box; the visual detection solution mainly installs a 3D vision camera at the top of the battery swapping channel to directly detect the top of the battery box of the battery swapping vehicle. By using the 3D vision photography solution, the positioning dimensions of the driving direction, left and right directions, and skew angle of the battery box can be directly obtained.
[0003] This positioning method of the laser sensor solution has high requirements for the driver's vehicle parking, low positioning accuracy, low reliability in later operation, prolongs the battery swapping time of a single vehicle, and reduces the operation efficiency of the battery swapping station. This positioning method of the visual detection solution has lower requirements for the driver's parking than the laser sensor solution and higher accuracy. However, because it uses an optical positioning method, it has high requirements for the on-site light, temperature, dust and other environments, general reliability in later operation, and relatively high costs. Summary of the Invention
[0004] In view of the above-mentioned disadvantages of the prior art, the purpose of this application is to provide a method, system, electronic device and medium for positioning a vehicle battery, which is used to solve the problems of high requirements for battery swapping parking and environment and low battery swapping efficiency in the prior art.
[0005] In a first aspect, this application provides a method for positioning a vehicle battery, including: scanning a battery box with a lidar to obtain scan data; processing the scan data to obtain point cloud coordinates; obtaining line segments according to the point cloud coordinates and screening the line segments to obtain the screened line segments; performing a straight line fitting process on the point cloud coordinates included in the screened line segments to obtain a fitted straight line; and obtaining the distance and skew angle between the battery box and the lidar by using the fitted straight line.
[0006] In this application, a lidar is used to scan the battery box to obtain scan data. Based on the scan data, point cloud coordinates and line segments composed of the point cloud coordinates are obtained, and then a fitted line is obtained. The distance and skew angle between the battery box and the lidar are obtained using the fitted line, thereby completing the positioning of the battery box. This vehicle battery positioning method uses a lidar to complete the positioning of the battery box, has low requirements for parking and the environment, uses the fitted line to obtain the distance and skew angle between the battery box and the lidar, and has high positioning accuracy, improving the efficiency of vehicle battery swapping.
[0007] In one implementation of the first aspect, using a lidar to scan the battery box includes: using the lidar to perform line scanning on the side of the battery box to obtain line scan data; using the lidar to perform point cloud scanning on the battery box environment to obtain point cloud scan data; using the line scan data and the point cloud scan data to obtain the scan data.
[0008] In one implementation of the first aspect, processing the scan data to obtain point cloud coordinates includes: using trigonometric functions to calculate the distance and angle information in the scan data to obtain the point cloud coordinates.
[0009] In one implementation of the first aspect, obtaining line segments based on the point cloud coordinates and screening the line segments to obtain the screened line segments includes: obtaining the line segments and the breakpoints of the line segments based on the point cloud coordinates; obtaining adjacent point coordinates based on the breakpoints of the line segments; determining whether the distance between the adjacent point coordinates is greater than a first threshold. If so, confirming that the line segment is a continuous line segment; if not, confirming that the line segment is a discontinuous line segment; using a second threshold to screen the continuous line segments to obtain the screened line segments.
[0010] In one implementation of the first aspect, performing a straight line fitting process on the point cloud coordinates included in the screened line segments includes: using the least squares method to perform a straight line fitting process on the screened line segments to obtain the fitted line.
[0011] In one implementation of the first aspect, using the fitted line to obtain the distance and skew angle between the battery box and the lidar includes: using the fitted line to obtain the center point coordinates, and the distance between the battery box and the lidar is represented using the center point coordinates; using the angle between the fitted line and the abscissa to obtain the skew angle.
[0012] In one implementation of the first aspect, the vehicle battery positioning method further includes: determining whether the battery box is aligned based on the distance and skew angle between the battery box and the lidar. If so, performing a battery swapping operation; if not, moving the battery swapping robot to complete the alignment.
[0013] Second aspect, the present application provides a vehicle battery positioning system, the vehicle battery positioning system includes: a data acquisition module, configured to scan a battery box using a lidar to acquire scan data; a coordinate acquisition module, configured to process the scan data to acquire point cloud coordinates; a screening and processing module, configured to acquire line segments based on the point cloud coordinates and screen the line segments to acquire screened line segments; a straight line fitting module, configured to perform a straight line fitting process on the point cloud coordinates included in the screened line segments to acquire a fitted straight line; a position acquisition module, configured to use the fitted straight line to acquire the distance and skew angle between the battery box and the lidar.
[0014] Third aspect, the present application provides an electronic device, the electronic device includes: a memory, configured to store a computer program; a processor, the processor is configured to execute the computer program stored in the memory, so that the electronic device executes the vehicle battery positioning method according to any one of the first aspect.
[0015] Fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the vehicle battery positioning method according to any one of the first aspect. Description of the Drawings
[0016] Figure 1 Shown is a schematic diagram of an application scenario of the vehicle battery positioning device described in the present application.
[0017] Figure 2 Shown is a schematic flowchart of the vehicle battery positioning method described in an embodiment of the present application.
[0018] Figure 3 Shown is a schematic flowchart of the vehicle battery positioning method described in an embodiment of the present application.
[0019] Figure 4 Shown is a schematic flowchart of the vehicle battery positioning method described in an embodiment of the present application.
[0020] Figure 5 Shown is a schematic flowchart of the vehicle battery positioning method described in an embodiment of the present application.
[0021] Figure 6 Shown is a schematic structural diagram of the vehicle battery positioning system described in an embodiment of the present application.
[0022] Figure 7 Shown is a schematic structural diagram of the electronic device described in an embodiment of the present application.
[0023] Element Number Description
[0024] 1 Vehicle Battery Positioning Device
[0025] 11 Lidar device
[0026] 12 Processor
[0027] 13 Battery swapping robot
[0028] 100 Vehicle battery positioning system
[0029] 110 Data acquisition module
[0030] 120 Coordinate acquisition module
[0031] 130 Screening and processing module
[0032] 140 Straight line fitting module
[0033] 150 Position acquisition module
[0034] 700 Electronic device
[0035] 710 Memory
[0036] 720 Processor
[0037] 730 Display
[0038] Steps S11 - S16
[0039] Steps S111 - S113
[0040] Steps S131 - S134
[0041] Steps S151 - S152 Specific implementation manners
[0042] The following uses specific specific examples to illustrate the implementation manners of the present application. Those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in this specification. The present application can also be implemented or applied through other different specific implementation manners. Various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that, without conflict, the following embodiments and the features in the embodiments can be combined with each other.
[0043] It should be noted that the drawings provided in the following embodiments only illustrate the basic concept of the present application in a schematic manner. Therefore, only the components related to the present application are shown in the drawings, rather than being drawn according to the number, shape, and size of the components in actual implementation. The types, quantities, and proportions of the components in actual implementation can be arbitrarily changed, and the component layout type may also be more complex.
[0044] The existing methods for positioning vehicle batteries mainly include two types: the laser sensor solution and the vision detection solution. Among them, the technical disadvantages of the laser sensor solution include: poor positioning accuracy. The laser sensor only measures the distances at several points on the battery box. Due to the machining errors on the battery surface and the small amount of sampled data, the accuracy is relatively poor. It is not driver-friendly for parking. Since the laser sensor is installed on the battery swapping robot or other mobile devices, there is a certain detection range limitation in the driving direction. The driver needs to park the vehicle in the detection range of the laser sensor in advance. Otherwise, the laser sensor may not detect the battery of the battery swapping vehicle. Due to the small detection range, the parking requirements for the driver are high, and multiple parking operations are needed, which affects the driver's battery swapping experience. Low reliability. Because the number of points detected by the laser sensor is small, the positioning reliability will become worse and worse after the vehicle wears out. Long positioning time. When the driver parks the vehicle in the detection range of the laser sensor, the positioning dimensions of the driving direction, left-right direction, and skew angle of the battery box cannot be obtained immediately. The robot or other mobile devices need to first move the laser sensor in the driving direction to detect the distance of the battery end face, which increases the measurement time and the positioning time is relatively long. Low battery swapping efficiency. Due to the above reasons, the single-vehicle battery positioning time is relatively long, which prolongs the battery swapping time and correspondingly reduces the maximum number of service trips of the battery swapping station in 24 hours. The technical disadvantages of the vision detection solution include: high cost. The cost of the 3D vision detection solution is 4 to 6 times that of the laser sensor solution. High environmental requirements. Since it uses an optical positioning method and the working temperature is above 0°C, it has high requirements for the on-site light, temperature, dust, etc. The application environment of the battery swapping truck is relatively harsh, with a large amount of dust, working around the clock, and the lowest working temperature at -20°C, resulting in high later maintenance costs, and the reliability will become worse and worse with the use time, affecting the battery swapping efficiency.
[0045] At least for the above problems, the embodiment of the present application provides a method for positioning a vehicle battery. The method for positioning a vehicle battery includes: scanning a battery box using a lidar to obtain scan data; processing the scan data to obtain point cloud coordinates; obtaining line segments according to the point cloud coordinates and screening the line segments to obtain the screened line segments; performing a straight line fitting process on the point cloud coordinates included in the screened line segments to obtain a fitted straight line; and obtaining the distance and skew angle between the battery box and the lidar using the fitted straight line.
[0046] In the embodiments of the present application, a lidar is used to scan the battery box to obtain scan data. Based on the scan data, point cloud coordinates and line segments formed by the point cloud coordinates are obtained, and then a fitted straight line is obtained. The distance and skew angle between the battery box and the lidar are obtained by using the fitted straight line, thereby completing the positioning of the battery box. This vehicle battery positioning method uses a lidar to complete the positioning of the battery box, has low requirements for parking and the environment, obtains the distance and skew angle between the battery box and the lidar by using the fitted straight line, and has high positioning accuracy, improving the efficiency of vehicle battery swapping.
[0047] Figure 1 It shows a schematic diagram of an application scenario of the vehicle battery positioning device described in the present application. The vehicle battery positioning device 1 can be used to implement the vehicle battery positioning method provided in the embodiments of the present application, but the application scenarios of the vehicle battery positioning method provided in the embodiments of the present application are not limited to Figure 1 the vehicle battery positioning device 1 shown. As Figure 1 shown, the vehicle battery positioning device 1 includes a lidar device 11, a processor 12, and a battery swapping robot 13. The vehicle battery positioning method provided in the embodiments of the present application can be applied to the processor 12.
[0048] Among them, Figure 1 the processor 12 can be a single processor or a processor cluster or a cloud computing center composed of multiple processors, etc., and there is no specific limitation here. Although Figure 1 only one lidar device 11, one processor 12, and one battery swapping robot 13 are shown, it should be understood that Figure 1 the examples are only for understanding the solution, and the actual number of lidar devices 11 and processors 12 should be flexibly determined according to the actual situation.
[0049] Next, the technical solutions in the embodiments of the present application will be described in detail with reference to the accompanying drawings in the embodiments of the present application.
[0050] The following embodiments of the present application provide a vehicle battery positioning method, which can be implemented, for example, by Figure 1 the processor 12 shown. Figure 2 It shows a flowchart of the vehicle battery positioning method described in the embodiments of the present application. As Figure 2 shown, the vehicle battery positioning method includes the following steps S11 to S15.
[0051] Step S11, using a lidar to scan the battery box to obtain scan data. Optionally, the lidar is a single-line lidar. When using a single-line lidar to scan the battery box of a battery swapping vehicle, in order to reduce the interference of the external environment and ensure the accuracy of data measurement, its installation height is at least 2.5 meters from the ground, and the installation position is preferably set inside the awning of the battery swapping channel.
[0052] Step S12: Process the scanned data to obtain point cloud coordinates.
[0053] Step S13: Obtain line segments based on the point cloud coordinates and filter the line segments to obtain the filtered line segments.
[0054] Step S14: Perform linear fitting on the point cloud coordinates included in the filtered line segments to obtain a fitted line.
[0055] Step S15: Use the fitted line to obtain the distance and skew angle between the battery box and the lidar.
[0056] In the embodiment of the present application, the battery box is scanned by a lidar to obtain scanned data, point cloud coordinates and line segments formed by the point cloud coordinates are obtained according to the scanned data, and then a fitted line is obtained. The distance and skew angle between the battery box and the lidar are obtained by using the fitted line, thereby completing the positioning of the battery box. This vehicle battery positioning method uses a lidar to complete the positioning of the battery box, has low requirements for parking and the environment, uses the fitted line to obtain the distance and skew angle between the battery box and the lidar, and has high positioning accuracy, improving the efficiency of vehicle battery swapping.
[0057] Figure 3 It shows a schematic flow chart of the vehicle battery positioning method described in the embodiment of the present application. As Figure 3 shown, the step S11 includes the following steps S111 to S113.
[0058] Step S111: Use a lidar to perform line scanning on the side of the battery box to obtain line scan data.
[0059] Step S112: Use a lidar to perform point cloud scanning on the battery box environment to obtain point cloud scan data.
[0060] Step S113: Use the line scan data and the point cloud scan data to obtain the scanned data.
[0061] In some possible implementation manners, a single-line lidar is used to perform line laser scanning on the side of the battery box of the battery swapping vehicle, measure the horizontal distance and angle of each point on the side detection line of the battery box from the lidar, and send the detected line scan data to the control system of the battery swapping station. The single-line lidar performs point cloud scanning on the battery swapping box environment to obtain the shape and position information of the detected object, and uploads the collected point cloud scan data and the line scan data as the scanned data to the computer system. Among them, the collected point cloud scan data includes distance d and angle α information, and the position of the single-line lidar is the coordinate origin.
[0062] In one embodiment of the present application, step S12 includes: calculating the distance and angle information in the scan data using trigonometric functions to obtain the point cloud coordinates.
[0063] Optionally, calculate the Cartesian coordinates x and y of each point according to the distance d and angle α information in the scan data. The above calculation formula is:
[0064]
[0065] Figure 4 It shows a schematic flowchart of the vehicle battery positioning method described in the embodiments of the present application. As Figure 4 shown, step S13 includes the following steps S131 to S134.
[0066] Step S131, obtain the line segment and the break point of the line segment according to the point cloud coordinates.
[0067] Step S132, obtain the adjacent point coordinates according to the break point of the line segment.
[0068] Step S133, determine whether the distance between the adjacent point coordinates is greater than a first threshold. If so, confirm that the line segment is a continuous line segment; if not, confirm that the line segment is a discontinuous line segment.
[0069] Step S134, screen the continuous line segments using a second threshold to obtain the screened line segments.
[0070] In some possible implementation manners, obtain the line segment and the break point of the line segment according to the point cloud coordinates. Assume that the adjacent point coordinate formula is (X n , Y n ) and (X n+1 , Y n+1 ). The horizontal and vertical coordinate differences are respectively (ΔX = X n+1 - X n ) and (ΔY = Y n+1 - Y n ). Among them, the calculation formula for break point identification is:
[0071]
[0072] Judge whether the value of the above break point identification calculation formula is greater than a first threshold. If so, confirm that the line segment is a continuous line segment; if not, confirm that the line segment is a discontinuous line segment.
[0073] According to the break points of the line segments, determine all the continuous line segments in the scan data, and then calculate the lengths of all the continuous line segments. Assume that the start and end coordinates of the line segment are (X a , Y a ) and (Xb , Y b ), the calculation formula for the line segment length L is:
[0074]
[0075] The continuous line segments are screened using the second threshold to obtain the screened line segments. Specifically, the calculated line segment length and position information are compared with the preset second threshold, i.e., the width and area of the battery box, and the line segments that do not meet the conditions are filtered out to obtain the screened line segments.
[0076] In an embodiment of the present application, step S14 includes: performing a linear fitting process on the screened line segments using the least squares method to obtain the fitting line. Among them, the calculation formula for performing a linear fitting process on the screened line segments using the least squares method is:
[0077] Y = mX + b,
[0078] where m is the slope of the line and b is the intercept.
[0079] In some possible implementation manners, the least squares method confirms the best fitting line by minimizing the sum of the squared residuals between the observed values and the fitting line. Among them, the point cloud data included in the battery box line segment has n points (xi, yi), (0 ≤ i ≤ n). Assuming the fitting line is Y = mX + b, then for each point xi, the fitting line is Yi = mXi + b. The calculation formula for the objective function is:
[0080]
[0081] According to the requirements of the least squares method for the fitting line, when the value of F(x) is the smallest, the calculated m and b are the fitting lines that meet the requirements.
[0082] Figure 5 It shows a schematic flow diagram of the vehicle battery positioning method described in the embodiment of the present application. As Figure 5 shown, the step S15 includes the following steps S151 to S152.
[0083] Step S151, obtaining the center point coordinates using the fitting line, and the distance between the battery box and the lidar is represented using the center point coordinates.
[0084] Step S152, obtaining the skew angle using the angle between the fitting line and the abscissa.
[0085] In some possible implementation manners, the central point coordinates are obtained by using the fitted straight line, and the central point coordinates are the distances of the center of the battery box from the lidar in the X and Y directions. If the slope of the fitted straight line is m and the intercept is b, the calculation formula for the central point coordinates is as follows:
[0086]
[0087]
[0088] The calculation formula for the angle between the fitted straight line and the abscissa x is as follows:
[0089] θ = arctan(m).
[0090] In an embodiment of the present application, the vehicle battery positioning method further includes step S16.
[0091] Step S16: Determine whether the battery box is aligned according to the distance and skew angle between the battery box and the lidar. If so, perform a battery swapping operation; if not, move the battery swapping robot to complete the alignment. Optionally, send the central point coordinates and skew angle between the battery box and the lidar to a computer to determine whether the battery box is aligned. If so, directly perform a battery swapping operation; if not, guide the robot to accurately position to the position of the battery box.
[0092] In some possible implementation manners, the battery swapping robot is provided with four laser sensors. The controller of the battery swapping robot determines whether the battery swapping robot is completely aligned with the battery box in the X direction, Y direction, and θ angle according to the distance information of the four laser sensors. When the middle two laser sensors detect the distance information of the battery box and the error of the distance information is within 10 cm, and at the same time the left and right two laser sensors do not detect the distance information, it is confirmed that the battery swapping robot is aligned with the position of the battery box, and the subsequent battery swapping operation can be performed.
[0093] When it is confirmed that the battery swapping robot is not aligned with the battery box, the robot controller determines the moving direction of the robot based on the distance information of the four laser sensors. If the distance information of the battery box is detected by the left or right laser sensor, it indicates that the X direction is not aligned. The robot controller guides the battery swapping robot to move in the opposite direction until the left or right laser sensor no longer detects the distance information. Similarly, if the distance information of the battery box detected by the two middle laser sensors is not within the allowable error range, it indicates that the θ angle is not aligned. The robot controller guides the battery swapping robot to rotate until the distance information detected by the two middle laser sensors is within the error range. After the angle between the battery swapping robot and the battery box is aligned, the robot controller determines the distance information of the two middle laser sensors. If it is less than or greater than the left and right direction position coordinates sent by the battery swapping station computer system, it indicates that the Y direction is not aligned. The robot controller guides the battery swapping robot to move forward and backward until the distance information of the two laser sensors is aligned with the left and right direction position coordinates sent by the computer system. When the X, Y, and θ of the battery swapping robot and the battery box are aligned, the subsequent battery swapping operation is completed.
[0094] Figure 6 It shows a schematic structural diagram of the vehicle battery positioning system described in the embodiment of the present application. As Figure 6 shown, the vehicle battery positioning system 100 includes a data acquisition module 110, a coordinate acquisition module 120, a screening and processing module 130, a straight line fitting module 140, and a position acquisition module 150.
[0095] The data acquisition module 110 is used to scan the battery box with a lidar to obtain scan data.
[0096] The coordinate acquisition module 120 is used to process the scan data to obtain point cloud coordinates.
[0097] The screening and processing module 130 is used to obtain line segments based on the point cloud coordinates and screen the line segments to obtain the screened line segments.
[0098] The straight line fitting module 140 is used to perform straight line fitting processing on the point cloud coordinates included in the screened line segments to obtain a fitting straight line.
[0099] The position acquisition module 150 is used to obtain the distance and skew angle between the battery box and the lidar using the fitting straight line.
[0100] It should be noted that the above modules 110 to 150 included in the image processing device 100 correspond one-to-one with Figure 2 the steps S11 to S15 in the image processing method shown, and will not be elaborated here.
[0101] In several embodiments provided by the present application, it should be understood that the disclosed system, apparatus or method can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of modules / units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of devices or modules or units can be in electrical, mechanical or other forms.
[0102] The modules / units described as separate components may or may not be physically separated. The components shown as modules / units may or may not be physical modules, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules / units can be selected according to actual needs to achieve the purpose of the embodiments of the present application. For example, in each embodiment of the present application, the functional modules / units can be integrated in a processing module, or each module / unit can exist physically alone, or two or more modules / units can be integrated in one module / unit.
[0103] Those of ordinary skill in the art should further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0104] The embodiments of the present application also provide an electronic device. Figure 7 The structure diagram of the electronic device 700 described in the embodiments of the present application is shown. As Figure 7 shown, in this embodiment, the electronic device 700 includes a memory 710 and a processor 720.
[0105] The memory 710 is used to store computer programs; preferably, the memory 710 includes: various media such as ROM, RAM, magnetic disks, USB flash drives, memory cards, or optical discs that can store program codes.
[0106] Specifically, the memory 710 may include a computer system-readable medium in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The electronic device 700 may further include other removable / non-removable, volatile / non-volatile computer system storage media. The memory 710 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present application.
[0107] The processor 720 is connected to the memory 710 and is configured to execute the computer program stored in the memory 710, so that the electronic device 700 performs the vehicle battery positioning method described in any embodiment of the present application.
[0108] Optionally, the processor 720 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0109] Optionally, in this embodiment, the electronic device 700 may further include a display 730. The display 730 is communicatively connected to the memory 710 and the processor 720 and is configured to display a relevant graphical user interface (GUI) interaction interface of the vehicle battery positioning method described in the embodiments of the present application.
[0110] The embodiments of the present application also provide a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, it implements the vehicle battery positioning method described in any embodiment of the present application.
[0111] An embodiment of the present application may further provide a computer program product, which includes one or more computer instructions. When the computer instructions are loaded and executed on a computing device, the processes or functions described in the embodiments of the present application are fully or partially generated. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, a computer, or a data center to another website, a computer, or a data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or a wireless manner (such as infrared, wireless, microwave, etc.).
[0112] When the computer program product is executed by a computer, the computer executes the method described in the foregoing method embodiment. The computer program product may be a software installation package. In the case where the foregoing method needs to be used, the computer program product may be downloaded and executed on the computer.
[0113] The descriptions of the processes or structures corresponding to the foregoing respective drawings have their own focuses. For parts not detailed in a certain process or structure, reference may be made to the relevant descriptions of other processes or structures.
[0114] The foregoing embodiments merely illustrate the principles and effects of the present application, rather than limiting the present application. Any person familiar with this technology may make modifications or changes to the foregoing embodiments without departing from the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by those with ordinary knowledge in the technical field to which the present application pertains without departing from the spirit and technical ideas disclosed by the present application should still be covered by the claims of the present application.
Claims
1. A vehicle battery positioning method, characterized in that, Including: Scanning the battery box using a lidar to obtain scanning data; Processing the scanning data to obtain point cloud coordinates; Obtaining line segments based on the point cloud coordinates and screening the line segments to obtain screened line segments; Performing a linear fitting process on the point cloud coordinates included in the screened line segments to obtain a fitted line; Using the fitted line to obtain the distance and skew angle between the battery box and the lidar.
2. The vehicle battery positioning method according to claim 1, wherein Scanning the battery box using a lidar includes: Performing line scanning on the side of the battery box using a lidar to obtain line scanning data; Performing point cloud scanning on the battery box environment using a lidar to obtain point cloud scanning data; Obtaining the scanning data using the line scanning data and the point cloud scanning data.
3. The vehicle battery positioning method according to claim 1, wherein, Processing the scanning data to obtain point cloud coordinates includes: Calculating the distance and angle information in the scanning data using trigonometric functions to obtain the point cloud coordinates.
4. The vehicle battery positioning method according to claim 1, wherein Obtaining line segments based on the point cloud coordinates and screening the line segments to obtain screened line segments includes: Obtaining the line segments and the breakpoints of the line segments based on the point cloud coordinates; Obtaining adjacent point coordinates based on the breakpoints of the line segments; Judging whether the distance between the adjacent point coordinates is greater than a first threshold. If so, confirming that the line segment is a continuous line segment; if not, confirming that the line segment is a discontinuous line segment; Screening the continuous line segments using a second threshold to obtain the screened line segments.
5. The vehicle battery positioning method according to claim 1, wherein, Performing a linear fitting process on the point cloud coordinates included in the screened line segments includes: Performing a linear fitting process on the screened line segments using the least squares method to obtain the fitted line.
6. The vehicle battery positioning method according to claim 1, characterized in that, Using the fitted line to obtain the distance and skew angle between the battery box and the lidar includes: Obtaining the coordinates of the center point using the fitted line, and representing the distance between the battery box and the lidar using the coordinates of the center point; Obtaining the skew angle using the angle between the fitted line and the abscissa.
7. The vehicle battery positioning method according to claim 1, wherein, Also including: Judging whether the battery box is aligned according to the distance and skew angle between the battery box and the lidar. If so, performing a battery swapping operation; if not, moving the battery swapping robot to complete the alignment.
8. A vehicle battery positioning system, characterized in that, Including: A data acquisition module for scanning the battery box using a lidar to obtain scanning data; A coordinate acquisition module for processing the scanning data to obtain point cloud coordinates; A screening processing module for obtaining line segments based on the point cloud coordinates and screening the line segments to obtain screened line segments; A linear fitting module for performing a linear fitting process on the point cloud coordinates included in the screened line segments to obtain a fitted line; A position acquisition module for using the fitted line to obtain the distance and skew angle between the battery box and the lidar.
9. An electronic device, characterized in that, The electronic device includes: A memory for storing a computer program; A processor for executing the computer program stored in the memory, so that the electronic device executes the vehicle battery positioning method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the vehicle battery positioning method according to any one of claims 1 to 7.