Power battery pose estimation method based on machine vision point cloud segmentation
By using machine vision point cloud segmentation technology, the problem of insufficient compatibility of battery swapping stations with positioning of multiple battery pack models has been solved, achieving accurate battery pack pose estimation and reducing battery swapping costs and time.
Patent Information
- Application Number
- CN202311484757.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2023-11-06
- Filing Date
- 2023-11-09
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2043-11-09
AI Technical Summary
Existing battery swapping stations cannot meet the positioning requirements of multiple battery pack models, resulting in insufficient battery swapping compatibility. Furthermore, they have excessively high requirements for vehicle parking accuracy, which increases battery swapping costs and time.
A power battery pose estimation method based on machine vision point cloud segmentation is adopted. RGBD images are captured by a 3D vision sensor, and the locking mechanism is segmented by a convolutional neural network. Point cloud matching is performed by combining voxel filtering, RANSAC plane segmentation and FPFH descriptor to achieve accurate pose estimation.
It enables precise positioning of multiple battery pack models, reduces the accuracy requirements for vehicle parking of the battery swapping robot, and improves battery swapping efficiency and accuracy.
Smart Images

Figure CN117635699B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent battery swapping for electric vehicles, specifically a method for estimating the pose of power batteries based on machine vision point cloud segmentation. Background Technology
[0002] Electric vehicles (EVs) offer advantages such as energy conservation, environmental friendliness, and high energy conversion efficiency, leading to strong government promotion. Battery pack swapping, as a recharging method, allows users to quickly replenish their battery, overcoming the slow charging process and providing a better user experience. During EV battery swapping, ensuring precise alignment between the swapping mechanism and the battery pack is crucial for efficient and rapid swapping.
[0003] During battery swapping, the battery pack positioning information comes from the positioning results of the battery pack locking mechanism. There are two methods for positioning the battery pack locking mechanism: mechanical positioning and visual positioning. The mechanical positioning method calculates the spatial position of the battery pack locking mechanism based on known vehicle dimensions, vehicle parking position, battery pack dimensions, and the structural dimensions of the battery swapping station. A flexible mechanism in the locking and unlocking device compensates for positioning estimation errors. The visual positioning method uses 3D vision sensors, such as binocular cameras, RGBD cameras, and laser scanners, to capture images of the battery pack under the vehicle. Appropriate algorithms are then used to process these images to obtain the specific spatial pose of the locking mechanism. Compared to the mechanical positioning method, the visual positioning method is more accurate, can obtain rotation angle information, is compatible with more vehicle and battery pack models, and can better cope with various environmental interferences and unexpected situations.
[0004] Currently, battery swapping robots suffer from insufficient compatibility in identifying and locating various types and models of vehicles and battery packs. Because the dimensions of vehicles vary, the positions of battery packs and their locking holes on different vehicle chassis may also differ. This necessitates that the battery swapping system dynamically identify the shape of the vehicle chassis to obtain precise position and orientation information. Furthermore, for the battery swapping robot to accurately dock with the vehicle's battery pack, existing platforms require the vehicle body to be precisely positioned in a fixed location. This high precision requirement necessitates additional devices for positioning and adjustment, increasing both the cost and time of battery swapping.
[0005] In the field of battery swapping for various types of electric vehicle battery packs, there is an urgent need for an efficient and accurate method for locating battery swapping platforms. Summary of the Invention
[0006] To address the above problems, this invention proposes a power battery pose estimation method based on machine vision point cloud segmentation, which solves the problem that existing battery swapping stations cannot adapt to the positioning requirements of multiple battery pack models.
[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0008] The power battery pose estimation method based on machine vision point cloud segmentation includes the following steps:
[0009] (1) Use a 3D vision sensor to capture RGBD images of the battery swapping scene;
[0010] (2) For the vehicle chassis battery pack locking mechanism in the image, a convolutional neural network is used to segment the target. The network uses a multi-layer residual convolutional neural network to extract the image features and uses a pyramid structure to obtain multi-scale image features. After passing through the segmentation mask prediction layer, the target instance segmentation mask is output. The locking mechanism part is segmented from the original RGBD image according to the mask and projected into a point cloud P0 through the camera intrinsic parameters.
[0011] (3) Use a voxel filter to filter the point cloud P0, remove noise and some outliers, and reduce the number of points to retain the fine structure of the point cloud to the maximum extent, to obtain P1. For the existing point cloud z-axis noise and some outliers with large deviations, smooth the point cloud by moving least squares method to obtain point cloud P2.
[0012] (4) Use the RANSAC method to perform planar segmentation of the P2 point cloud to obtain the fitting plane l1 of the bottom surface of the locking mechanism, whose corresponding normal vector is n1. According to the planar segmentation result, the point cloud of the locking mechanism is divided into the bottom surface and the lock head part, and the point cloud is given global semantic information.
[0013] (5) The FPFH 3D descriptor is used to find the correspondence between the target point cloud and the template point cloud. After calculating the FPFH features, the point cloud segmentation results are fused into the FPFH feature histogram in combination with the content of step (4). This feature descriptor can ensure that the point cloud can combine local features and global features in the subsequent matching process, so that points with the same semantic labels can be matched, thereby reducing mismatches. The template point cloud is registered according to the template point cloud, and the KD tree is used to match the feature points. Corresponding matching points are found for the source point cloud and the template point cloud respectively, and the matching points are filtered to obtain the matching relationship. Then, the RANSAC method is used to obtain the pose estimation of the matching points.
[0014] As a further improvement of the present invention, the method for setting up the visual sensor in step (1) is as follows:
[0015] The vision sensor is fixed at a position 0.5 meters below the bottom of the battery swapping platform. Its setting is eye-to-hand. The vision sensor needs to be calibrated before use. The relative pose of the vision sensor coordinate system with the battery swapping station coordinate system is R0, t0. The vision sensor takes pictures of the car chassis battery pack above and obtains point cloud images including the car chassis battery pack and part of the battery swapping station structure. The holes on the surface of the battery pack are feature marks used for positioning.
[0016] As a further improvement of the present invention, step (2) convolutional neural network target segmentation includes the following steps;
[0017] (2-1) Use a convolutional neural network to segment the target and output an instance segmentation mask. The output mask is the membership probability p of each image pixel to the foreground and background. Select all pixels with a membership probability p greater than 0.5 as the segmentation template for the locking mechanism target.
[0018] (2-2) The depth map pixels are projected into a three-dimensional space and converted into a point cloud P0 by using the camera's intrinsic parameter K matrix.
[0019] As a further improvement of the present invention, the point cloud filtering in step (3) includes the following steps:
[0020] (3-1) First, voxel filtering is performed. A 3D voxel grid is established in the input point cloud P0 of the locking mechanism. The centroid of the point cloud in each voxel is calculated and used as the output point cloud to obtain the filtered point cloud P1.
[0021] (3-2) The point cloud P1 is smoothed along the z-axis by moving least squares method. After moving least squares smoothing, P2 is obtained from the point cloud P1.
[0022] As a further improvement of the present invention, step (4) of locking mechanism point cloud segmentation includes the following steps:
[0023] (4-1) The RANSAC method is used to fit the point cloud P2 of the locking mechanism to a plane. The point cloud estimation plane with the most interior points is taken as the fitting plane l1 of the bottom surface of the locking mechanism, and its corresponding normal vector is n1;
[0024] (4-2) Take the points in the locking mechanism point cloud P2 that are within a certain distance from the fitting plane as the bottom point cloud P. 21 The remaining part serves as the point cloud P of the lock head. 22 , for P 21 P 22 Label them 1 and 2 respectively.
[0025] As a further improvement of the present invention, step (5) of locking mechanism point cloud registration includes the following steps:
[0026] (5-1) Calculate the FPFH 3D descriptor;
[0027] (5-2) Integrate the point cloud segmentation results into the FPFH feature histogram;
[0028] (5-3) First, KD tree is used to match feature points, and the matching points are filtered through interchangeability test and triangulation test to obtain matching relationships;
[0029] (5-4) Use the RANSAC method to obtain the pose estimate T sm Finally, the pose T is estimated using the ICP method. sm The precise registration yields a more accurate T sm .
[0030] Beneficial Effects: This invention discloses a method and system for power battery pose estimation based on machine vision point cloud segmentation. The method uses a 3D camera to photograph the battery pack to be replaced on a car chassis, obtaining an RGBD image containing the battery pack's positioning features. A convolutional neural network is used for target segmentation to obtain the foreground of the locking mechanism, which is then projected to obtain the locking mechanism point cloud. Voxel filtering and moving least squares smoothing are applied to the locking mechanism point cloud to remove noise and flatten the surface. The RANSAC method is used for planar segmentation of the locking mechanism point cloud to obtain a fitted plane for the bottom surface of the locking mechanism. Based on the planar fitting result, the locking mechanism point cloud is divided into the bottom surface and the lock head, assigning global semantic information to the point cloud. A FPFH 3D descriptor is generated for the point cloud, and the point cloud segmentation result is fused into the FPFH feature histogram, enabling matching of points with the same semantic labels. Finally, RANSAC is used to obtain pose estimation for the matched points. This positioning method and system are suitable for vehicle battery pack replacement operations in battery swapping stations, enabling precise positioning of the battery pack and guiding the battery swapping robot's swapping operation. Attached Figure Description
[0031] Figure 1 This is a flowchart of the method disclosed in this invention;
[0032] Figure 2 This is a schematic diagram of the battery swapping positioning system disclosed in this invention;
[0033] Figure 3 This is a schematic diagram of the battery swapping positioning system device disclosed in this invention. Detailed Implementation
[0034] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:
[0035] This invention discloses a method and system for estimating the pose of a power battery based on machine vision point cloud segmentation, such as... Figure 1 As shown, it includes the following steps:
[0036] The visual sensor setup method in step (1) is as follows: Figure 2 As shown.
[0037] The battery swapping platform's working space is located directly below the vehicle parking area. A battery swapping robot is positioned on the platform at the bottom of this space to perform battery swapping operations on the battery packs on the chassis of the vehicles to be swapped. In this positioning scheme, a vision sensor is fixed at a position 0.5 meters below the bottom of the battery swapping platform, using an eye-to-hand configuration. The vision sensor requires calibration testing before use. The relative pose of the vision sensor's coordinate system to the battery swapping coordinate system is R0, t0. The vision sensor captures images of the vehicle chassis battery pack above, obtaining point cloud images including the vehicle chassis battery pack and part of the battery swapping station structure, with the battery pack's locking mechanism serving as the positioning target. Subsequent computer processing calculates the positioning information from the captured images, obtaining the absolute pose of the locking mechanism within the battery swapping station space, which guides the battery swapping robot to dock with the battery pack.
[0038] The convolutional neural network used for target segmentation in step (2) includes the following steps:
[0039] (2-1) Target segmentation using a convolutional neural network. The network uses a multi-layer residual convolutional neural network for image feature extraction and utilizes a pyramid structure to obtain multi-scale image features. These features are then passed through a segmentation mask prediction layer to output an instance segmentation mask. The output mask represents the membership probability p of each image pixel to the foreground and background. When p is less than 0.5, the pixel belongs to the background; when p is greater than 0.5, the pixel belongs to the foreground. All pixels with a membership probability p greater than 0.5 are selected as the segmentation template for the locking mechanism target.
[0040] (2-2) The depth map pixels are projected into a three-dimensional space and converted into a point cloud P0 by using the camera's intrinsic parameter K matrix.
[0041] The point cloud preprocessing in step (3) includes the following steps:
[0042] (3-1) First, design the voxel filter with a voxel grid side length of f. z =2.0mm, a 3D voxel grid is established in the input point cloud P0 of the locking mechanism, the centroid of the point cloud within each voxel is calculated and used as the output point cloud, resulting in the filtered point cloud P1. P1 has fewer point clouds and retains the fine structure of the point cloud to the maximum extent, but still contains some z-axis noise and some outliers with large deviations.
[0043] (3-2) Smoothing of the P1 point cloud along the z-axis is performed using the moving least squares method. In a neighborhood of the point to be fitted, the fitting function is expressed as:
[0044] f(x) = p T (x)a(x)
[0045] Where a(x) = [a1(x), a2(x), a3(x)] are the fitting coefficients to be determined, and p(x) = [p1(x), p2(x), p3(x)] are the basis functions. For the z-axis coordinate f(x) of the point cloud to be fitted, the basis function p(x) = [1, p1...]. x p1 y ], p1 x p1 y Let x and y be the coordinates of the point, respectively. Using the moving least squares method, we obtain:
[0046] a(x)=A -1 (x)B(x)y
[0047]
[0048] y = [y(x1), y(x2), y(x3)]
[0049] Where w(xx) i The weight function () is used to control the smoothness of the fit. After the point cloud P1 is smoothed by moving least squares, P2 is obtained. Its point cloud is more concise and the surface is smoother, which is beneficial to subsequent processing steps.
[0050] Step (4) of point cloud segmentation includes the following steps:
[0051] (4-1) The RANSAC method is used to fit the point cloud P2 of the locking mechanism to a plane. The RANSAC method involves multiple iterations. In the k-th iteration, a subset M of the point cloud is randomly selected from P2. K M is calculated using the minimum variance estimate. K The fitting plane parameters of the subset are then calculated, and then P2 is divided by M. K The deviations of all external points from the model are calculated, and then compared with the deviations using a predefined threshold. The error rate, number of internal points, total number of samples, and current iteration count are recorded. An iteration termination condition is set. After the iteration ends, the point cloud estimation plane with the most internal points is selected as the fitting plane l1 for the bottom surface of the locking mechanism, and its corresponding normal vector is n1.
[0052] (4-2) Take the points in the locking mechanism point cloud P2 that are within a certain distance from the fitting plane as the bottom point cloud P. 21 The remaining part serves as the point cloud P of the lock head. 22 For P 21 P 22 Label them 1 and 2 respectively.
[0053] The point cloud registration in step (5) includes the following steps:
[0054] (5-1) The FPFH 3D descriptor is used to find the correspondence between the target point cloud and the template point cloud. FPFH is a pose-invariant real-time 3D descriptor that mainly describes the local geometric features of the point cloud. For a given point, its FPFH is a weighted sum of the feature histograms:
[0055]
[0056] Where SPFH is a simplified feature histogram, p i Let w be a neighborhood point of p. i For p i The Euclidean distance to p. The SPFH calculation process is as follows:
[0057] 1. Establish the relationship between p and each neighboring point p. i The local coordinate system has orthogonal coordinate axes (u,v,ω):
[0058] u=n s
[0059]
[0060] ω=u×v
[0061] 2. Establish feature f based on the local coordinate system and normal vector:
[0062] α=v·n i
[0063]
[0064] θ = arctan(ω·n) i ,u·n i )
[0065] f = <α,φ,θ>
[0066] 3. Perform statistical analysis on feature f and calculate its corresponding histogram. Specifically, divide each angle in the feature vector into 11 equal parts, resulting in a total of 33 dimensions. Place the feature into the corresponding dimension to obtain the corresponding SPFH feature.
[0067] (5-2) The point cloud segmentation results are fused into the FPFH feature histogram. The improved FPFH features are:
[0068] FPFH * =<FPFH,μL>
[0069] Where L∈{1,2} are the labels for point cloud semantic segmentation, and μ is a hyperparameter. This feature descriptor ensures that the point cloud can combine local and global features simultaneously in the subsequent matching process, enabling points with the same semantic labels to be matched, thereby reducing mismatches and improving the accuracy and speed of subsequent point cloud registration steps.
[0070] (5-3) After obtaining the FPFH features, let P be the target point cloud captured by the 3D camera and processed by the aforementioned steps. s Its FPFH characteristics are denoted as F(P s Let Q be the template point cloud sampled from the CAD model. m Its FPFH characteristic is denoted as F(Q) m The purpose of point cloud registration is to obtain Q. m To P s attitude transformation matrix T sm First, a KD-tree is used for feature point matching. For each p... s ∈P s Searching for F(Q) m ) in the distance F(p s The nearest point F(q) m ), q m With p s As a pair of matching points, similarly for each q m ∈P m This yields another set of matching points. These matching points are then further filtered using interchangeability and triangulation tests to determine the final matching relationships.
[0071] (5-4) Use the RANSAC method to obtain the pose estimate T sm The process is as follows:
[0072] 1. From the above matching relationships, randomly select 3 pairs of matching points, perform SVD odd value decomposition, and calculate the transformed pose T.
[0073] 2. Calculate the error between the two point cloud images based on T. Where h(·) is Huber Loss.
[0074] 3. Repeat (1) and (2) until l is less than the threshold ξ or the number of iterations n ≥ 100.
[0075] 4. Take the pose T with the smallest l value among all iterations as the output T. sm .
[0076] Finally, ICP is used to estimate the pose T. sm The precise registration yields a more accurate T sm .
[0077] Step 6: Battery swapping positioning system device.
[0078] A system device for positioning a battery pack locking mechanism, such as Figure 3 As shown, the system includes: a 3D camera, a visual positioning information processor, and an Ethernet communication module. The 3D camera is connected to the visual positioning information processor, and the communication module between the battery swapping station's main control computer and the battery swapping robot controller is connected to the visual positioning information processor. When a vehicle enters and stops at the station, the battery swapping station and the visual positioning information processor communicate with each other. The 3D camera starts working, and the visual positioning information processor receives the RGBD image sent back by the 3D camera, processes it to obtain the corresponding locking mechanism positioning information, and simultaneously receives the status information of the battery swapping robot. Combining the status information, the visual positioning information processor sends the final positioning information to the battery swapping robot controller.
[0079] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any other way. Any modifications or equivalent changes made based on the technical essence of the present invention shall still fall within the scope of protection claimed by the present invention.
Claims
1. A method for power battery pose estimation based on machine vision point cloud segmentation, comprising the following steps, characterized in that: (1) Use a 3D vision sensor to capture RGBD images of the battery swapping scene; (2) For the vehicle chassis battery pack locking mechanism in the image, a convolutional neural network is used for target segmentation. The network uses a multi-layer residual convolutional neural network to extract image features and uses a pyramid structure to obtain multi-scale image features. After passing through a segmentation mask prediction layer, a target instance segmentation mask is output. The locking mechanism part is segmented from the original RGBD image according to the mask and projected into a point cloud through camera intrinsic parameters. ; (3) Use voxel filters to process point clouds Filtering is performed to remove noise and some outliers, and the number of point clouds is reduced to preserve the fine structure of the point cloud to the maximum extent. For the existing z-axis noise and some outliers with large deviations in the point cloud, the point cloud is smoothed using the moving least squares method to obtain the point cloud. ; (4) Use the RANSAC method to perform Planar segmentation of the point cloud yields a fitted plane of the bottom surface of the locking mechanism. Its corresponding normal vector is Based on the planar segmentation results, the point cloud of the locking mechanism is divided into the bottom surface and the lock head, and the point cloud is given global semantic information. (5) Use FPFH 3D descriptor to find the correspondence between the target point cloud and the template point cloud. After calculating the FPFH features, combine the content of step (4) to integrate the point cloud segmentation results into the FPFH feature histogram. This descriptor can ensure that the point cloud can combine local features and global features in the subsequent matching process, so that points with the same semantic labels can be matched, thereby reducing mismatches. Perform point cloud registration according to the template point cloud, use KD tree to match feature points, find corresponding matching points for the source point cloud and the template point cloud respectively, and filter the matching points to obtain the matching relationship. Then use RANSAC method to obtain pose estimation for the matching points. Step (5) Point cloud registration of the locking mechanism includes the following steps: (5-1) Calculate the FPFH 3D descriptor; (5-2) Integrate the point cloud segmentation results into the FPFH feature histogram; The improved FPFH features are as follows: ; in, Labels for point cloud semantic segmentation. It is a hyperparameter; (5-3) First, KD tree is used to match feature points, and the matching points are filtered through interchangeability test and triangulation test to obtain matching relationships; (5-4) Use the RANSAC method to obtain pose estimation Finally, the ICP method is used. The precise registration yields more accurate results. .
2. The method for power battery pose estimation based on machine vision point cloud segmentation according to claim 1, characterized in that, The method for setting up the vision sensor in step (1) is as follows: The vision sensor is fixed at a position 0.5 meters below the bottom of the battery swapping platform, in an eye-to-hand configuration. The vision sensor requires calibration testing before use, and its relative pose to the battery swapping station coordinate system is as follows: The visual sensor captures images of the car chassis battery pack above, obtaining point cloud images that include the car chassis battery pack and part of the battery swapping station structure. The holes on the surface of the battery pack are feature markers used for positioning.
3. The power battery pose estimation method based on machine vision point cloud segmentation according to claim 1, characterized in that, Step (2) of convolutional neural network target segmentation includes the following steps; (2-1) Use a convolutional neural network to segment the target and output an instance segmentation mask. The output mask is the membership probability p of each image pixel to the foreground and background. Select all pixels with a membership probability p greater than 0.5 as the segmentation template for the locking mechanism target. (2-2) Through the camera's internal parameters The matrix projects the pixels of this depth map into three-dimensional space, converting it into a point cloud. .
4. The power battery pose estimation method based on machine vision point cloud segmentation according to claim 1, characterized in that, The point cloud filtering in step (3) includes the following steps: (3-1) First, voxel filtering is performed, and the point cloud is input into the locking mechanism. A 3D voxel grid is constructed, the centroid of the point cloud within each voxel is calculated, and this centroid is used as the output point cloud to obtain the filtered point cloud. ; (3-2) Performed using the moving least squares method Smoothing of point cloud along the z-axis The point cloud is obtained after moving least squares smoothing. .
5. The method for power battery pose estimation based on machine vision point cloud segmentation according to claim 1, characterized in that, Step (4) Point cloud segmentation of the locking mechanism includes the following steps: (4-1) Point cloud of locking mechanism The RANSAC method is used for plane fitting, and the point cloud estimation plane with the most interior points is selected as the fitting plane for the bottom surface of the locking mechanism. Its corresponding normal vector is ; (4-2) Point cloud of locking mechanism Points within a certain distance of the fitted plane are used as the base point cloud. The remaining part serves as a key cloud. ,right , Label each .
Citation Information
Patent Citations
Multi-type battery pack visual positioning method and system device for battery replacement robot
CN115272655A
Classification recognition and pose estimation method for small targets with similar structures
CN116543217A
