Battery replacement method and device for battery replacement station, terminal and readable storage medium
By setting up 3D radar at the exit of the parking lane of the battery swapping station to collect point cloud data, and performing filtering and principal component analysis, the problem of misalignment of battery swapping equipment caused by vehicle parking deviation was solved, and efficient and safe battery replacement was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU BOZHONG NEW ENERGY TECHNOLOGY CO LTD
- Filing Date
- 2026-01-26
- Publication Date
- 2026-05-12
Smart Images

Figure CN122009095A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle battery swapping technology, and more particularly to battery swapping methods, apparatus, terminals, and readable storage media for use in battery swapping stations. Background Technology
[0002] With the rapid development of the new energy vehicle industry, the power battery, as the core power source of new energy vehicles, has seen its range and charging efficiency become key factors affecting user experience. Compared with traditional charging methods, battery swapping, with its advantages of fast charging speed and no need for long waiting times, has gradually become an important part of the new energy vehicle charging system, and related technologies for battery swapping stations have been widely researched and applied.
[0003] In the layout design of existing battery swapping stations, dedicated parking lanes are typically set up to facilitate the orderly entry, parking, and battery swapping of vehicles. These lanes provide a stable and orderly environment for vehicle parking and subsequent battery swapping equipment operation. Correspondingly, the battery swapping equipment is positioned within a specific area of this parking lane. Once a vehicle is parked in the designated location, the battery swapping equipment can be activated and complete the battery swapping operation.
[0004] However, in actual battery swapping operations, the parking status of vehicles often fails to fully meet the ideal requirements for battery swapping operations. Specifically, after a user drives a vehicle into the parking lane, due to various factors such as differences in driving skills, limited visibility, and insufficient guidance signs within the lane, the actual direction of the vehicle's movement usually cannot remain parallel to the straight extension direction of the parking lane; at the same time, the vehicle's parking position is also difficult to precisely align with the center line of the parking lane, resulting in the vehicle being "parked crookedly".
[0005] The aforementioned vehicle parking deviation issues will have a series of adverse effects on subsequent battery swapping operations: On the one hand, if the vehicle's forward direction is not parallel to the direction of the channel extension, it will cause the operating reference of the battery swapping equipment to deviate from the installation reference of the vehicle's power battery, making it impossible for the equipment to accurately align the power battery disassembly and installation interfaces; on the other hand, the parking state of the vehicle off-center from the channel centerline may cause the equipment to interfere with the vehicle body during operation, which will not only damage the vehicle or equipment, but also affect the safety and stability of the battery swapping operation, and in severe cases, may even prevent the battery swapping operation from being carried out normally.
[0006] Therefore, before carrying out battery swapping operations, the tilt angle of the vehicle relative to the parking lane (i.e., the angle between the vehicle's forward direction and the lane's extension direction) and whether the vehicle is parked on the center line of the parking lane (i.e., the vehicle's offset relative to the lane's center line) must be obtained. If the angle α between the vehicle's forward direction and the lane's extension direction is greater than 0, and the vehicle's offset relative to the lane's center line is greater than 0, then the battery swapping equipment needs to be rotated by the angle α and moved horizontally until it is directly above the battery parked in the vehicle (the battery is installed in a fixed position on the vehicle, which is known). Summary of the Invention
[0007] In view of this, the main objective of the present invention is to provide a battery replacement method, apparatus, terminal and readable storage medium for a battery swapping station.
[0008] To achieve the above objectives, the technical solution of the present invention is implemented as follows: a battery swapping method for a battery swapping station, wherein the battery swapping station is provided with a parking lane extending in a straight line and the ground of the parking lane extending in a horizontal direction; a battery swapping device is provided in the parking lane; the method includes the following steps: acquiring initial point cloud data containing vehicles parked at the exit of the parking lane; obtaining target point cloud data corresponding to the vehicles from the initial point cloud data; filtering the target point cloud data; generating an axis-aligned bounding box corresponding to the target point cloud data; generating corresponding two-dimensional discrete points for all discrete points in the axis-aligned bounding box; then, extracting the front edge point set from all two-dimensional discrete points, processing the front edge point set based on principal component analysis and fitting a straight line; obtaining the center point and parking tilt angle of the vehicle based on the straight line; and controlling the battery swapping device to swap the battery of the vehicle based on the center point and the vehicle tilt angle.
[0009] As an improvement to this embodiment of the invention, a 3D radar is installed directly above the exit of the parking lane, and the angle between the illumination scanning direction of the 3D radar and the ground of the parking lane is [value missing]. The vertical distance between the 3D radar's illumination scanning direction and the ground of the parking lane is h; the "collection of initial point cloud data containing vehicles parked at the exit of the parking lane" specifically includes: collecting initial point cloud data containing vehicles parked at the exit of the parking lane using the 3D radar; then, in the initial point cloud data, the 3D radar's illumination scanning direction is the Z direction, and the X direction is horizontal and perpendicular to the vehicle's driving direction; rotating the initial point cloud data along the X-axis An angle is set such that the Z-direction is parallel to and opposite to the vehicle's forward direction, and the Y-direction is perpendicular to the ground; the initial point cloud data is translated a distance along the negative Y-axis. .
[0010] As an improvement to an embodiment of the present invention, the step of "obtaining the target point cloud data corresponding to the vehicle from the initial point cloud data" specifically includes: generating a preset cuboid region located at the exit of the parking lane from the initial point cloud data, wherein the point cloud located in the cuboid region constitutes the target point cloud data.
[0011] As an improvement to this embodiment of the invention, the "filtering of the target point cloud data" specifically includes: using a radius outlier filtering algorithm to filter the target point cloud data.
[0012] As an improvement to this embodiment of the invention, the step of "generating the axis-aligned bounding box corresponding to the target point cloud data" specifically includes: the minimum value of the X-coordinate of all discrete points in the target point cloud data. and maximum value The minimum Y-coordinate value of all discrete points in the target point cloud data. and maximum value The minimum Z-coordinate value of all discrete points in the target point cloud data. and maximum value Generate an axis-aligned bounding box corresponding to the target point cloud data, wherein the eight vertices of the axis-aligned bounding box are... , , , , , , , .
[0013] As an improvement to this embodiment of the invention, the step of "extracting the front edge point set from all two-dimensional discrete points, processing the front edge point set based on principal component analysis and fitting a straight line; obtaining the center point and parking tilt angle of the vehicle based on the straight line" specifically includes: extracting the front edge point set from all two-dimensional discrete points, obtaining the license plate position point set from the front edge point set, performing principal component analysis on the license plate position point set to obtain the covariance matrix C of the license plate position point set, obtaining the eigenvalues and eigenvectors of the covariance matrix C, the eigenvector v_max corresponding to the largest eigenvalue being the direction vector, obtaining the center point μ of the front edge point set, and generating a straight line passing through the center point μ and the direction vector v_max; the center point of the vehicle is μ, and the parking tilt angle is the angle between the straight line and the Y-axis.
[0014] This invention also provides a battery swapping device for a battery swapping station, wherein the battery swapping station is provided with a parking lane extending in a straight line and the ground of the parking lane extending horizontally; a battery swapping device is provided in the parking lane; and includes the following modules: a point cloud generation module, used to collect initial point cloud data containing vehicles parked at the exit of the parking lane; obtain target point cloud data corresponding to the vehicles from the initial point cloud data; perform filtering processing on the target point cloud data; generate an axis-aligned bounding box corresponding to the target point cloud data; a processing module, used to generate corresponding two-dimensional discrete points for all discrete points in the axis-aligned bounding box; then, extract the front edge point set from all two-dimensional discrete points, process the front edge point set based on principal component analysis and fit a straight line; obtain the center point and parking tilt angle of the vehicle based on the straight line; and a battery swapping module, used to control the battery swapping device to swap the battery of the vehicle based on the center point and the vehicle tilt angle.
[0015] As an improvement to this embodiment of the invention, a 3D radar is installed directly above the exit of the parking lane, and the angle between the illumination scanning direction of the 3D radar and the ground of the parking lane is [value missing]. The vertical distance between the 3D radar's illumination scanning direction and the ground of the parking lane is h; the point cloud generation module is further configured to: acquire initial point cloud data containing vehicles parked at the exit of the parking lane using the 3D radar; then, in the initial point cloud data, the 3D radar's illumination scanning direction is the Z direction, and the X direction is horizontal and perpendicular to the vehicle's driving direction; rotate the initial point cloud data along the X-axis. An angle is set such that the Z-direction is parallel to and opposite to the vehicle's forward direction, and the Y-direction is perpendicular to the ground; the initial point cloud data is translated a distance along the negative Y-axis. .
[0016] This invention also provides a terminal, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of the battery replacement method described above.
[0017] This invention also provides a readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the battery replacement method described above.
[0018] The battery replacement method, apparatus, terminal, and readable storage medium for battery swapping stations provided in this invention have the following advantages: This invention discloses a battery replacement method, apparatus, terminal, and readable storage medium for battery swapping stations. The battery replacement method includes the following steps: acquiring initial point cloud data containing vehicles parked at the exit of the parking lane; obtaining target point cloud data corresponding to the vehicles from the initial point cloud data; filtering the target point cloud data; generating an axis-aligned bounding box corresponding to the target point cloud data; generating corresponding two-dimensional discrete points for all discrete points in the axis-aligned bounding box; then, extracting the vehicle front edge point set from all two-dimensional discrete points, processing the vehicle front edge point set based on principal component analysis, and fitting a straight line; obtaining the vehicle's center point and parking tilt angle based on the straight line; and controlling the battery replacement device to replace the vehicle's battery based on the center point and vehicle tilt angle. This enables battery replacement even when the user parks the vehicle at an angle. Attached Figure Description
[0019] Figure 1 This is a schematic flowchart of the battery replacement method provided in an embodiment of the present invention; Figure 2 An initial point cloud data provided for an embodiment of the present invention; Figure 3 This invention provides a target point cloud data for an embodiment of the invention. Figure 4 An axis-aligned bounding box provided in an embodiment of the present invention; Figure 5 This invention provides a set of points on the edge of a vehicle's front end; Figure 6 This is a fitted straight line provided in an embodiment of the present invention. Detailed Implementation
[0020] The present invention will now be described in detail with reference to the embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional modifications made by those skilled in the art based on these embodiments are included within the scope of protection of the present invention.
[0021] The following description and accompanying drawings fully illustrate specific embodiments described herein to enable those skilled in the art to practice them. Some embodiments may include or substitute parts and features of other embodiments. The scope of the embodiments herein encompasses the entire scope of the claims and all available equivalents thereof. Throughout this document, the terms “first,” “second,” etc., are used only to distinguish one element from another without requiring or implying any actual relationship or order between the elements. Indeed, a first element can also be referred to as a second element, and vice versa. Furthermore, the terms “comprising,” “including,” or any other variations thereof are intended to cover non-exclusive inclusion, such that a structure, apparatus, or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a structure, apparatus, or device. Without further limitation, an element defined by the phrase “comprising one…” does not exclude the presence of other identical elements in the structure, apparatus, or device that includes said element. The various embodiments described herein are presented in a progressive manner, with each embodiment focusing on its differences from other embodiments; similar or identical parts between embodiments can be referred to interchangeably.
[0022] The terms "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," and "outer" used in this document to indicate orientations or positional relationships are based on the orientations or positional relationships shown in the accompanying drawings. They are used solely for the convenience of describing the document and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the invention. In the description herein, unless otherwise specified and limited, the terms "installed," "connected," and "linked" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two elements; they can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.
[0023] Embodiment 1 of the present invention provides a battery replacement method for vehicles parked at a battery swapping station. The battery swapping station is provided with a parking lane that extends in a straight line and the ground of the parking lane extends horizontally. A battery replacement device is installed in the parking lane. Figure 1 As shown, it includes the following steps: Step 101: Collect initial point cloud data containing vehicles parked at the exit of the parking lane; obtain target point cloud data corresponding to the vehicles from the initial point cloud data; perform filtering processing on the target point cloud data; generate axis-aligned bounding boxes corresponding to the target point cloud data; Figure 2 An initial point cloud dataset is shown. Figure 3 The image shows target point cloud data.
[0024] Here, 3D radar can scan the front area of a vehicle to collect initial point cloud data of the front. This data consists of a large number of three-dimensional coordinate points, which can accurately reconstruct the shape, size, surface features, and other information of the front of the vehicle. It can then be used for vehicle recognition, front damage detection, vehicle type classification, and other scenarios. Among them, 3D radar is the key equipment. It can emit electromagnetic waves into the front area of the vehicle and receive reflected signals. By calculating parameters such as the time difference and angle of the signals, it generates the initial three-dimensional point cloud data of the front of the vehicle (unlike ordinary 2D radar, 3D radar can simultaneously acquire the target's distance, angle, and height information).
[0025] The radar can be deployed above the exit of the passageway—this location offers the advantage of covering the front area of vehicles as they exit the passageway, while avoiding collisions with other vehicles. The scanning direction should be at approximately a 45-degree angle to the direction of vehicle travel—this angle avoids both excessively narrow scanning range due to parallelism and obstruction of the front area of the vehicle due to a perpendicular angle, providing more comprehensive three-dimensional coverage of the vehicle's front. This angle can be adjusted according to actual conditions—for example, when conditions such as passageway width, vehicle type, or radar model change, the scanning coverage or data accuracy can be optimized by adjusting the angle.
[0026] Here, the target point cloud is obtained from the initial point cloud, which can accurately filter and remove invalid data, greatly reducing the computational load of subsequent algorithms. The initial point cloud data contains irrelevant data such as the ground, walls, surrounding equipment, and environmental debris of the parking lane. This solution first extracts the target point cloud corresponding only to the vehicle, directly filtering out invalid discrete points that are not vehicles. This allows all subsequent algorithms to operate only on vehicle data, reducing the amount of computation, improving processing speed, and avoiding interference from irrelevant data on vehicle posture recognition, thus ensuring recognition accuracy.
[0027] Radar-acquired point cloud data inevitably contains outliers and isolated points caused by radar noise, environmental reflection interference, and vehicle surface reflections. These outliers can lead to distortion in subsequent bounding box modeling and errors in edge point set extraction. The filtering process in this solution can remove these invalid noise points, retaining the true point cloud data of the vehicle itself. This provides a clean and reliable data source for subsequent bounding box generation and edge point set extraction, which is a crucial prerequisite for ensuring the final positioning accuracy.
[0028] Axis-aligned bounding boxes (AABB) can quickly generate the minimum cuboid boundary that fits the vehicle contour based on the extreme coordinates of the vehicle point cloud. On the one hand, this precisely limits the analysis range of subsequent algorithms, further reducing the computation area and improving efficiency; on the other hand, it achieves standardized adaptation for different vehicle models (different sizes / length, width and height). Whether the vehicle is a sedan, SUV or commercial vehicle, its contour can be adapted through the bounding box without any vehicle model adaptation restrictions.
[0029] Step 102: Generate corresponding two-dimensional discrete points for all discrete points in the axis-aligned bounding box; then, extract the front edge point set from all two-dimensional discrete points, process the front edge point set based on principal component analysis and fit a straight line; obtain the center point and parking tilt angle of the vehicle based on the straight line. Figure 4 An axis-aligned bounding box is shown. Figure 5 A set of points at the edge of the vehicle's front is shown. Figure 6 A fitted straight line is shown.
[0030] The core requirement of this solution is to obtain the vehicle's planar attitude (center point + horizontal tilt angle) on a horizontal parking lane. The vehicle's height dimension (vertical coordinates of three-dimensional points) has no impact on the horizontal alignment of the battery swapping equipment. Therefore, the three-dimensional discrete points are reduced to two-dimensional discrete points, and invalid height information is eliminated, retaining only the core horizontal coordinate data. This significantly simplifies the algorithmic complexity of subsequent edge point set extraction and PCA fitting, improves the computing speed, and does not sacrifice core positioning accuracy. It is the optimal design for "precise selection and efficient computation".
[0031] The front of the vehicle is the core part for docking with the battery swapping equipment. By taking the edge points of the front of the vehicle as the analysis object, the core alignment area of the battery swapping operation is directly anchored, avoiding the point cloud interference from other parts of the vehicle body, so that the posture recognition results are more in line with the actual needs of the battery swapping operation. The core advantage of the PCA algorithm is that it can perform optimal fitting of the overall distribution characteristics of discrete points, effectively avoiding local point cloud deviations caused by the unevenness of the front surface (such as bumpers, headlights, and grilles). The fitted straight line is the true main direction of the front edge. Compared with the traditional "point connection and least squares fitting", it has stronger anti-interference ability and higher fitting accuracy. The calculated parking tilt angle and center point coordinate error are extremely small, which is the core algorithm advantage of ensuring accurate alignment of the battery swapping equipment.
[0032] Step 103: Based on the center point and the vehicle tilt angle, control the battery replacement device to replace the battery of the vehicle.
[0033] This battery replacement method utilizes an intelligent workflow involving point cloud acquisition, data processing, attitude recognition, and precise control to achieve contactless, fully automated, and high-precision vehicle attitude recognition. It effectively solves problems such as low battery replacement efficiency, high failure rate, and poor adaptability caused by inaccurate vehicle alignment and tilted parking in traditional battery swapping operations. This method not only significantly improves the accuracy, efficiency, and safety of battery replacement but also reduces the hardware investment and maintenance costs of battery swapping stations. It causes no damage to vehicles, requires no operational skills from vehicle owners, and is compatible with various vehicle models and battery swapping station conditions.
[0034] In this embodiment, a 3D radar is installed directly above the exit of the parking lane, and the angle between the 3D radar's illumination scanning direction and the ground of the parking lane is [value missing]. And the vertical distance between the 3D radar's illumination and scanning direction and the ground of the parking lane is h; The "collection of initial point cloud data containing vehicles parked at the exit of the parking lane" specifically includes: collecting initial point cloud data containing vehicles parked at the exit of the parking lane using the 3D radar; then, in the initial point cloud data, the illumination scanning direction of the 3D radar is the Z direction, and the X direction is horizontal and perpendicular to the vehicle's driving direction; rotating the initial point cloud data along the X-axis. An angle is set such that the Z-direction is parallel to and opposite to the vehicle's forward direction, and the Y-direction is perpendicular to the ground; the initial point cloud data is translated a distance along the negative Y-axis. .
[0035] The raw initial point cloud data of the vehicle front acquired by 3D radar is processed. Through coordinate transformation of "rotation + translation", the coordinate system of the initial point cloud data is aligned with the actual spatial relationship of the vehicle / ground, which facilitates subsequent analysis (such as vehicle front size measurement and damage detection).
[0036] The origin of the original point cloud is the installation location of the radar. The initial coordinate axes are defined as follows: the Z direction is the radar's illumination and scanning direction; the X direction is perpendicular to the vehicle's driving direction.
[0037] Two steps for coordinate transformation: 1. Rotation operation: Rotate along the X-axis; the goal is to make the Z-direction parallel to and opposite to the vehicle's forward direction, while simultaneously making the Y-direction perpendicular to the ground; the rotation angle is equal to the radar's illumination angle. (For example, the 45-degree angle in the previous plan).
[0038] 2. Translation Operation: Translation direction: along the negative Y-axis; translation distance equal to the radar's installation height. (Translate the height of the radar installation location to a ground reference frame).
[0039] Mathematical implementation of coordinate transformation (matrix operations) A rotation and translation can be performed in one step using a 4×4 homogeneous transformation matrix. .
[0040] The principle is: the homogeneous coordinates of the original point cloud , and matrix Multiply to obtain the transformed coordinates. The formula is Specific calculation results: .
[0041] In this embodiment, the step of "obtaining the target point cloud data corresponding to the vehicle from the initial point cloud data" specifically includes: generating a preset cuboid region located at the exit of the parking lane from the initial point cloud data, wherein the point cloud in the cuboid region constitutes the target point cloud data.
[0042] After the previous coordinate transformation, the origin of the point cloud has been aligned with the ground at the center of the channel exit, which serves as the spatial reference for subsequent filtering. By defining a cuboid region (the spatial range of the channel), only the point cloud within this region is retained, thus obtaining initial point cloud data containing only the vehicle (because the vehicle is traveling within the channel, point clouds outside the channel will be filtered out).
[0043] It may include the following operational steps: Step 1: Determine the parameters of the cuboid region. Using the known channel width W, length L, and height H, define the cuboid space range corresponding to the channel.
[0044] Step 2: Set the filtering criteria (coordinate range). Using the origin of the converted point cloud (the center ground of the channel exit) as the reference, the point cloud coordinates must meet the following range: The x-axis corresponds to the channel width direction and is confined within the left and right boundaries of the channel. The y-axis corresponds to the height direction and is limited to the area between the ground (y=0) and the top of the passage (y=H); The z-axis corresponds to the length direction of the channel and is confined within the front and rear boundaries of the channel.
[0045] Step 3: Only retain the point cloud that meets the above coordinate range. These point clouds are the initial point cloud data corresponding to the vehicles in the channel (filter out irrelevant points outside the channel).
[0046] In this embodiment, the "filtering of the target point cloud data" specifically includes: using a radius outlier filtering algorithm to filter the target point cloud data.
[0047] Radius outlier filtering (point cloud cleanup) filters out abnormal points (such as radar noise and interference points) in vehicle point clouds. The principle is: for each point... Calculate the number of its neighboring points within the search radius r. Set a minimum neighborhood threshold. :if This indicates that there are too few points around this point, so it is identified as an outlier and deleted.
[0048] In this embodiment, "generating the axis-aligned bounding box corresponding to the target point cloud data and the center position of the vehicle's front" specifically includes: The minimum X-coordinate value of all discrete points in the target point cloud data and maximum value The minimum Y-coordinate value of all discrete points in the target point cloud data. and maximum value The minimum Z-coordinate value of all discrete points in the target point cloud data. and maximum value ; Generate an axis-aligned bounding box corresponding to the target point cloud data, wherein the eight vertices of the axis-aligned bounding box are... , , , , , , , .
[0049] For the filtered, clean point cloud, calculate its axis-aligned bounding box (AABB)—a rectangular box enclosing the point cloud, assuming there are N discrete points in total. , ... N is a natural number, N≥2, discrete points The coordinates are Let i be a natural number, i = 1, 2, ..., N. Calculate the extreme values of the point cloud in the X, Y, and Z directions: X direction: minimum value Maximum value ; Y direction: minimum value Maximum value ; Z-direction: Minimum value Maximum value .
[0050] Using the bounding box's range, the vehicle's front position is approximated: the front position is defined as the center of the front end of the bounding box, and the coordinate formula is: (Note: z_{max} corresponds to the front of the vehicle in the direction of travel, so the maximum value in the Z direction is taken as the front-rear position of the vehicle.) In this embodiment, the step of "extracting the front edge point set from all two-dimensional discrete points, processing the front edge point set based on principal component analysis and fitting a straight line; obtaining the center point and parking tilt angle of the vehicle based on the straight line" specifically includes: Extract the vehicle front edge point set from all two-dimensional discrete points, obtain the license plate position point set from the vehicle front edge point set, perform principal component analysis on the license plate position point set, and obtain the covariance matrix C of the license plate position point set. Obtain the eigenvalues and eigenvectors of the covariance matrix C. The eigenvector v_max corresponding to the largest eigenvalue is the direction vector. Obtain the center point μ of the vehicle front edge point set, and generate a straight line passing through the center point μ and the direction vector v_max. The center point of the vehicle is μ, and the parking tilt angle is the angle between the straight line and the Y-axis.
[0051] The axis-aligned bounding box contains N discrete points. , ... N is a natural number, N≥2; for each discrete point Each generates a corresponding two-dimensional point. Let i be a natural number, i = 1, 2, ..., N; Vehicle positioning and tilt angle are extracted from 3D point cloud. Dimensionality reduction operation: Dimensionality reduction is performed on the axis-aligned bounding box, that is, the Z coordinate of the 3D points in the point cloud is directly ignored, and the 3D points are converted into 2D points. For example, for each point... , converted This simplifies the calculation and allows us to focus on the planar (XY) features of the vehicle's front end.
[0052] The specific method for extracting the edge points of the vehicle front is as follows: Traverse all points in the axis-aligned bounding box from smallest to largest along the Y direction. For each Y value, find the point with the largest X coordinate, filter out points with non-maximum X coordinates, and retain the right edge points of the vehicle front. Specifically, for each Y interval... Find the point with the largest X-coordinate within that interval. That is, for each interval, only the point with the largest X-coordinate is retained to obtain the set of points on the right edge of the front of the vehicle. (Because the maximum X corresponds to the right boundary of the front of the car).
[0053] The specific method for extracting the license plate location point set is as follows: find the point with the largest X coordinate in the point set at the edge of the vehicle front as the reference point, and filter out points in the point set whose distance from the reference point in the X direction is greater than a specified threshold. point, that is , .
[0054] Principal component analysis (PCA) is used to fit a straight line. PCA is performed on the license plate location point set P_license to calculate the covariance matrix C of the point set. , The license plate location point set P_license has n discrete points. , ... .
[0055] Find the eigenvalues and eigenvectors of the covariance matrix C: The eigenvector corresponding to the largest eigenvalue This is the direction vector of the straight line, which is the main direction (i.e., the straight line direction) of the license plate point set distribution. The vehicle's location is the center point p of the line segment.
[0056] The parking tilt angle α is the angle between the direction of the line segment and the Y-axis. .
[0057] Embodiment 2 of the present invention provides a battery swapping device for a battery swapping station. The battery swapping station is provided with a parking lane that extends in a straight line and the ground of the parking lane extends horizontally. A battery swapping device is installed in the parking lane. The device includes the following modules: A point cloud generation module is used to collect initial point cloud data containing vehicles parked at the exit of the parking lane; obtain target point cloud data corresponding to the vehicles from the initial point cloud data; perform filtering processing on the target point cloud data; and generate an axis-aligned bounding box corresponding to the target point cloud data. The processing module generates corresponding two-dimensional discrete points for all discrete points in the axis-aligned bounding box; then, it extracts the front edge point set from all the two-dimensional discrete points, processes the front edge point set based on principal component analysis, and fits a straight line; based on the straight line, it obtains the center point and parking tilt angle of the vehicle. A battery replacement module is used to control the battery replacement device to replace the battery of the vehicle based on the center point and the vehicle tilt angle.
[0058] In this embodiment, a 3D radar is installed directly above the exit of the parking lane, and the angle between the 3D radar's illumination scanning direction and the ground of the parking lane is [value missing]. And the vertical distance between the 3D radar's illumination and scanning direction and the ground of the parking lane is h; The point cloud generation module is further configured to: acquire initial point cloud data containing vehicles parked at the exit of the parking lane using the 3D radar; then, in the initial point cloud data, the illumination scanning direction of the 3D radar is the Z direction, and the X direction is horizontal and perpendicular to the vehicle's driving direction; rotate the initial point cloud data along the X-axis. An angle is set such that the Z-direction is parallel to and opposite to the vehicle's forward direction, and the Y-direction is perpendicular to the ground; the initial point cloud data is translated a distance along the negative Y-axis. .
[0059] Embodiment 3 of the present invention provides a terminal, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of the battery replacement method as described in Embodiment 1.
[0060] Embodiment 4 of the present invention provides a readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the battery replacement method as described in Embodiment 1.
[0061] It should be noted that although the steps are described in a specific order above, it does not mean that the steps must be executed in the above specific order. In fact, some of these steps can be executed concurrently, or even in a different order, as long as the required function can be achieved.
[0062] This invention can be a system, method, and / or computer program product. A computer program product may include a readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of the invention.
[0063] A readable storage medium can be a tangible device that holds and stores instructions for use by an instruction execution device. Readable storage media can include, for example, but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof.
[0064] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the embodiments in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A battery swapping method for a battery swapping station, wherein the battery swapping station is provided with a parking lane extending in a straight line and the ground of the parking lane extending horizontally; a battery swapping device is provided in the parking lane; characterized in that, Includes the following steps: Collect initial point cloud data containing vehicles parked at the exit of the parking lane; Obtain the target point cloud data corresponding to the vehicle from the initial point cloud data; The target point cloud data is then filtered. Generate the axis-aligned bounding box corresponding to the target point cloud data; For all discrete points in the axis-aligned bounding box, corresponding two-dimensional discrete points are generated; then, the front edge point set is extracted from all the two-dimensional discrete points, and the front edge point set is processed and fitted with a straight line based on principal component analysis; the center point and parking tilt angle of the vehicle are obtained based on the straight line. Based on the center point and the vehicle tilt angle, the battery replacement device is controlled to replace the battery of the vehicle.
2. The battery replacement method according to claim 1, characterized in that, A 3D radar is installed directly above the exit of the parking lane. The angle between the 3D radar's illumination and scanning direction and the ground of the parking lane is [value missing]. And the vertical distance between the 3D radar's illumination and scanning direction and the ground of the parking lane is h; The "collection of initial point cloud data containing vehicles parked at the exit of the parking lane" specifically includes: collecting initial point cloud data containing vehicles parked at the exit of the parking lane using the 3D radar; then, in the initial point cloud data, the illumination scanning direction of the 3D radar is the Z direction, and the X direction is horizontal and perpendicular to the vehicle's driving direction; rotating the initial point cloud data along the X-axis. An angle is set such that the Z-direction is parallel to and opposite to the vehicle's forward direction, and the Y-direction is perpendicular to the ground; the initial point cloud data is translated a distance along the negative Y-axis. .
3. The battery replacement method according to claim 2, characterized in that, The phrase "obtaining the target point cloud data corresponding to the vehicle from the initial point cloud data" specifically includes: From the initial point cloud data, a preset cuboid region located at the exit of the parking lane is generated, and the point cloud in the cuboid region constitutes the target point cloud data.
4. The battery replacement method according to claim 3, characterized in that, The "filtering process for the target point cloud data" specifically includes: The target point cloud data is filtered using a radius outlier filtering algorithm.
5. The battery replacement method according to claim 4, characterized in that, The phrase "generating the axis-aligned bounding box corresponding to the target point cloud data" specifically includes: The minimum X-coordinate value of all discrete points in the target point cloud data and maximum value The minimum Y-coordinate value of all discrete points in the target point cloud data. and maximum value The minimum Z-coordinate value of all discrete points in the target point cloud data. and maximum value ; Generate an axis-aligned bounding box corresponding to the target point cloud data, wherein the eight vertices of the axis-aligned bounding box are... , , , , , , , .
6. The battery replacement method according to claim 5, characterized in that, The phrase "extracting the front edge point set from all two-dimensional discrete points, processing the front edge point set based on principal component analysis and fitting a straight line; obtaining the vehicle's center point and parking tilt angle based on the straight line" specifically includes: Extract the vehicle front edge point set from all two-dimensional discrete points, obtain the license plate position point set from the vehicle front edge point set, perform principal component analysis on the license plate position point set, and obtain the covariance matrix C of the license plate position point set. Obtain the eigenvalues and eigenvectors of the covariance matrix C. The eigenvector v_max corresponding to the largest eigenvalue is the direction vector. Obtain the center point μ of the vehicle front edge point set, and generate a straight line passing through the center point μ and the direction vector v_max. The center point of the vehicle is μ, and the parking tilt angle is the angle between the straight line and the Y-axis.
7. A battery swapping device for a battery swapping station, the battery swapping station having a parking lane extending in a straight line and the ground of the parking lane extending horizontally; a battery swapping device being installed in the parking lane; characterized in that, Includes the following modules: A point cloud generation module is used to collect initial point cloud data containing vehicles parked at the exit of the parking lane; and to obtain target point cloud data corresponding to the vehicles from the initial point cloud data. The target point cloud data is then filtered. Generate the axis-aligned bounding box corresponding to the target point cloud data; The processing module generates corresponding two-dimensional discrete points for all discrete points in the axis-aligned bounding box; then, it extracts the front edge point set from all the two-dimensional discrete points, processes the front edge point set based on principal component analysis, and fits a straight line; based on the straight line, it obtains the center point and parking tilt angle of the vehicle. A battery replacement module is used to control the battery replacement device to replace the battery of the vehicle based on the center point and the vehicle tilt angle.
8. The battery replacement device according to claim 7, characterized in that, A 3D radar is installed directly above the exit of the parking lane. The angle between the 3D radar's illumination and scanning direction and the ground of the parking lane is [value missing]. And the vertical distance between the 3D radar's illumination and scanning direction and the ground of the parking lane is h; The point cloud generation module is further configured to: acquire initial point cloud data containing vehicles parked at the exit of the parking lane using the 3D radar; then, in the initial point cloud data, the illumination scanning direction of the 3D radar is the Z direction, and the X direction is horizontal and perpendicular to the vehicle's driving direction; rotate the initial point cloud data along the X-axis. An angle is set such that the Z-direction is parallel to and opposite to the vehicle's forward direction, and the Y-direction is perpendicular to the ground; the initial point cloud data is translated a distance along the negative Y-axis. .
9. A terminal, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the battery replacement method as described in any one of claims 1 to 6 when executing the computer program.
10. A readable storage medium, characterized in that, The readable storage medium stores a computer program that, when executed by a processor, implements the steps of the battery replacement method as described in any one of claims 1 to 6.