Vehicle battery positioning and grabbing method and system and electronic equipment
By scanning the side of the heavy truck battery to obtain a set of effective location points and fitting them, the rotation angle and moving distance of the gripping device are calculated. This solves the problems of long positioning cycle and insufficient clamping force of heavy truck batteries, and realizes an efficient and stable battery gripping and battery swapping process, reducing operation and maintenance costs.
Patent Information
- Application Number
- CN202511824507.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-05
- Publication Date
- 2026-01-27
AI Technical Summary
Existing technologies for heavy-duty truck batteries have excessively long positioning cycles, making it difficult to adapt to the demands of high-speed production and efficient battery swapping. The gripping execution process cannot accurately locate the gripping point, the clamping force lacks adaptability to battery width, and the complex installation and debugging process, coupled with the easy contamination of the lens, leads to high maintenance costs and insufficient positioning stability.
By scanning the side of the vehicle battery to obtain a set of effective location points, fitting is performed to obtain a fitted line, the rotation angle and movement distance of the gripping device are calculated, and a fitted line reflecting the actual posture of the battery is generated using radar scanning and principal component analysis. The offset of the gripping device is calculated in combination with the battery width, simplifying the image processing process and directly calculating the gripping parameters.
It significantly reduces positioning errors, improves the stability and reliability of the gripping process, simplifies the work process, reduces the frequency of equipment maintenance, improves the efficiency of vehicle battery gripping and swapping, reduces operation and maintenance costs, and adapts to the flexible production needs of different battery models.
Smart Images

Figure CN121403389A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of battery positioning technology, and in particular to a vehicle battery positioning and grasping method, system and electronic device. Background Technology
[0002] In heavy-duty truck assembly lines and battery swapping stations, automated battery handling is a core process, and its efficiency directly affects the flow of the entire production line and the service rhythm of the battery swapping station. Due to the large size and weight of heavy-duty truck batteries, high-precision positioning is required for stable handling. If the positioning deviation is too large, it can easily lead to collision damage between the battery and the battery compartment; if the positioning cycle is too long, it will disrupt the production or battery swapping schedule. Therefore, the industry has strict requirements for the timeliness and accuracy of positioning.
[0003] Existing camera-based visual positioning methods have significant drawbacks, the core issue being excessively long positioning cycles. Firstly, image acquisition is susceptible to interference from workshop lighting and dust, requiring additional lighting equipment and involving multiple steps such as shutter triggering, exposure stabilization, and data transmission, all of which are time-consuming. Secondly, image post-processing requires multiple steps including noise reduction, edge detection, and feature matching. Encountering scratches on the battery surface or interference from other components in the background necessitates increasing algorithm iterations, further extending the positioning cycle and making it difficult to meet the demands of high-speed production and efficient battery swapping. Furthermore, the defects in the gripping execution stage are even more pronounced. The camera can only output the approximate outline coordinates of the battery, failing to accurately locate key gripping points such as the handle, leading to misalignment and potentially causing the battery to detach or be damaged. Gripping devices often employ fixed clamping forces without adjustment based on battery width, resulting in minor issues like battery slippage and damage to the outer coating, or even severe damage to the plastic casing.
[0004] In addition, the camera installation and debugging process is complicated, requiring precise adjustment of height and angle. If the heavy truck is parked off-center, the parameters need to be recalibrated. The camera lens is also prone to accumulating dust and oil, requiring regular cleaning. This not only increases maintenance costs, but if cleaning is not timely, it will also reduce the positioning success rate, causing production to stop or power replacement to be interrupted.
[0005] The long cycle and low adaptability of existing methods have become the core bottleneck restricting the improvement of the efficiency of automated battery grabbing in heavy trucks. There is an urgent need for a more efficient, simpler, more anti-interference and more adaptable technical solution. Summary of the Invention
[0006] Therefore, the technical problem to be solved by the present invention is to overcome the defects of the prior art, such as excessively long positioning cycle, difficulty in adapting to the needs of high-speed production and efficient battery swapping, inability to accurately locate the gripping point in the gripping execution stage, lack of adaptability of the clamping force to the battery width, complex installation and debugging, easy contamination of the lens leading to high maintenance costs, and insufficient positioning stability.
[0007] In a first aspect, to solve the above-mentioned technical problems, the present invention provides a vehicle battery positioning and grasping method, comprising: S1. Scan the side of the vehicle battery to obtain a set of valid location points; S2. Fit the set of effective location points to obtain a fitting line; S3. Obtain the target center point and deflection angle of the fitted line; calculate the rotation angle of the gripping device based on the deflection angle; calculate the moving distance of the gripping device based on the target center point, the rotation angle, and the width of the vehicle battery to obtain the moving distance of the gripping device in the X direction and the moving distance in the Y direction. S4. The gripping device grips the vehicle battery according to the rotation angle, the X-direction movement distance, and the Y-direction movement distance.
[0008] In one embodiment of the present invention, in step S3, the expression for calculating the rotation angle of the gripping device based on the deflection angle is as follows: ; in, Indicates the rotation angle. This indicates the angle of deflection of the fitted line. When indicating the reference point mark, the angle between the side of the battery and the X-axis is shown. This represents a proportional parameter.
[0009] In one embodiment of the present invention, step S3, which involves calculating the moving distance of the gripping device based on the target center point, the rotation angle, and the width of the vehicle battery, to obtain the moving distance in the X direction and the moving distance in the Y direction of the gripping device, is as follows: The coordinates of the target center point are acquired in real time, wherein the coordinates include the X coordinate and the Y coordinate. Obtain the width of the vehicle battery; The X-direction movement distance of the gripping device is calculated based on the X-coordinate, the width, and the rotation angle; the Y-direction movement distance of the gripping device is calculated based on the Y-coordinate, the width, and the rotation angle.
[0010] In one embodiment of the present invention, the expression for calculating the X-direction movement distance of the gripping device based on the X coordinate, the width, and the rotation angle is as follows: ; in, This indicates the distance the gripping device moves in the X direction. This represents the real-time X-coordinate of the target center point of the fitted line; This indicates the X-coordinate of the location marked on the side of the vehicle battery. Indicates the width of the vehicle battery. This indicates the rotation angle of the gripping device.
[0011] In one embodiment of the present invention, the expression for calculating the Y-direction movement distance of the gripping device based on the Y-coordinate, the width, and the rotation angle is as follows: ; in, This indicates the distance the gripping device moves in the Y direction. This represents the real-time Y-coordinate of the target center point of the fitted line; This indicates the Y-coordinate of the location marked on the side of the vehicle battery. Indicates the width of the vehicle battery. This indicates the rotation angle of the gripping device.
[0012] In one embodiment of the present invention, the step of fitting the effective location point set to obtain a fitted line in step S2 is as follows: The set of valid location points includes multiple valid location points, and each valid location point includes a first coordinate and a second coordinate; traverse all valid location points, and calculate the first accumulated value of the first coordinate, the second accumulated value of the second coordinate, the third accumulated value of the square of the first coordinate, the fourth accumulated value of the square of the second coordinate, and the fifth accumulated value of the product of the first coordinate and the second coordinate for each valid location point; The first centroid coordinates and the second centroid coordinates are calculated based on the total number of valid position points, the first accumulated value, and the second accumulated value. Calculate the angle of the fitted line based on the first accumulated value, the second accumulated value, the third accumulated value, the fourth accumulated value, and the fifth accumulated value; obtain the minimum and maximum values of the projected scalar based on the angle of the fitted line and by traversing all the valid position points. Based on the minimum value, the maximum value, the first centroid coordinates, and the second centroid coordinates, the starting point and the ending point of the fitted line are obtained; based on the starting point and the ending point, the set of effective position points is fitted to obtain the fitted line.
[0013] In one embodiment of the present invention, the expression for calculating the angle between the fitted lines is: ; ; ; ; in, This represents the third accumulated value. This represents the fourth accumulated value. This represents the fifth accumulated value; and These represent the first accumulated value and the second accumulated value, respectively. This represents the total number of valid location points. Represents the arctangent function. and Represents a constant.
[0014] In one embodiment of the present invention, in step S3, the expression for obtaining the deflection angle of the fitted line is: ; in, This indicates the angle of deflection of the fitted line. Indicates the coordinates of the starting point of the fitted line. This represents the coordinates of the endpoint of the fitted line.
[0015] Secondly, to solve the above-mentioned technical problems, the present invention provides a vehicle battery positioning and grasping system for implementing the above-mentioned vehicle battery positioning and grasping method, comprising: The scanning module is used to scan the side of the vehicle battery to obtain a set of valid location points; The fitting module is used to fit the set of effective location points to obtain a fitting line; The coordinate transformation module is used to obtain the target center point and deflection angle of the fitted line, calculate the rotation angle of the gripping device based on the deflection angle, and calculate the moving distance of the gripping device based on the target center point, the rotation angle and the width of the vehicle battery to obtain the moving distance of the gripping device in the X direction and the moving distance in the Y direction. The grasping module is used to drive the grasping device to grasp the vehicle battery according to the rotation angle, the X-direction movement distance, and the Y-direction movement distance.
[0016] Thirdly, to solve the above-mentioned technical problems, the present invention provides an electronic device, including: a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the above-mentioned method are performed.
[0017] Compared with the prior art, the above-described technical solution of the present invention has the following advantages: (1) The vehicle battery positioning and grasping method, system and electronic device described in this invention obtains an effective set of position points by scanning the side of the vehicle battery and fitting them to obtain a fitting line that can truly reflect the actual placement posture of the battery, effectively avoiding positioning errors caused by deviations of a single position point. Using the target center point of the fitting line as a reference, the offset of the grasping device is calculated in combination with the battery width to ensure that the grasping device is accurately aligned with the center of the battery, significantly reducing the risk of clamping and collision, and ensuring the stability and reliability of the grasping process.
[0018] (2) This invention does not require complex image processing procedures and multi-device collaborative calibration. It can quickly obtain grasping parameters by simply fitting point sets and directly converting coordinates and rotation angles, which greatly shortens the positioning and operation preparation cycle. At the same time, the rotation angle and movement coordinates are calculated synchronously, which enables the grasping system to complete the attitude adjustment and position movement in one go without step-by-step debugging, simplifying the operation process and improving the overall efficiency of vehicle battery grasping and battery swapping.
[0019] (3) This invention does not require additional auxiliary equipment and procedures such as supplementary lighting and regular cleaning, effectively reducing the frequency of equipment maintenance and operation and maintenance costs. The capture parameter calculation relies on the data obtained by its own scanning, which has good fault tolerance for slight deviations in vehicle parking, reduces the stringent requirements for workstation calibration, reduces the frequency of manual intervention, and improves the convenience and continuity of operation. Attached Figure Description
[0020] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings.
[0021] Figure 1 This is a flowchart of a vehicle battery positioning and acquisition method according to a preferred embodiment of the present invention; Figure 2 This is a schematic diagram of a fitted line obtained by fitting an effective set of position points in a preferred embodiment of the present invention; Figure 3 This is a schematic diagram of the fitted line obtained by fitting another set of effective position points in a preferred embodiment of the present invention; Figure 4 This is a structural diagram of a vehicle battery positioning and grasping system according to a preferred embodiment of the present invention. Detailed Implementation
[0022] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.
[0023] Example 1: Reference Figure 1As shown, this embodiment of the invention provides a vehicle battery location and acquisition method, including but not limited to the following steps: S1. Scan the side of the vehicle battery to obtain a set of valid location points; S2. Fit the effective location point set to obtain the fitted line; S3. Obtain the target center point and deflection angle of the fitted line. Calculate the rotation angle of the gripping device based on the deflection angle. Calculate the moving distance of the gripping device based on the target center point, rotation angle, and width of the vehicle battery to obtain the X-direction and Y-direction moving distances of the gripping device. S4. The gripping device grips the vehicle battery based on the rotation angle, the distance moved in the X direction, and the distance moved in the Y direction.
[0024] This invention discloses a vehicle battery positioning and gripping method. It obtains a set of effective location points by scanning the side of the vehicle battery and fitting a fitted line. The fitted line accurately reflects the actual placement posture of the battery, effectively avoiding positioning errors caused by deviations from single location points. Using the target center point of the fitted line as a reference, and combining it with the battery width to calculate the gripping device offset, it ensures precise alignment between the gripping device and the battery center, significantly reducing the risk of clamping and collision, and guaranteeing the stability and reliability of the gripping process. This method eliminates the need for complex image processing procedures and multi-device collaborative calibration. Gripping parameters can be quickly obtained through point set fitting and direct conversion of coordinates and rotation angles, greatly shortening the positioning and preparation cycle. Simultaneously, the rotation angle and movement coordinates are calculated synchronously, allowing the gripping device to complete posture adjustment and position movement in one step, eliminating the need for step-by-step debugging, simplifying the workflow, and improving the overall efficiency of vehicle battery gripping and swapping. Regarding enhanced environmental adaptability and model compatibility, the offset can be flexibly adjusted using the battery width parameter to accommodate the gripping needs of different vehicle battery models, without frequent replacement of gripping components or adjustment of equipment programs, meeting the practical application needs of flexible production and multi-model battery swapping. Furthermore, the method described in this embodiment of the invention does not require additional auxiliary equipment and procedures such as supplementary lighting and regular cleaning, reducing the frequency of equipment maintenance and operation and maintenance costs; the calculation of capture parameters relies on the data obtained by its own scanning, which has good fault tolerance for slight deviations in vehicle parking, reduces the stringent requirements for workstation calibration, reduces the frequency of manual intervention, and improves the convenience and continuity of operation.
[0025] Specifically, in step S1, the scanning method for the side of the vehicle battery in this embodiment of the invention is not limited to a single method. Various devices such as laser scanners, ultrasonic sensors, infrared sensors, and radar can be used, each with its own advantages in specific scenarios. Laser scanners offer high scanning accuracy and can precisely capture the fine contours of the battery side, making them suitable for scenarios with stringent positioning accuracy requirements. Ultrasonic sensors have strong penetrating power, can operate stably in lightly dusty environments, and are adaptable to a wide range of battery surface materials. Infrared sensors are unaffected by ambient light and can quickly identify the battery location even in strong or low light conditions, with a fast response speed. Radar has strong anti-interference capabilities in complex industrial scenarios and is unaffected by dust, temperature and humidity changes, or strong or low light. In this embodiment of the invention, radar is used to scan the side of the vehicle battery.
[0026] It should be noted that the radar used in this embodiment is merely an illustrative example and is not intended to limit the scanning method. In practical applications, appropriate scanning equipment can be selected based on the accuracy requirements of the scenario and environmental conditions. Furthermore, the vehicle battery described in this embodiment is applicable to various types of vehicle energy storage batteries, such as heavy-duty truck batteries, commercial vehicle batteries, passenger vehicle batteries, and new energy special vehicle batteries. No specific vehicle type (such as load capacity, power type, vehicle structure, etc.) is limited, and it can be flexibly adapted according to the actual application scenario.
[0027] Furthermore, regarding the selection of radar equipment, radar scanning frequencies such as 10Hz, 20Hz, and 30Hz can be chosen. Among them, although the scanning frequency of 10Hz has a relatively long scanning time, it offers higher accuracy. Its scanning time is approximately 100ms, which can meet the requirements of most industrial scenarios; its accuracy can reach 0.1mm, meeting the accuracy requirements of most industrial scenarios. Therefore, this embodiment of the invention preferentially selects radar equipment with a 10Hz scanning frequency for scanning vehicle batteries.
[0028] Furthermore, the specific steps for obtaining the effective location point set using radar scanning are as follows: S110. Set the radar facing the side of the battery, scan the side of the battery, and obtain a position dataset containing the coordinates of each position point and the angle between the side of the position point and the X-axis.
[0029] S120. Filter the location dataset, retaining data points whose side angle with the X-axis is within the range of 0° to 270°, and taking the direction directly facing the battery as 180°, thereby determining the points related to the battery position and forming a preprocessed location dataset. It should be noted that the aforementioned side angle range of 0° to 270° with the X-axis and the 180° battery-facing reference can be flexibly adjusted according to actual needs.
[0030] S130. Perform a second filtering on the preprocessed location dataset. First, delete discontinuous isolated points in the data that are not supported by adjacent points to eliminate environmental interference; then, remove location points in the front and rear areas of the vehicle according to a preset distance standard, finally obtaining a location point set containing only the battery body. In this embodiment of the invention, the standard for removing points in the front and rear areas is: points that extend beyond the edge of the battery body within a range of 100 mm to 300 mm.
[0031] S140. Filter the set of location points of the battery body to obtain an effective set of location points. The specific steps are as follows: S141, For sets of location points Points , … ), calculate the centroid coordinates of this point set, the calculation expression is: ; ; in, This represents the total number of points in the location point set. Indicates the center of gravity along the X-axis. This indicates the center of gravity along the Y-axis.
[0032] S142, using the calculated centroid Based on this, invalid points that deviate from the center of gravity are removed. In this embodiment of the invention, points with a distance exceeding 30 mm from the center of gravity in the X-axis direction or the Y-axis direction are determined as invalid points and discarded, thereby obtaining a set of valid location points. It should be noted that the above-mentioned 30 mm distance standard has been verified and determined through multiple sets of vehicle battery scanning experiments, which can ensure the effectiveness of the filtered point set.
[0033] This invention employs radar to scan the side of a vehicle battery to acquire raw position data. The raw data is then refined through multiple rounds of filtering (including filtering battery-related points by angle range, deleting discontinuous isolated points, and removing redundant points at the front and rear of the vehicle). Finally, by calculating the centroid of the position point set and filtering to remove invalid points according to a preset spacing threshold, a set of effective position points accurately reflecting the battery's main outline is obtained. The advantages of this design are: radar requires no supplemental lighting, can stably acquire coordinate and angle information, avoids light and dust interference, and the dual information output reduces positioning deviation; the multi-round filtering first locks battery-related points by angle, then removes isolated points and redundant points at the front and rear of the vehicle, improving data purity and reducing fitting errors. Simultaneously, a three-layer anti-interference barrier adapts to complex industrial scenarios, and centroid filtering removes extreme points, ensuring the point set closely matches the battery outline. Furthermore, the process involves no complex algorithms, is fast, has low computational load, and radar maintenance costs are lower than cameras, reducing rework and balancing accuracy, efficiency, and economy.
[0034] Specifically, in step S2, the effective location point set is fitted to obtain a fitted line. The fitting method can be compositional analysis or quadratic interpolation. Since the side shape of the vehicle battery is complex and the scanned data may have an irregular distribution, a method that can accurately capture the inherent structure of the data and process it efficiently is needed. Compositional analysis performs excellently in this regard; it can accurately reflect complex contours and local changes, generate a fitting line that closely resembles reality, and has high computational efficiency, making it suitable for large-scale data processing and real-time applications, thus improving fitting accuracy and system operating efficiency. Therefore, in this embodiment of the invention, compositional analysis is preferably used to fit the effective location point set to obtain a more accurate fitted line.
[0035] Furthermore, the specific steps for fitting the effective location point set using compositional analysis are as follows: S210. The set of valid location points includes multiple valid location points. Each valid location point includes a first coordinate (i.e., the coordinate in the X direction, denoted by the symbol). (represented by) and second coordinate (i.e., coordinate in the Y direction, denoted ... symbol (Representation). Iterate through all valid position points and calculate the first accumulated value of the first coordinate of each valid position point. The second accumulated value of the second coordinate The third accumulated value of the square of the first coordinate The fourth accumulated value of the square of the second coordinate. The fifth accumulated value of the product of the first and second coordinates .
[0036] S220, Based on the total number of valid location points First accumulated value Second accumulated value The coordinates of the first centroid were calculated. Second centroid coordinates The specific calculation formula is as follows: ; .
[0037] S230, Based on the first accumulated value Second accumulated value Third accumulated value Fourth accumulated value and the fifth accumulated value Calculate the angle between the fitted lines The expression for the angle between the fitted lines is: ; ; ; ; in, Represents the arctangent function. and This represents a constant. In embodiments of the present invention, The preferred value is 0.5. The preferred value is 2.
[0038] S240, Based on the angle of the fitted line Iterate through all valid locations to obtain the projected scalar. minimum value and maximum value The specific steps are as follows: S241, Randomly set minimum value and maximum value The value of .
[0039] S242. Select valid location points from the set of valid location points. Calculate the projected scalar Its calculation expression is: ; in, , .
[0040] S243. Compare the current projected scalar. With the existing minimum value If the projected scalar Less than the existing minimum value Then the current projected scalar The value assigned to At the same time, compare the current projected scalar. Compared with the existing maximum value If the projected scalar Greater than the existing maximum value Then the current projected scalar The value assigned to .
[0041] S244. Repeat steps S242 to S243 for all valid location points until all valid location points have been traversed, thereby obtaining the minimum value of the projected scalar. and maximum value .
[0042] S250, Based on the minimum value Maximum value First centroid coordinates Second centroid coordinates The starting point of the fitted line is obtained. and end point Among them, the starting point and end point The calculation expression is: ; .
[0043] Furthermore, based on the starting point and end point By fitting the effective set of location points, a fitted line is obtained.
[0044] This invention, through precise calculation of accumulated values and centroid coordinates, combined with accurate solution of the angle between the fitted lines, can generate fitted lines that closely resemble actual data, improving fitting accuracy and providing a more reliable data foundation for subsequent analysis. Furthermore, by adjusting constants... and This allows for further optimization of the fitting results, adapting to different application scenarios and data characteristics, thereby better meeting diverse needs.
[0045] Specifically, in step S3, the midpoint of the fitted line obtained in step S2 is calculated, and this midpoint is used as the target center point of the positioning reference. (Refer to...) Figures 2 to 3 As shown in the figure, the scattered points are the valid location points finally obtained in step S1. The fitted line runs through the cluster of scattered points and reflects the trend of the battery's side profile. In this embodiment of the invention, the gripping device is preferably a lifting device. The specific steps for converting the real-time measured battery positioning data into the lifting device's movement coordinates are as follows: S310. Before converting to moving coordinates, a reference position for the lifting device and the vehicle battery must be selected. This reference position serves as the benchmark for subsequent coordinate transformation and attitude adjustment. In this embodiment of the invention, the specific selection criteria for the reference position are as follows: the lifting device must be in an ideal gripping position (i.e., the gripping mechanism of the lifting device is completely aligned with the preset gripping point of the battery, without horizontal offset or vertical misalignment), and the vehicle battery must be kept horizontal (the side of the battery is parallel to the horizontal plane, without front-back or left-right tilt). After both the lifting device and the battery reach the above reference position, the key parameters of the current lifting device are recorded. These parameters must cover the core information required for subsequent positioning adjustments, including but not limited to: the current three-dimensional coordinates of the lifting device (position in the X-axis, Y-axis, and Z-axis directions), the initial rotation angle of the gripping mechanism of the lifting device (with the preset benchmark direction as a reference), and the relative distance between the lifting device and the battery gripping point. This provides a benchmark reference for subsequently converting the battery positioning data into the lifting device's moving coordinates, ensuring the accuracy of subsequent adjustments.
[0046] Furthermore, the starting point of the fitted line The coordinates are End point of the fitted line The coordinates are Based on the start and end points of the fitted line, obtain the target center point of the fitted line. and the angle of deflection The calculation formula is: ; ; in, , This represents the inverse cosine function.
[0047] S320. Based on the reference point position, calculate the required rotation angle of the lifting device. The specific expression is: ; in, This represents the deflection angle of the fitted line, which reflects the real-time deflection angle of the battery side during radar measurement. When indicating the reference point mark, the angle between the side of the battery and the X-axis is shown. This represents the experimental scale parameter determined based on the radar installation and hoisting conditions. In this embodiment of the invention, the experimental scale parameter is preferably 2.67.
[0048] S330. Real-time acquisition of the target center point coordinates; based on the coordinates, rotation angle, and vehicle battery width, offset transformations are performed on the X and Y directions of the lifting device to obtain the movement coordinates of the gripping device (lifting device). The specific steps are as follows: S331. Real-time acquisition of the two-dimensional coordinates of the target center point The two-dimensional coordinates include the X coordinate. and Y coordinate .
[0049] S332. Obtain the width of the vehicle battery. This width parameter is either a preset standard width value for the vehicle battery or the actual width of the battery extracted from previous scanning data, used to compensate for the positional difference between the gripper's grabbing center and the target center point on the side of the battery.
[0050] S333. Based on the X coordinate, vehicle battery width, and rotation angle, calculate the distance the gripping device moves in the X direction. The calculation formula is: ; in, This represents the real-time X-coordinate of the target center point of the fitted line. The X-coordinate can reflect the real-time X-coordinate of the center point of the side of the vehicle battery. The X-coordinate represents the location of the battery marking on the side of the vehicle. Indicates the width of the vehicle's battery. This represents the sine value of the spreader's rotation angle. This calculation ensures that the spreader is precisely aligned with the battery gripping center in the X direction by compensating for the half-width projection of the battery width (the X-direction deviation caused by the rotation angle) and the initial offset of the spreader.
[0051] Furthermore, based on the Y-coordinate, the width of the vehicle battery, and the rotation angle, the moving distance of the gripping device in the Y direction is calculated. The distance moved in the Y direction. The calculation formula is: ; in, This represents the real-time Y-coordinate of the center point on the side of the vehicle battery. The Y-coordinate representing the location of the battery marking on the side of the vehicle. This represents the cosine value of the spreader's rotation angle. This calculation compensates for the positional deviation of the battery's half-width in the Y direction caused by the rotation angle, and combines this with the initial offset correction of the spreader to ensure that the spreader is precisely aligned with the battery gripping center in the Y direction.
[0052] Furthermore, based on the first moving distance Second movement distance The movement coordinates of the gripping device are obtained. This coordinate system can be used to control the spreader's movement to a position aligned with the battery gripping center.
[0053] This invention's embodiments consider the impact of battery width and the lifting device's rotation angle on positioning during coordinate transformation, ensuring the lifting device is precisely aligned with the battery's center point. The use of a cosine function for Y-direction offset transformation better reflects actual physical characteristics. Furthermore, the explicit consideration of battery width in this invention's embodiments not only serves for coordinate offset calculations but also provides width parameters for the gripping device (lifting device), enabling it to adaptively adjust the clamping force according to the width of batteries from different vehicle models. This balances gripping stability with battery safety, avoiding the risk of battery damage or detachment due to improper clamping force.
[0054] Specifically, in step S4, based on the movement coordinates obtained in step S3, a grabbing command is sent to the spreader control system. The specific steps are as follows: S410, the parameters of the grab command include the rotation angle. Distance of movement and distance traveled In this embodiment of the invention, the height of the lifting device is set to a fixed value. Check the rotation angle. Whether it is within the allowable rotation angle range (e.g., 0°~360°), and the distance traveled. and Check if the movement is within the spreader's travel range. If any parameter exceeds the preset range, an error message will be issued, the grabbing operation will be terminated, and an error message will be returned.
[0055] S420. Reconfirm the battery position using sensors or a vision system to ensure it matches the movement coordinates obtained in step S3, guaranteeing accurate battery positioning. Detect any obstacles or other interfering factors around the lifting device to ensure it does not collide with other components during movement and gripping, thus ensuring operational safety.
[0056] S430 sends a gripping command to the lifting device control system (such as a PLC) via the industrial bus. The command includes the rotation angle. Distance of movement and Parameters such as rotation angle, travel distance, and gripping action are monitored in real time using the Modbus / TCP protocol to ensure the spreader executes instructions accurately. If any abnormality occurs during operation, an alarm is issued promptly and appropriate safety measures are taken.
[0057] In this invention, vehicle battery positioning and grasping is achieved by using radar scanning of the battery's side to acquire position information. Radar does not rely on supplementary lighting equipment, and can stably collect data even in industrial environments with unstable lighting and high dust levels, effectively avoiding positioning deviations caused by environmental interference common with traditional cameras. For the effective position points acquired through scanning, principal component analysis is used for fitting, accurately generating a fitted line reflecting the actual contour trend of the battery, eliminating the influence of single outliers on positioning, and reducing data deviation. In the subsequent PLC coordinate transformation step, the offsets in the X and Y axes are calculated using sine and cosine functions, respectively, based on the vehicle battery width parameter and the lifting device rotation angle. This not only accurately compensates for positioning deviations caused by battery width and lifting device rotation but also corrects the initial position offset of the lifting device, ensuring that the lifting device can accurately align with the battery grasping point, fundamentally avoiding grasping offset problems. Simultaneously, radar scanning and principal component analysis fitting do not require complex image processing procedures; the PLC coordinate transformation can directly output the lifting device's movement coordinates, enabling rapid control of the lifting device's position adjustment and significantly shortening the positioning and grasping cycle. Furthermore, based on the offset calculation of the battery width, width parameters can be simultaneously provided to the lifting device, assisting it in adaptively adjusting the clamping force to avoid battery detachment due to excessively loose clamping or battery damage due to excessively tight clamping. Through this design, the lifting device can accurately move to the target position according to instructions to complete the battery grabbing operation. Experimental verification shows that the positioning accuracy can reach ±2mm, fully meeting the requirements for grabbing accuracy in industrial scenarios. Therefore, the method described in this embodiment improves the positioning accuracy of vehicle battery swapping, shortens the swapping time, and thus effectively improves the automated grabbing efficiency of vehicle batteries.
[0058] Example 2: Based on the same inventive concept, this embodiment provides a vehicle battery positioning and grasping system. The principle of solving the problem is similar to that of the vehicle battery positioning and grasping method provided in Embodiment 1, and the repeated parts will not be described again.
[0059] Reference Figure 4 As shown, this embodiment provides a vehicle battery positioning and grasping system for implementing the vehicle battery positioning and grasping method described in Embodiment 1, including: The scanning module is used to scan the side of the vehicle battery to obtain a set of valid location points; The fitting module is used to fit the set of valid location points to obtain a fitted line; The coordinate transformation module is used to obtain the target center point and deflection angle of the fitted line, and calculate the rotation angle of the gripping device based on the deflection angle; based on the target center point, rotation angle and width of the vehicle battery, the moving distance of the gripping device is calculated to obtain the moving distance of the gripping device in the X direction and the moving distance in the Y direction. The gripping module is used to drive the gripping device to grip the vehicle battery based on the rotation angle, the distance moved in the X direction, and the distance moved in the Y direction.
[0060] Example 3: This embodiment provides an electronic device, including a processor and a memory. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the vehicle battery positioning and grasping method described in Embodiment 1 are performed.
[0061] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0062] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.
[0063] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0064] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0065] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A method for locating and grasping a vehicle battery, characterized in that, include: S1. Scan the side of the vehicle battery to obtain a set of valid location points; S2. Fit the set of effective location points to obtain a fitting line; S3. Obtain the target center point and deflection angle of the fitted line; calculate the rotation angle of the gripping device based on the deflection angle; calculate the moving distance of the gripping device based on the target center point, the rotation angle, and the width of the vehicle battery to obtain the moving distance of the gripping device in the X direction and the moving distance in the Y direction. S4. The gripping device grips the vehicle battery according to the rotation angle, the X-direction movement distance, and the Y-direction movement distance.
2. The vehicle battery positioning and grasping method according to claim 1, characterized in that, In step S3, the expression for calculating the rotation angle of the gripping device based on the deflection angle is as follows: ; in, Indicates the rotation angle. This indicates the angle of deflection of the fitted line. When indicating the reference point mark, the angle between the side of the battery and the X-axis is shown. This represents a proportional parameter.
3. The vehicle battery positioning and grasping method according to claim 1, characterized in that, In step S3, the step of calculating the moving distance of the gripping device based on the target center point, the rotation angle, and the width of the vehicle battery, to obtain the moving distance of the gripping device in the X direction and the moving distance in the Y direction, is as follows: The coordinates of the target center point are acquired in real time, wherein the coordinates include the X coordinate and the Y coordinate. Obtain the width of the vehicle battery; The X-direction movement distance of the gripping device is calculated based on the X-coordinate, the width, and the rotation angle; the Y-direction movement distance of the gripping device is calculated based on the Y-coordinate, the width, and the rotation angle.
4. The vehicle battery positioning and grasping method according to claim 3, characterized in that, Based on the X coordinate, the width, and the rotation angle, the expression for calculating the X-direction movement distance of the gripping device is as follows: ; in, This indicates the distance the gripping device moves in the X direction. This represents the real-time X-coordinate of the target center point of the fitted line; This indicates the X-coordinate of the location marked on the side of the vehicle battery. Indicates the width of the vehicle battery. This indicates the rotation angle of the gripping device.
5. The vehicle battery positioning and grasping method according to claim 3, characterized in that, Based on the Y-coordinate, the width, and the rotation angle, the expression for calculating the Y-direction movement distance of the gripping device is as follows: ; in, This indicates the distance the gripping device moves in the Y direction. This represents the real-time Y-coordinate of the target center point of the fitted line; This indicates the Y-coordinate of the location marked on the side of the vehicle battery. Indicates the width of the vehicle battery. This indicates the rotation angle of the gripping device.
6. The vehicle battery positioning and grasping method according to claim 1, characterized in that, In step S2, the step of fitting the effective location point set to obtain the fitted line is as follows: The set of valid location points includes multiple valid location points, and each valid location point includes a first coordinate and a second coordinate; traverse all valid location points, and calculate the first accumulated value of the first coordinate, the second accumulated value of the second coordinate, the third accumulated value of the square of the first coordinate, the fourth accumulated value of the square of the second coordinate, and the fifth accumulated value of the product of the first coordinate and the second coordinate for each valid location point; The first centroid coordinates and the second centroid coordinates are calculated based on the total number of valid position points, the first accumulated value, and the second accumulated value. Calculate the angle of the fitted line based on the first accumulated value, the second accumulated value, the third accumulated value, the fourth accumulated value, and the fifth accumulated value; obtain the minimum and maximum values of the projected scalar based on the angle of the fitted line and by traversing all the valid position points. Based on the minimum value, the maximum value, the first centroid coordinates, and the second centroid coordinates, the starting point and the ending point of the fitted line are obtained; based on the starting point and the ending point, the set of effective position points is fitted to obtain the fitted line.
7. A vehicle battery positioning and grasping method according to claim 6, characterized in that, The expression for calculating the angle between the fitted lines is: ; ; ; ; in, This represents the third accumulated value. This represents the fourth accumulated value. This represents the fifth accumulated value; and These represent the first accumulated value and the second accumulated value, respectively. This represents the total number of valid location points. Represents the arctangent function. and Represents a constant.
8. The vehicle battery positioning and grasping method according to claim 1, characterized in that, In step S3, the expression for obtaining the deflection angle of the fitted line is: ; in, This indicates the angle of deflection of the fitted line. Indicates the coordinates of the starting point of the fitted line. This represents the coordinates of the endpoint of the fitted line.
9. A vehicle battery positioning and grasping system, used to implement the vehicle battery positioning and grasping method as described in any one of claims 1 to 8, characterized in that, include: The scanning module is used to scan the side of the vehicle battery to obtain a set of valid location points; The fitting module is used to fit the set of effective location points to obtain a fitting line; The coordinate transformation module is used to obtain the target center point and deflection angle of the fitted line, calculate the rotation angle of the gripping device based on the deflection angle, and calculate the moving distance of the gripping device based on the target center point, the rotation angle and the width of the vehicle battery to obtain the moving distance of the gripping device in the X direction and the moving distance in the Y direction. The grasping module is used to drive the grasping device to grasp the vehicle battery according to the rotation angle, the X-direction movement distance, and the Y-direction movement distance.
10. An electronic device, characterized in that, include: A processor and a memory, the memory storing computer-readable instructions that, when executed by the processor, perform the steps of the method as described in any one of claims 1 to 8.