Battery replacement method, device and equipment and storage medium
By locating the battery compartment of the target device and adjusting its movement path in real time, the accuracy and efficiency issues of battery replacement for smart devices are solved, ensuring the success rate and safety of battery replacement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-25
- Publication Date
- 2026-04-14
AI Technical Summary
Existing charging methods are inefficient and cannot meet the high-frequency, high-intensity work requirements of smart devices. How can we achieve accurate and efficient battery replacement for smart devices?
By locating the battery compartment of the target device, the motion path of the main robotic arm is determined. During the battery replacement operation, the motion path is adjusted based on the pose offset of the target device to ensure that the motion of the main robotic arm always adapts to the dynamic position of the battery compartment.
It achieves higher accuracy and success rate in battery replacement, improves the efficiency of battery replacement, and avoids path deviation caused by target device pose offset.
Smart Images

Figure CN121849094A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automation control technology, and in particular to a battery replacement method, apparatus, device and storage medium. Background Technology
[0002] With the development of artificial intelligence and smart device technologies (such as robots and autonomous vehicles), smart devices are rapidly integrating into diverse scenarios such as industrial production, services, and healthcare. However, insufficient battery life has become a bottleneck hindering the large-scale application of smart devices. Current mainstream charging methods suffer from long charging times and low efficiency, making it difficult to meet the high-frequency, high-intensity work demands of smart devices. In contrast, battery swapping, with its ability to quickly replace batteries, has become an ideal choice for improving the battery life of smart devices. Therefore, how to accurately and efficiently replace the batteries of smart devices is a problem that urgently needs to be solved. Summary of the Invention
[0003] This application provides a battery replacement method, apparatus, electronic device, computer-readable storage medium, and computer program product, which can accurately and efficiently replace batteries.
[0004] The technical solution of this application embodiment is implemented as follows: This application provides a battery replacement method, including: The battery compartment of the target device is located to obtain the battery compartment position; Based on the location of the battery compartment, the motion path of the main robotic arm is determined. The main robotic arm is used to perform a battery replacement operation on the battery in the battery compartment. According to the motion path, the main robotic arm is controlled to perform the battery replacement operation, and during the battery replacement operation, the motion path is adjusted based on the pose offset of the target device to obtain the adjusted motion path; Following the adjusted motion path, the main robotic arm is controlled to continue performing the battery replacement operation.
[0005] This application also provides a battery replacement device, including: The positioning module is used to locate the battery compartment of the target device and obtain the battery compartment position. The determination module is used to determine the movement path of the main robotic arm based on the position of the battery compartment, and the main robotic arm is used to perform a battery replacement operation on the battery in the battery compartment. The control module is used to control the main robotic arm to perform the battery replacement operation according to the motion path, and during the execution of the battery replacement operation, adjust the motion path based on the pose offset of the target device to obtain the adjusted motion path. The control module is also used to control the main robotic arm to continue performing the battery replacement operation according to the adjusted motion path.
[0006] This application also provides an electronic device, including: Memory is used to store executable instructions for a computer; The processor, when executing computer-executable instructions stored in the memory, implements the battery replacement method provided in the embodiments of this application.
[0007] This application also provides a computer-readable storage medium storing computer-executable instructions or computer programs, which, when executed by a processor, implement the battery replacement method provided in this application.
[0008] This application also provides a computer program product, including computer-executable instructions or a computer program, which, when executed by a processor, implements the battery replacement method provided in this application.
[0009] The embodiments of this application have the following beneficial effects: First, the battery compartment positioning provides an accurate motion path for the main robotic arm, avoiding blind operation; second, during the execution of the main robotic arm, the motion path of the main robotic arm is adjusted in real time according to the pose offset of the target device, ensuring that the motion of the main robotic arm always adapts to the dynamic position of the battery compartment, solving the path deviation caused by the pose offset of the target device, so that the battery replacement operation is not affected by the pose offset; thus, the accuracy and success rate of battery replacement can be guaranteed, thereby improving the efficiency of battery replacement. Attached Figure Description
[0010] Figure 1 This is a schematic diagram of the architecture of the battery replacement system provided in the embodiments of this application; Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application; Figure 3 This is a schematic diagram of the first process of the battery replacement method provided in the embodiments of this application; Figure 4 This is a schematic diagram of the second process of the battery replacement method provided in the embodiments of this application; Figure 5 This is a schematic diagram of the third process of the battery replacement method provided in the embodiments of this application; Figure 6 This is a schematic diagram of the fourth process of the battery replacement method provided in the embodiments of this application; Figure 7 This is a schematic diagram of the structure of the power swapping equipment provided in the embodiments of this application; Figure 8 This is a schematic diagram of the fifth process of the battery replacement method provided in the embodiments of this application; Figure 9 This is a flowchart illustrating the dual-arm collaborative operation provided in the embodiments of this application.
[0011] It should be noted that the terms "first" and "second" mentioned above are only used to distinguish between different options and do not represent the degree of superiority or inferiority of the options or their priority in the implementation process. Detailed Implementation
[0012] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0013] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0014] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0015] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of a larger module or unit that includes the functionality of the module or unit.
[0016] Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit this application.
[0017] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.
[0018] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0019] 1) Point cloud: A collection of numerous points, each containing three basic coordinate values (X, Y, Z) representing its position in three-dimensional space. Point cloud data is typically generated using the following methods: a) LiDAR: By emitting laser pulses and measuring the return time of the reflected light, the distance to a target object is calculated, thus generating point cloud data. b) Depth Camera: Such as Kinect and RealSense, which use infrared light or structured light technology to acquire depth information and generate point clouds. c) Stereo Vision: By capturing images of the same scene from different perspectives using binocular or multi-view cameras, depth information is calculated using the parallax principle to generate point clouds. d) 3D Scanner: A device specifically designed for high-precision scanning of the surface of three-dimensional objects, generating high-density point clouds.
[0020] 2) Path planning is a key technology for robots (such as robotic arms) and automated systems. It refers to the process of calculating a continuous and feasible motion trajectory from an initial state (position / attitude) to a target state based on the target location (such as a battery compartment) and system / environmental constraints (such as joint range of motion, obstacles, and force limitations). Its core is to generate the optimal or required path while meeting safety (obstacle avoidance, collision avoidance) and task requirements (such as accuracy and speed), ensuring precise and efficient robot movements. It is widely used in industrial robotic arm operations, autonomous driving, and other scenarios, and in some cases requires dynamic adjustments based on real-time data (such as pose shift) to cope with changes in the target or environment.
[0021] 3) Pose offset is the difference between the actual pose of an object and the reference / desired pose. It encompasses two parts: first, the positional deviation of spatial coordinates (X / Y / Z axes) (such as the distance difference between the actual position of the battery compartment and the positioning target point); and second, the attitude deviation in angles such as pitch, roll, and yaw (such as the difference in tilt angle of the battery compartment caused by robot shaking). In robot battery swapping scenarios, it is often caused by the robot's non-fixed posture (such as motion shaking), environmental interference (lighting changes, vibration), or initial positioning errors, and is the core factor leading to battery compartment docking deviation. As a key input for dynamic compensation, real-time calculation and adjustment of this offset allows the main robotic arm to "follow" the dynamic changes of the target, eliminating the deviation between the "positioning (including coarse and fine positioning) snapshot" and the actual state, ensuring the accuracy and safety of battery replacement.
[0022] 4) The motion path is the continuous trajectory of the main robotic arm from its initial state (position / attitude) to its target state (such as the battery compartment position). It consists of a series of ordered spatial coordinate points and attitude information (such as angles), serving as a "roadmap" guiding the main robotic arm's movement. In battery swapping scenarios, the motion path must meet constraints such as obstacle avoidance (avoiding obstacles on the robot itself or in its surroundings) and joint movement limitations to ensure the main robotic arm can safely and accurately perform battery gripping and replacement operations. As the core output of path planning, the motion path is the direct basis for controlling the main robotic arm's movement; in some scenarios, it can also be dynamically adjusted in conjunction with pose offset to adapt to real-time changes in the target (such as the battery compartment), ensuring the continuity and accuracy of the operation.
[0023] 5) Robotic arms, including main robotic arms and backup robotic arms.
[0024] This application provides a battery replacement method, apparatus, electronic device, computer-readable storage medium, and computer program product, which can accurately and efficiently replace batteries. The following is a detailed description of the embodiments of this application based on the above explanation of the terms and concepts used.
[0025] The following describes the battery replacement system provided in an embodiment of this application. See also... Figure 1 , Figure 1 This is a schematic diagram of the architecture of a battery swapping system provided in an embodiment of this application. To support an exemplary application, the battery swapping system 100 includes a battery swapping device 200 and a target device 300. A communication connection can be established between the battery swapping device 200 and the target device 300 to enable data transmission.
[0026] Here, after the target device 300 arrives at the battery swapping area of the battery swapping device 200, it sends a positioning signal to the battery swapping device 200. The battery swapping device 200 receives the positioning signal sent by the target device 300. Based on the positioning signal, it locates the target device to obtain its device position. Based on the device position, it locates the battery compartment of the target device to obtain its battery compartment position. Based on the battery compartment position, it determines the motion path of the main robotic arm, which is used to perform a battery replacement operation on the battery in the battery compartment. According to the motion path, it controls the main robotic arm to perform the battery replacement operation, and during the battery replacement operation, it adjusts the motion path based on the pose offset of the target device to obtain the adjusted motion path. According to the adjusted motion path, it controls the main robotic arm to continue performing the battery replacement operation. In practical applications, the battery swapping device 200 can be a battery swapping cabinet, a mobile battery swapping vehicle, an integrated battery docking station, or other devices that support battery replacement. The target device 300 can be various types of robots (such as industrial robots, service robots, and home robots), autonomous vehicles, electric vehicles, aircraft, or other devices that require battery replacement, but it is not limited to these.
[0027] In some embodiments, the battery swapping device or server can implement the battery swapping method provided in this application by running various computer-executable instructions or computer programs. For example, computer-executable instructions can be microprogram-level commands, machine instructions, or software instructions. Computer programs can be native programs or software modules in an operating system; they can be native applications (APPs), i.e., programs that need to be installed in the operating system to run; or they can be applets that can be embedded in any APP, i.e., programs that only need to be downloaded to a browser environment to run. In summary, the aforementioned computer-executable instructions can be any form of instruction, and the aforementioned computer programs can be any form of application, module, or plugin.
[0028] The following describes an electronic device implementing a battery replacement method according to an embodiment of this application. See also... Figure 2 , Figure 2 This is a schematic diagram of the structure of the electronic device provided in an embodiment of this application. The electronic device 500 provided in this embodiment can be the aforementioned battery swapping device. Figure 2 As shown, electronic device 500 includes at least one processor 510, memory 550, at least one network interface 520, and user interface 530. The various components in electronic device 500 are coupled together via a bus system 540. It is understood that the bus system 540 is used to implement communication between these components. In addition to a data bus, the bus system 540 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 2The general labeled all buses as Bus System 540.
[0029] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0030] User interface 530 includes one or more output devices 531 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 530 also includes one or more input devices 532, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0031] Memory 550 may be removable, non-removable, or a combination thereof. Memory 550 may include one or more storage devices physically located away from processor 510. Memory 550 may include volatile memory or non-volatile memory, or both. Non-volatile memory may be read-only memory (ROM), and volatile memory may be random access memory (RAM). The memory 550 described in this application embodiment is intended to include any suitable type of memory.
[0032] In some embodiments, memory 550 is capable of storing data to support various operations. Examples of such data include programs, modules, and data structures, or subsets or supersets thereof, as illustrated below. Operating system 551 includes system programs for handling various basic system services and performing hardware-related tasks, such as a framework layer, core library layer, driver layer, etc., for implementing various basic services and handling hardware-based tasks; network communication module 552 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 including Bluetooth, Wireless Fidelity (Wi-Fi), and Universal Serial Bus (USB); presentation module 553 is used to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 531 associated with user interface 530 (e.g., a display screen, a speaker, etc.); input processing module 554 is used to detect and translate one or more user inputs or interactions from one or more input devices 532.
[0033] In some embodiments, the battery replacement device provided in this application can be implemented in software. Figure 2 A battery replacement device 555 stored in memory 550 is shown. It may be software in the form of programs and plug-ins, including the following software modules: positioning module 5551, determination module 5552, and control module 5553. These modules are logical and can therefore be arbitrarily combined or further divided according to the functions they implement. The functions of each module will be described below.
[0034] The battery replacement method provided in this application embodiment is described below. The battery replacement method provided in this application embodiment is implemented by an electronic device, such as a battery swapping device alone, or a server and a battery swapping device working together. Therefore, the executing entity of each step will not be described again below. See [link to documentation]. Figure 3 , Figure 3 This is a schematic flowchart of a battery replacement method provided in an embodiment of this application. The battery replacement method provided in an embodiment of this application includes: Step 101: Locate the battery compartment of the target device to obtain the battery compartment location.
[0035] Step 101 is a core preliminary step in the battery swapping operation (i.e., battery replacement) of the target device. Essentially, it uses multimodal technology to accurately obtain the battery compartment location of the target device (such as a robot) to be swapped, providing an indispensable positional reference for the subsequent battery swapping operation of the main robotic arm. Here, the target device refers to the device whose battery needs to be replaced; the battery compartment is the physical structure on the target device used to hold the battery (usually with a plug-in interface and anti-misinsertion design), and is the direct object of the main robotic arm's "retrieving the old battery" and "installing the new battery" operations. The battery compartment location can be pose information in three-dimensional space, that is, the position and attitude parameters of the battery compartment in the target coordinate system (such as the battery swapping device coordinate system or the main robotic arm coordinate system). The position parameters are: X / Y / Z axis coordinate values (such as the horizontal / vertical distance from the battery swapping cabinet); the attitude parameters are: pitch angle (forward / backward tilt), roll angle (left / right tilt), yaw angle (rotation direction), etc. The battery compartment location directly determines "how far the main robotic arm needs to move and how many angles it needs to adjust" to accurately connect with the battery compartment and realize the battery swapping operation.
[0036] In some embodiments, step 101, "locating the battery compartment of the target device and obtaining the battery compartment location", can be achieved by performing the following steps: receiving the positioning signal emitted by the target device in the battery swapping area, and locating the target device based on the positioning signal to obtain the device location; scanning the battery compartment based on the device location to obtain the scanning result, and locating the battery compartment based on the scanning result to obtain the battery compartment location.
[0037] The process of locating the battery compartment of the target device includes: coarse positioning of the target device and fine positioning of the battery compartment. First, after the target device enters the battery swapping area, it activates its ultra-wideband (UWB) positioning beacon, continuously sending pulse signals (i.e., positioning signals) to the battery swapping equipment (specifically, a UWB base station array). The battery swapping equipment receives the positioning signal emitted by the target device in the swapping area and, based on this signal, locates the target device, thus obtaining its location—this achieves coarse positioning. After obtaining the device's location, the battery compartment is scanned, focusing the scan on an area within ±X meters of the device's location (X is a pre-set value, such as 0.1). The scan results are then used to locate the battery compartment, thus achieving fine positioning.
[0038] The battery swapping area is a pre-defined, specific three-dimensional space, serving as the "effective working area" for the target device to complete battery replacement. Its scope is defined by the hardware layout of the battery swapping equipment (such as UWB base stations, structured light cameras, and the movement range of the main robotic arm), integrating core equipment for the battery swapping process. Upon the target device's entry, the battery swapping process is triggered (such as positioning and scanning). The area boundaries are monitored by sensors to ensure operational safety. It acts as a "spatial anchor point" for the battery swapping process, addressing the spatial uncertainties of battery swapping for the target device and ensuring positioning accuracy and operational safety.
[0039] By applying the above embodiments, the layered positioning strategy of "first receiving positioning signals to obtain the coarse position of the device, and then scanning the battery compartment based on the device position to obtain the fine position of the battery compartment" not only reduces the scanning range, reduces computational load and environmental interference (such as avoiding invalid scanning of irrelevant areas), and improves positioning efficiency, but also significantly improves the accuracy and reliability of battery compartment positioning through the progressive approach of "coarse positioning anchoring the whole + fine scanning focusing on details". At the same time, it adapts to the dynamic attitude changes of the target device, anchors the battery compartment search area by the device position, and provides a stable spatial reference for the subsequent precise docking of the main robotic arm, effectively solving the pain points of traditional positioning such as "large range, low accuracy, and weak anti-interference".
[0040] In some embodiments, "receiving the positioning signal transmitted by the target device in the battery swapping area" can be achieved by performing the following steps: receiving the positioning signal through each of multiple base stations; based on this, "locating the target device based on the positioning signal to obtain the device location of the target device" can be achieved by performing the following steps: for each base station, determining the time difference between the time point when the base station receives the positioning signal and the time point when the positioning signal is transmitted; for each base station, determining the distance between the base station and the target device based on the time difference of the base station and the transmission speed of the positioning signal; and performing triangulation on the target device based on the distance between each base station and the target device to obtain the device location.
[0041] Here, the battery swapping equipment is equipped with a UWB base station array (containing multiple base stations, such as at least 3 UWB base stations, with the spatial coordinates of each base station pre-calibrated and stored), and the target device carries a UWB positioning beacon (with a built-in clock module that can generate a transmission timestamp for the positioning signal). When the target device enters the battery swapping area, the UWB positioning beacon transmits a positioning signal at a preset frequency (the signal frame contains the transmission timestamp). Each UWB base station of the battery swapping equipment receives positioning signals in real time and records its own reception time point. ( Number the base station. , Then the battery swapping equipment performs the following operations: a) Calculate the time difference: For each base station, calculate the time difference between the reception time and the transmission time of the positioning signal. ; b) Calculate the distance between the base station and the target device: based on the speed of electromagnetic wave propagation. (Values) (i.e., the speed of light) to calculate the distance between each base station and the target device. ; c) Triangulation: Based on the known coordinates of each base station. and the corresponding distance Establish a system of spatial positioning equations, namely: .here, The spatial coordinates of the target device's location can be obtained by solving the spatial positioning equations. This completes the coarse positioning of the target equipment and obtains its location.
[0042] By applying the above embodiments, using a multi-base station UWB positioning method, the distance between the base station and the target device is quickly calculated using the Time Difference of Time (TOF) algorithm. Combined with spatial triangulation to solve for the target coordinates, coarse positioning of the target device's battery compartment is achieved (accuracy up to [percentage missing]). 5 cm; the multi-base station redundancy design avoids the risk of signal interference from a single base station, ensuring the reliability of the positioning results; coarse positioning provides an accurate initial position reference for subsequent fine positioning, effectively shortening the preparation time of the battery swapping process, solving the problem of rapid alignment after the target device enters the battery swapping area, and ensuring the continuity and efficiency of the battery swapping operation.
[0043] In some embodiments, see Figure 4 "Scanning the battery compartment based on the device location to obtain the scan result" can be achieved by performing the following steps 201-203: Step 201, according to the device location, project a structured light pattern onto the battery compartment and take a picture of the battery compartment with the projected structured light pattern to obtain a light pattern image; Step 202, based on the structured light pattern and the light pattern image, determine the three-dimensional coordinates of each point on the surface of the battery compartment; Step 203, construct a three-dimensional point cloud model including the three-dimensional coordinates of each point, and use the three-dimensional point cloud model as the scan result.
[0044] For step 201, the structured light module of the battery swapping equipment (composed of a structured light projector and a structured light camera) adjusts the attitude (including pitch angle and roll angle) and focal length of the projector and camera based on the device position (i.e. the approximate coordinates of the battery compartment) obtained by coarse positioning, and projects a preset structured light pattern (such as a binary coded stripe pattern) onto the surface of the battery compartment; at the same time, the structured light camera takes pictures of the battery compartment with the projected structured light pattern at a preset frame rate to obtain the light pattern image (including stripe deformation information caused by the undulation of the surface of the battery compartment).
[0045] For step 202, the battery swapping equipment extracts stripe edge points as feature points (i.e., points) from the light pattern image using a feature extraction algorithm (such as Canny edge detection). Using a pre-stored structured light coding dictionary (such as a unique binary code for each stripe), it performs feature matching between the deformed stripes in the light pattern image and the original stripe pattern projected by the projector, obtaining the coordinates of each feature point in the projector image coordinate system. and coordinates in the camera image coordinate system Based on pre-calibrated parameters of the projector and camera (including baseline distance) Camera focal length Principal point coordinates Distortion coefficient The three-dimensional coordinates of each feature point are calculated using triangulation formulas. ,in, The depth from the feature point to the camera. , These are the horizontal and vertical coordinates of the feature point in the camera coordinate system.
[0046] For step 203, the three-dimensional coordinates of all feature points are integrated according to their spatial location to construct a three-dimensional point cloud model of the battery compartment (containing all feature points on the surface of the battery compartment). The information is then processed, and the 3D point cloud model is output as the scan result.
[0047] Using the above embodiments, the surface topography of the battery compartment is transformed into a three-dimensional point cloud model through structured light projection and triangulation, achieving a scanning accuracy of up to [missing information]. 1 millimeter, far exceeding the coarse positioning 5 cm; the coding characteristics of the structured light pattern effectively avoid the interference of ambient light changes on feature matching, ensuring the stability of the scanning results; the three-dimensional point cloud model completely preserves the spatial position information of fine features such as the edge of the battery compartment and the battery compartment logo, providing millimeter-level accurate reference for the subsequent planning of the main robotic arm's motion path, solving the "fine docking" requirement that coarse positioning cannot meet, and ensuring the accuracy of the battery swapping operation.
[0048] In some embodiments, see Figure 5 "Locating the battery compartment based on the scanning results and obtaining the battery compartment location" can be achieved by performing the following steps 301-303: Step 301, obtain the reference edge features of the battery compartment and the reference part features of the reference part of the battery compartment; Step 302, extract the first point cloud that matches the reference edge features from the 3D point cloud model and extract the second point cloud that matches the reference part features; Step 303, determine the battery compartment location based on the 3D coordinates of each point in the first point cloud and the 3D coordinates of each point in the second point cloud.
[0049] For step 301, the baseline edge features of the battery compartment (such as the rectangular contour parameters of the battery compartment opening: length) are pre-stored. ,Width Edge straightness error ≤ ) and reference features (such as the geometric parameters of the battery compartment logo: circular outline, diameter) Internal stripe code "0110"); simultaneously stores the preset relative positional relationship between the reference edge and the reference part (e.g., the logo center is located to the upper right of the center of the battery compartment opening, horizontal offset). Vertical offset ).
[0050] For step 302, the 3D point cloud model is preprocessed (e.g., Statistical Outlier Removal denoising, Voxel Grid downsampling), and the set of point clouds that conform to the baseline edge features in the 3D point cloud model is extracted (e.g., through the RANSAC straight line fitting algorithm) as the first point cloud (e.g., the battery compartment opening edge point cloud) matching the baseline edge features; the set of point clouds that conform to the baseline part features in the point cloud is extracted (e.g., through the ICP (Iterative Nearest Point) shape matching algorithm) as the second point cloud (e.g., the logo point cloud) matching the baseline part features.
[0051] For step 303, calculate the geometric center coordinates of the first point cloud. (such as the center of the rectangular opening of the battery compartment) , , ),in, The maximum / minimum X-coordinate of the first point cloud. , Similarly), calculate the geometric center coordinates of the second point cloud. (For example, the center of the logo is calculated in the same way.) );verify and Relative position error ( and Does it meet the requirements? , If the relative position error meets the requirements, then... Using the position coordinates of the battery compartment, the edge normal vector of the first point cloud (which can be calculated through PCA principal component analysis) is used as the attitude direction of the battery compartment, together forming the battery compartment position (including position and attitude information).
[0052] By applying the above embodiments, high-precision positioning of the battery compartment (position error ≤ 0.5mm, attitude error ≤ 0.1°) is achieved through dual feature matching of the reference edge and reference part, and by using geometric center calculation and relative position verification. The preset reference features avoid the influence of environmental interference (such as stains and reflections on the surface of the battery compartment) on the positioning, ensuring the uniqueness of feature matching. The dual-dimensional information of "position + attitude" of the battery compartment provides millimeter-level accurate reference for the main robotic arm's battery grasping path planning and insertion angle adjustment, solving the positioning deviation problem in non-rigid docking scenarios and ensuring the accuracy and stability of battery swapping operations.
[0053] Step 102: Determine the motion path of the main robotic arm based on the location of the battery compartment.
[0054] The main robotic arm is used to perform battery replacement operations on the batteries in the battery compartment.
[0055] Step 102 is a crucial transitional step in the battery swapping process, connecting the battery compartment positioning with the main robotic arm's operational execution. Essentially, it transforms the precise location information of the battery compartment into an executable motion trajectory for the main robotic arm, providing "navigation instructions" for the arm to safely and accurately complete the battery replacement operation. The input to step 102 is the battery compartment position; the output is the motion path of the main robotic arm, i.e., the continuous sequence of positions of the end effector (such as the gripper) in space. and the corresponding joint angle sequence, The time step is denoted as 102. The core logic of step 102 is: based on the location of the battery compartment, plan the motion trajectory of the main robotic arm from the initial state (such as the battery storage compartment or the standby position) to the location of the battery compartment. This motion trajectory is the motion path.
[0056] In some embodiments, before performing step 102 "determine the motion path of the main robotic arm based on the battery compartment location", the following steps may also be performed: from the 3D point cloud model, determine a third point cloud that does not match the 3D model of the battery compartment, and use the 3D coordinates of each point in the third point cloud as the obstacle coordinates of the environmental obstacle; based on this, the step "determine the motion path of the main robotic arm based on the battery compartment location" can be achieved by performing the following steps: based on the battery compartment location, determine the target docking position of the battery compartment; determine the starting position of the main robotic arm; with the starting position as the starting point and the target docking position as the ending point, perform path planning in combination with the obstacle coordinates to obtain the motion path of the main robotic arm.
[0057] Here, the point cloud of the 3D model of the battery compartment is pre-stored (denoted as...). A point cloud set generated from the battery compartment design parameters, containing the three-dimensional coordinates of all standard feature points on the battery compartment surface. The three-dimensional point cloud model obtained by scanning (denoted as...) Perform the following operations: a) Point cloud matching: Use the ICP (Iterative Closest Point) algorithm to match the points cloud. and Perform rigid registration to obtain Each point in exist Corresponding points in b) Distance calculation: Calculate and Euclidean distance c) Obstacle point cloud filtering: Set distance threshold (The distance threshold can be greater than the machining error of the battery compartment surface, but less than the safety clearance of the main robotic arm gripper), thus enabling... China satisfies The set of point clouds is denoted as the third point cloud. The three-dimensional coordinates of each point in the third point cloud are the obstacle coordinates of environmental obstacles (such as stains on the surface of the battery compartment, protruding parts of the robot body, and stray structures inside the battery swapping cabinet).
[0058] Based on this, step 102, "Determine the motion path of the main robotic arm based on the battery compartment location," is achieved through the following steps: a) Determine the target docking position: Based on the battery compartment location obtained in step 101 (denoted as...). This includes the three-dimensional coordinates and attitude angles of the battery compartment opening center, combined with battery replacement operation requirements (such as needing to reach 20mm into the battery compartment to retrieve the old battery), to determine the target docking position of the main robotic arm's end effector. (Extending along the battery insertion / removal direction (Z-axis)). b) Determine the starting position: Obtain the current starting position of the main robotic arm. (For example, the main robotic arm is in the standby position in the battery storage compartment, with coordinates as follows) c) Obstacle avoidance path planning: The RRT (Rapid Expanding Random Tree) algorithm is used to... Starting point As the endpoint, the third point cloud The coordinates of environmental obstacles serve as collision constraints (i.e., no point on the motion path may collide with an obstacle). If the Euclidean distance between points in the system is less than or equal to a set threshold (e.g., 10mm), the motion path of the main robotic arm is generated, which is the continuous position sequence of the end effector of the main robotic arm in space. And the corresponding joint angle sequence.
[0059] By applying the above embodiments, the point cloud of the battery compartment is extracted to accurately distinguish it from the point cloud of environmental obstacles, thus avoiding misjudging the battery compartment's own features as obstacles. Combined with obstacle avoidance path planning, it ensures that the main robotic arm's movement path does not collide with obstacles, improving the safety of the path. The constraint of obstacle coordinates enables the main robotic arm to safely reach the target position even in complex environments (such as when there are stains on the surface of the battery compartment or protruding parts on the robot body), ensuring the continuity and safety of the battery swapping operation.
[0060] Step 103: Control the main robotic arm to perform the battery replacement operation according to the motion path, and adjust the motion path based on the pose offset of the target device during the battery replacement operation to obtain the adjusted motion path.
[0061] Step 103 involves converting the planned motion path into the actual movements of the main robotic arm. Real-time pose compensation corrects the motion path to offset dynamic pose shifts in the target device, ensuring the accuracy and safety of the battery replacement operation. Specifically, the motion path planned in step 102 is converted into control commands for each joint of the main robotic arm (such as the rotation angle and speed of the joint motors) using an inverse kinematics algorithm. This drives the main robotic arm to move from its starting position (e.g., the battery storage compartment) along the path to the battery compartment, executing specific battery replacement actions, including: a) Retrieving the old battery: The main robotic arm grippers open and penetrate the battery compartment along the battery insertion / removal direction (Z-axis). When the force / torque sensor detects contact between the grippers and the battery (force value reaches 5N±1N), the grippers close to grasp the battery and withdraw along the Z-axis to the battery compartment opening, completing the removal of the old battery. b) Installing the new battery: The main robotic arm grippers carry the new battery and insert it into the battery compartment along the Z-axis. When the force sensor detects contact between the battery and the compartment interface (force value reaches 8N±1N), the grippers open to release the battery and withdraw along the Z-axis, completing the installation of the new battery.
[0062] Simultaneously, during the battery replacement operation, the pose offset of the target device is determined through real-time sensor data. The movement path is then dynamically corrected based on this pose offset to counteract the dynamic changes in the target device. The pose offset refers to the dynamic change in the position and orientation of the battery compartment caused by factors such as the target device's own movement and ground vibration during the battery replacement process. This includes: a) Position offset: the change in the X / Y / Z axis coordinates of the battery compartment opening center. b) Attitude offset: such as the pitch angle change of the battery compartment. (Forward and backward tilting), roll angle changes (Pitch left and right), yaw angle change (Rotation direction). The pose offset can be obtained through sensor fusion, such as by using an IMU (Inertial Measurement Unit) to detect the target device's attitude changes in real time and output the pitch angle. angular velocity This data allows for real-time adjustment of the motion path based on the pose offset, resulting in the adjusted motion path.
[0063] In some embodiments, step 103, "adjusting the motion path based on the pose offset of the target device to obtain the adjusted motion path," can be achieved by performing the following steps: determining the offset of the battery compartment based on the pose offset, and applying the offset to the battery compartment position to obtain the target battery compartment position; determining the current position of the main robotic arm during the battery replacement operation performed according to the motion path; and adjusting the motion path based on the target battery compartment position and the main robotic arm position to obtain the adjusted motion path.
[0064] Here, the offset of the battery compartment is first determined based on the pose offset. Specifically, it can be calculated using the following formula (1): Formula (1) in, This is the offset. The pitch angle, Here, K1 = 0.8 and K2 = 0.2, representing the angular velocity. K1 and K2 are preset and can be adjusted as needed. The pitch angle and angular velocity represent the pose deviation of the target device.
[0065] Then, an offset is applied to the battery compartment location to obtain the target battery compartment location. That is, the offset is added to the battery compartment location (specifically, the target docking location) to obtain the target battery compartment location (specifically, the adjusted target docking location). For example, the target docking location is... If calculated The adjusted target docking position is During the battery replacement operation following the motion path, the current position of the main robotic arm is determined. Based on the target battery compartment position and the main robotic arm position, the motion path is adjusted to obtain the adjusted motion path. That is, starting from the main robotic arm position and ending at the target battery compartment position, a path is planned from the target battery compartment position to the main robotic arm position to obtain the target path (refer to the motion path planning process described above, which will not be repeated here). The corresponding portion of the motion path is then replaced with the target path to obtain the adjusted motion path.
[0066] By applying the above embodiments, the target device's pose offset is acquired in real time, the target docking position of the battery compartment is dynamically updated, and the motion path is adjusted in combination with the current state of the main robotic arm, thus achieving precise compensation for the dynamic pose changes of the target device. This effectively solves the problem of pose offset caused by shaking and vibration of the target device, ensuring that the main robotic arm is always aligned with the battery compartment, adapting to a ±15° tilt condition, and improving the success rate and safety of battery swapping operations.
[0067] In some embodiments, "adjusting the motion path based on the target battery compartment position and the main robotic arm position to obtain the adjusted motion path" can be achieved by performing the following steps: determining the positional deviation between the target battery compartment position and the main robotic arm position; if the positional deviation is less than a deviation threshold, adjusting the motion path based on the target battery compartment position and the main robotic arm position to obtain the adjusted motion path; based on this, see... Figure 6 The following steps 401-404 can also be performed: Step 401, if the position deviation is greater than or equal to the deviation threshold, start the backup robotic arm to perform the task; Step 402, determine the target motion path of the backup robotic arm based on the target battery compartment position; Step 403, control the backup robotic arm to continue to perform the battery replacement operation according to the target motion path.
[0068] Here, the positional deviation between the target battery compartment position and the main robotic arm position is first determined. For example, the Euclidean distance between the target battery compartment position and the main robotic arm position can be calculated and used as the positional deviation. Then, if the positional deviation is less than the deviation threshold (which can be preset, such as 2cm), the motion path is adjusted based on the target battery compartment position and the main robotic arm position to obtain the adjusted motion path.
[0069] For step 401, if the position deviation is greater than or equal to the deviation threshold, it is determined that the current main robotic arm cannot meet the accuracy requirements of the battery replacement operation through adjustment of the motion path. Therefore, the switching of the backup robotic arm is triggered at this time. Specifically, firstly, the main robotic arm is controlled to stop the current battery replacement operation and return to the standby position (such as next to the battery storage compartment) along the original path to avoid interfering with the movement of the backup robotic arm; then the backup robotic arm is started, and the current position of the backup robotic arm is obtained through the joint encoder of the backup robotic arm.
[0070] For step 402, starting from the current position of the backup robotic arm and ending at the target battery compartment position, a path planning algorithm (such as the Fast Expanding Random Tree (RRT) algorithm) is used to plan the target motion path of the backup robotic arm. The specific implementation method can refer to the motion path planning method described above, and will not be elaborated here.
[0071] For step 403, after obtaining the target motion path, the backup robotic arm is controlled to continue performing the battery replacement operation according to the target motion path. The specific implementation method can refer to the implementation method of "controlling the main robotic arm to perform the battery replacement operation according to the motion path" described above, and will not be repeated here.
[0072] By applying the above embodiments, the problem of battery swapping interruption caused by main robotic arm failure or excessive deviation is solved through position deviation judgment and backup robotic arm switching mechanism; the path planning of backup robotic arm is consistent with that of main robotic arm, ensuring the continuity and accuracy of operation; thus, the battery swapping process can continue to be executed when the main robotic arm fails, improving the battery swapping success rate, adapting to the high-frequency battery swapping needs of target equipment, and ensuring the stability of target equipment's endurance.
[0073] Step 104: Following the adjusted motion path, control the main robotic arm to continue performing the battery replacement operation.
[0074] For step 104, after obtaining the adjusted motion path, the main robotic arm continues to perform the battery replacement operation. In this way, during the execution of the main robotic arm, the motion path is adjusted in real time according to the pose offset of the target device, ensuring that the movement of the main robotic arm always adapts to the dynamic position of the battery compartment. This resolves the path deviation caused by the pose offset of the target device, ensuring that the battery replacement operation is not affected by pose offset; thus, the accuracy and success rate of battery replacement can be guaranteed.
[0075] In some embodiments, the following steps may also be performed: during the battery replacement operation, based on the vertical coordinates included in the battery compartment position, the main robotic arm is controlled to move in the vertical direction, and the resistance encountered by the main robotic arm is detected; if the resistance is less than a first resistance threshold, the main robotic arm is controlled to continue moving; if the resistance is greater than a second resistance threshold, the main robotic arm is replaced with a backup robotic arm.
[0076] Here, the vertical coordinates (i.e., Z-axis coordinates) of the battery compartment location are the coordinates that the main robotic arm (specifically, the end effector or gripper) needs to reach in the vertical direction. Therefore, based on the vertical coordinates of the battery compartment location, the main robotic arm is controlled to move vertically to reach the target position (i.e., the position indicated by the vertical coordinates of the battery compartment location). When the main robotic arm contacts the battery, the resistance experienced by the main robotic arm can be detected by a force / torque sensor. If the resistance is less than a first resistance threshold, the main robotic arm can continue to move; alternatively, the position of the main robotic arm can be adjusted within a set adjustment range to eliminate the resistance. If the resistance is greater than a second resistance threshold, an abnormal resistance is detected (such as battery jamming, incorrect orientation, or compartment deformation), and the main robotic arm is replaced by a backup robotic arm. The first resistance threshold and the second resistance threshold can both be preset. The first resistance threshold can be 5N, which is the minimum resistance for normal battery insertion and removal. The second resistance threshold can be 15N, which is the upper limit of abnormal resistance. Exceeding the second resistance threshold may cause battery deformation, damage to the housing, or jamming of the main robotic arm joints.
[0077] By applying the above embodiments, vertical position control ensures precise movement of the main robotic arm in the insertion and removal direction, preventing deviation from the battery compartment opening; resistance threshold judgment protects the battery and the main robotic arm from damage caused by forceful insertion; and the backup robotic arm switching mechanism ensures the continuity of the battery swapping process, avoiding interruptions due to main robotic arm failure. This approach adapts to the precise requirements of battery replacement, improves the safety and success rate of battery swapping operations, and guarantees the stability of the target device's battery life.
[0078] By applying the above embodiments of this application, firstly, the battery compartment positioning provides an accurate motion path for the main robotic arm, avoiding blind operation; secondly, during the execution of the main robotic arm, the motion path of the main robotic arm is adjusted in real time according to the pose offset of the target device, ensuring that the motion of the main robotic arm always adapts to the dynamic position of the battery compartment, solving the path deviation caused by the pose offset of the target device, so that the battery replacement operation is not affected by the pose offset; thus, the accuracy and success rate of battery replacement can be guaranteed, thereby improving the efficiency of battery replacement.
[0079] The following describes an exemplary application of the embodiments of this application in a real-world application scenario, using a robot as the target device.
[0080] With the rapid development of artificial intelligence and robotics, robots are increasingly integrating into diverse scenarios such as industrial production, services, and healthcare. However, insufficient battery life has become a bottleneck hindering their large-scale application. Currently, mainstream charging methods suffer from long charging times and low efficiency, making it difficult to meet the high-frequency, high-intensity work demands of robots. In contrast, battery swapping, with its ability to quickly replace batteries, has become an ideal choice for improving robot battery life.
[0081] However, existing battery swapping technologies face numerous challenges when applied to robots. Traditional battery swapping equipment (such as electric vehicle swapping stations) is mostly designed for rigid battery compartments, while robots constantly change posture during movement. This leads to the problem of non-rigid docking of the battery compartments, making precise and efficient battery replacement difficult. In real-world working scenarios, lighting conditions are complex and variable, and the robot's pose may also deviate. Under these circumstances, existing vision positioning systems struggle to guarantee the accuracy of battery grasping, easily resulting in grasping failures or battery damage. Furthermore, in the collaborative operation of a fixed single-master robotic arm, the lack of an effective fault-tolerance mechanism means that if a single arm fails, the entire battery swapping process is interrupted, severely impacting swapping efficiency and the normal operation of the robot. Therefore, there is an urgent need for a highly efficient and reliable battery swapping cabinet system and method specifically designed for robots.
[0082] Based on this, embodiment 1) of this application proposes a three-level positioning system, consisting of coarse positioning (UWB), fine positioning (structured light), and contact correction (i.e., force feedback, used to compensate for minor errors that cannot be avoided in the first two levels of positioning (coarse and fine positioning), ensuring smoothness and safety during battery insertion). This progressive approach ensures high precision and reliability in positioning. 2) It provides a dual-arm redundancy operation mechanism, allowing the backup robotic arm to quickly take over the task when the main robotic arm malfunctions or fails, ensuring uninterrupted battery swapping. 3) It provides a dynamic compensation algorithm that can monitor and correct positional deviations caused by changes in robot posture in real time, improving the success rate and stability of battery swapping. Through this embodiment, 1) it effectively overcomes the battery compartment positioning deviation problem caused by the robot's non-fixed posture, ensuring accurate docking of the battery compartment under various postures. 2) It improves the recognition stability of the vision system in complex environments, making it unaffected by factors such as changes in lighting and robot posture deviations, accurately locating the battery compartment. 3) It achieves reliable fault-tolerant control for dual-arm collaborative operation, avoiding interruption of the entire battery swapping process due to single-arm operation failure.
[0083] See Figure 7 , Figure 7This is a structural schematic diagram of the battery swapping equipment provided in this application embodiment. The battery swapping equipment (i.e., battery swapping cabinet) provided in this application embodiment includes: 1) Dual 6-DOF main robotic arm: equipped with force / torque sensors, it can accurately sense changes in force during battery gripping and placement, enabling fine operation and accurate battery gripping and placement even in complex environments. 2) Multimodal positioning module: composed of a UWB base station array and a structured light camera. The UWB base station array is responsible for coarse positioning, quickly determining the robot's position; the structured light camera performs fine positioning, accurately identifying the battery compartment edge and logo position by scanning the battery compartment area. 3) Battery storage compartment: adopts a magazine-type conveying mechanism, which can efficiently and orderly store and transport batteries, facilitating the main robotic arm's pick-and-place operations and improving battery swapping efficiency. 4) Main control system: integrates a fault diagnosis unit, which can monitor the operating status of each part of the battery swapping cabinet in real time. Once a fault is detected, it can quickly respond and execute corresponding fault handling measures to ensure the stable operation of the battery swapping cabinet.
[0084] See Figure 8 , Figure 8 This is a fifth flowchart illustrating the battery replacement method provided in this application embodiment. The battery replacement method provided in this application embodiment includes: (1) Coarse positioning and docking. The robot arrives at the target area (S601); the robot activates the UWB positioning beacon (S602); if activation fails, the UWB positioning is retried multiple times (S603); if activation is successful, the battery swapping cabinet calculates the robot's position (e.g., using the TOF algorithm) and performs initial alignment (S604). Specifically, the robot's position accuracy can reach ±5cm. Subsequently, the battery swapping cabinet's control cabinet moving platform initially aligns with the robot's battery compartment, laying the foundation for subsequent fine positioning and battery swapping operations.
[0085] (2) Visual Precision Positioning. The structured light camera is activated to scan and position the battery compartment (S605). Specifically, the structured light camera is activated to perform a comprehensive scan of the battery compartment area. Through feature matching algorithms, the edges of the battery compartment and the location of the logo are accurately identified. Combined with obstacle recognition and path planning algorithms, the motion path of the main robotic arm is calculated to avoid surrounding obstacles, ensuring that the main robotic arm can safely and accurately grasp the battery. The role of the logo location is: a) to provide a unique visual orientation reference: The design of the battery compartment is usually symmetrical or nearly symmetrical, but the logo is almost always designed in a specific direction (e.g., always above or to the right of the battery compartment). Identifying this asymmetrical logo can provide an absolute and unambiguous directional reference. b) to prevent incorrect battery orientation: The robot's battery itself may have anti-misinsertion design (such as asymmetrical pins), but the insertion surface of the battery compartment itself may also have orientation. By recognizing the logo, the robot's current orientation can be confirmed, and the required angle (such as 0°, 90°, 180°) for battery insertion can be calculated. This provides double protection against inserting the battery "backwards" or "crooked".
[0086] (3) Dual-arm coordinated operation. Control the main robotic arm to perform the battery swapping operation (S606); if the main robotic arm malfunctions, start the backup robotic arm to continue the battery swapping operation (S607).
[0087] See Figure 9 ( Figure 9 This is a schematic diagram of the dual-arm collaborative operation provided in this application embodiment. The dual-arm collaborative operation process includes: the main robotic arm is responsible for performing the battery swapping operation, and the backup robotic arm tracks the movement of the main robotic arm in real time and is ready. A force / position hybrid control strategy is adopted. Position control is used along the Z-axis to ensure accurate gripping and placement of the battery in the vertical direction; force control is used in the XY plane. When the force sensor detects that the resistance is less than the first resistance threshold (e.g., 10N), the main robotic arm continues to perform the battery swapping operation; when the force sensor detects abnormal resistance (resistance greater than or equal to the second resistance threshold of 15N), the backup robotic arm is immediately activated to take over the battery swapping operation to ensure the smooth progress of the battery swapping process.
[0088] 1) The design of the force / position hybrid control strategy is entirely based on the physical characteristics and task requirements of battery insertion and removal. The motion space of the main robotic arm's end effector can be divided into three directions: the Z-axis (vertical direction) and the XY plane (horizontal plane). Position control is used along the Z-axis for precise displacement. The main robotic arm needs to travel a certain distance along the Z-axis strictly according to the preset trajectory to complete the "pull out" or "insert" action of the battery. Force control is used in the XY plane to maintain a constant contact force. On the XY plane (i.e., the plane perpendicular to the insertion and removal direction), the main robotic arm no longer aims to reach a precise coordinate point, but rather to ensure smooth and safe force interaction with the environment.
[0089] 2) The role of the first resistance threshold: In the force controller of the XY plane, the system maintains the sensed force below the first resistance threshold. When the force is less than the first resistance threshold, the system considers it a normal and acceptable contact force and eliminates it through minor position adjustments. This is the state when the system is operating normally. The role of the second resistance threshold: It is a monitoring threshold. When the system detects a force in any direction (especially during Z-axis insertion, which may indicate jamming) exceeding the second resistance threshold, it no longer attempts to adapt through force control but instead judges it as a serious anomaly (such as battery deformation, severe misalignment, foreign object presence, etc.). The first and second resistance thresholds define a "safe operating range." The system continues to self-correct within this range. Once the second resistance threshold is exceeded, it means that the upper limit of the system's adaptive capability has been exceeded, and a higher-level fault response mechanism (such as primary / backup arm switching) must be activated to ensure safety and mission continuity.
[0090] (4) Dynamic compensation (S608). The robot's torso sway is detected in real time by the inertial measurement unit (IMU), and the compensation amount is calculated using formula (1). : Formula (1) in, The pitch angle, Let K1 = 0.8 and K2 = 0.2 be the angular velocities.
[0091] The results of coarse positioning and visual fine positioning can be seen as a "one-time snapshot." Dynamic compensation based on the compensation amount does not change this "snapshot" itself, but rather modifies the docking point between the main robotic arm and the battery compartment. The translation is then adjusted, and based on the docking point after the translation, the movement path of the main robotic arm is corrected in real time, so that the movement of the main robotic arm can follow the movement of the docking point of the battery compartment.
[0092] (5) Battery replacement (S609). When the old battery is placed in the recycling bin, the system automatically performs a health check to evaluate the battery's performance and lifespan. The new battery is preheated to the optimal operating temperature (25±3℃) before installation and a secondary confirmation mechanism is used to ensure the reliability of the electrical connection and avoid problems such as the battery not working properly due to poor connection.
[0093] This application also provides a fault-tolerance mechanism, namely a three-level fault response mechanism, specifically including: 1) Level 1: If the deviation (i.e., the aforementioned positional deviation) is less than the deviation threshold (e.g., 2cm), the system performs local path replanning, adjusts the movement path of the main robotic arm to correct the deviation, and continues to complete the battery swapping operation. 2) Level 2: If the deviation is greater than or equal to the deviation threshold or the main robotic arm malfunctions, the backup robotic arm immediately takes over the battery swapping operation to ensure that the battery swapping process is not affected. 3) Level 3: In the event of a serious fault or dangerous situation, the system stops urgently and issues an alarm signal to remind the staff to handle the situation. It should be noted that the deviation refers to the positional deviation between the current actual position of the end of the main robotic arm (or the battery held on it) (i.e., the aforementioned main robotic arm position) and the target ideal position of the battery compartment docking point (i.e., the aforementioned target battery compartment position). The deviation for each control cycle is obtained by subtracting the target ideal position obtained after initialization by visual positioning (low frequency, high precision) and dynamic compensation by IMU (high frequency, low precision) from the current actual position obtained by real-time calculation of the main robotic arm joint encoder (high frequency, high precision) through forward kinematics.
[0094] In addition, this application also provides a virtual verification system based on digital twins. Before performing actual physical operations, simulation tests can be conducted in the virtual environment of the virtual verification system to simulate various working conditions, identify potential problems in advance and optimize them, thereby further improving the success rate and safety of battery swapping operations.
[0095] Compared with the prior art, the application of the above embodiments of this application brings the following beneficial effects: 1) Battery swapping success rate: significantly improved to 99.7% (92% in the prior art), effectively ensuring the robot's endurance and reducing downtime caused by battery swapping failures. 2) Average battery swapping time: shortened to 45 seconds (90 seconds in the prior art), greatly improving battery swapping efficiency and enabling the robot to be put into work more quickly. 3) Posture adaptability: adaptable to ±15° robot posture tilt, able to operate stably in complex and changing working environments, broadening the robot's application scenarios. 4) Battery connection quality: battery connection defect rate reduced to below 0.1%, ensuring the reliability of battery connection and improving the stability and safety of robot operation.
[0096] The following description continues to illustrate the exemplary structure of the battery replacement device 555 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2 As shown, the software modules stored in the battery replacement device 555 in the memory 550 may include: a positioning module 5551, used to locate the battery compartment of the target device to obtain the battery compartment position; a determination module 5552, used to determine the motion path of the main robotic arm based on the battery compartment position, the main robotic arm being used to perform a battery replacement operation on the battery in the battery compartment; a control module 5553, used to control the main robotic arm to perform the battery replacement operation according to the motion path, and during the execution of the battery replacement operation, to adjust the motion path based on the pose offset of the target device to obtain the adjusted motion path; the control module 5553 is also used to control the main robotic arm to continue performing the battery replacement operation according to the adjusted motion path.
[0097] In some embodiments, the positioning module 5551 is further configured to receive a positioning signal emitted by the target device in the battery swapping area, and locate the target device based on the positioning signal to obtain the device location of the target device; scan the battery compartment based on the device location to obtain the scanning result, and locate the battery compartment based on the scanning result to obtain the battery compartment location.
[0098] In some embodiments, the positioning module 5551 is further configured to receive the positioning signal through each of the plurality of base stations; the positioning module 5551 is further configured to, for each base station, determine the time difference between the receiving time point of the positioning signal and the transmission time point of the positioning signal; for each base station, determine the distance between the base station and the target device based on the time difference of the base station and the transmission speed of the positioning signal; and perform triangulation on the target device based on the distance between each base station and the target device to obtain the device location.
[0099] In some embodiments, the positioning module 5551 is further configured to project a structured light pattern onto the battery compartment according to the device position, and to take a picture of the battery compartment with the structured light pattern projected onto it to obtain a light pattern image; based on the structured light pattern and the light pattern image, to determine the three-dimensional coordinates of each point on the surface of the battery compartment; to construct a three-dimensional point cloud model including the three-dimensional coordinates of each point, and to use the three-dimensional point cloud model as the scanning result.
[0100] In some embodiments, the positioning module 5551 is further configured to acquire the reference edge features of the battery compartment and the reference part features of the reference part of the battery compartment; extract a first point cloud that matches the reference edge features from the three-dimensional point cloud model and extract a second point cloud that matches the reference part features; and determine the position of the battery compartment based on the three-dimensional coordinates of each point in the first point cloud and the three-dimensional coordinates of each point in the second point cloud.
[0101] In some embodiments, the determining module 5552 is further configured to, before determining the motion path of the main robotic arm based on the battery compartment position, determine a third point cloud from the three-dimensional point cloud model that does not match the three-dimensional model of the battery compartment, and use the three-dimensional coordinates of each point in the third point cloud as the obstacle coordinates of the environmental obstacle; the determining module 5552 is further configured to, based on the battery compartment position, determine the target docking position of the battery compartment; determine the starting position of the main robotic arm; and, using the starting position as the starting point and the target docking position as the ending point, perform path planning in conjunction with the obstacle coordinates to obtain the motion path.
[0102] In some embodiments, the control module 5553 is further configured to determine the offset of the battery compartment based on the pose offset, and apply the offset to the battery compartment position to obtain a target battery compartment position; determine the current position of the main robotic arm during the battery replacement operation performed according to the motion path; and adjust the motion path based on the target battery compartment position and the main robotic arm position to obtain the adjusted motion path.
[0103] In some embodiments, the control module 5553 is further configured to determine the positional deviation between the target battery compartment position and the main robotic arm position; if the positional deviation is less than a deviation threshold, adjust the motion path based on the target battery compartment position and the main robotic arm position to obtain the adjusted motion path; the control module 5553 is further configured to, if the positional deviation is greater than or equal to the deviation threshold, start the backup robotic arm to perform the task, and determine the target motion path of the backup robotic arm based on the target battery compartment position; and control the backup robotic arm to continue performing the battery replacement operation according to the target motion path.
[0104] In some embodiments, the control module 5553 is further configured to, during the battery replacement operation, control the main robotic arm to move in the vertical direction based on the vertical coordinates included in the battery compartment position, and detect the resistance encountered by the main robotic arm; if the resistance is less than a first resistance threshold, control the main robotic arm to continue moving; if the resistance is greater than a second resistance threshold, start the backup robotic arm to perform the task.
[0105] It should be noted that the description of the device embodiments in this application is similar to the description of the method embodiments described above, and has similar beneficial effects as the method embodiments, so it will not be repeated here. Any technical details not covered in the battery replacement device provided in the embodiments of this application can be understood based on the description of the technical details in the above method embodiments.
[0106] This application also provides a computer program product, which includes computer-executable instructions or a computer program stored in a computer-readable storage medium. The processor of an electronic device reads the computer-executable instructions or computer program from the computer-readable storage medium and executes the computer-executable instructions or computer program, causing the electronic device to perform the battery replacement method provided in this application.
[0107] This application also provides a computer-readable storage medium storing computer-executable instructions or computer programs. When the computer-executable instructions or computer programs are executed by a processor, the processor will execute the battery replacement method provided in this application.
[0108] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.
[0109] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
[0110] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).
[0111] As an example, computer-executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located at one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.
[0112] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A battery replacement method, characterized in that, The method includes: The battery compartment of the target device is located to obtain the battery compartment position; Based on the location of the battery compartment, the motion path of the main robotic arm is determined. The main robotic arm is used to perform a battery replacement operation on the battery in the battery compartment. According to the motion path, the main robotic arm is controlled to perform the battery replacement operation, and during the battery replacement operation, the motion path is adjusted based on the pose offset of the target device to obtain the adjusted motion path; Following the adjusted motion path, the main robotic arm is controlled to continue performing the battery replacement operation.
2. The method as described in claim 1, characterized in that, The step of locating the battery compartment of the target device to obtain the battery compartment location includes: The system receives the positioning signal emitted by the target device in the battery swapping area, and locates the target device based on the positioning signal to obtain the device location. Based on the device location, the battery compartment is scanned to obtain the scan results, and based on the scan results, the battery compartment is located to obtain the battery compartment location.
3. The method as described in claim 2, characterized in that, Receiving the positioning signal transmitted by the target device in the battery swapping area includes: The positioning signal is received by each of the multiple base stations; The step of locating the target device based on the positioning signal to obtain the device location of the target device includes: For each base station, the time difference between the time point when the base station receives the positioning signal and the time point when the positioning signal is transmitted is determined; For each base station, the distance between the base station and the target device is determined based on the time difference of the base station and the transmission speed of the positioning signal. Based on the distance between each base station and the target device, the target device is triangulated to obtain the device's location.
4. The method as described in claim 2, characterized in that, The step of scanning the battery compartment based on the device location to obtain the scan results includes: According to the device location, a structured light pattern is projected onto the battery compartment, and the battery compartment with the projected structured light pattern is photographed to obtain a light pattern image; Based on the structured light pattern and the light pattern image, the three-dimensional coordinates of each point on the surface of the battery compartment are determined. A three-dimensional point cloud model including the three-dimensional coordinates of each point is constructed, and the three-dimensional point cloud model is used as the scanning result.
5. The method as described in claim 4, characterized in that, The step of locating the battery compartment based on the scanning results to obtain the battery compartment location includes: Obtain the reference edge features of the battery compartment, and obtain the reference part features of the reference part of the battery compartment; From the three-dimensional point cloud model, a first point cloud matching the reference edge features is extracted, and a second point cloud matching the reference part features is extracted; The location of the battery compartment is determined based on the three-dimensional coordinates of each point in the first point cloud and the three-dimensional coordinates of each point in the second point cloud.
6. The method as described in claim 5, characterized in that, Before determining the motion path of the main robotic arm based on the battery compartment location, the method further includes: From the three-dimensional point cloud model, a third point cloud that does not match the three-dimensional model of the battery compartment is determined, and the three-dimensional coordinates of each point in the third point cloud are used as the obstacle coordinates of the environmental obstacle. Determining the motion path of the main robotic arm based on the location of the battery compartment includes: Based on the location of the battery compartment, determine the target docking position of the battery compartment; Determine the starting position of the main robotic arm; Starting from the initial position and ending at the target docking position, the path is planned using the coordinates of the obstacles to obtain the movement path.
7. The method according to any one of claims 1-6, characterized in that, The step of adjusting the motion path based on the pose offset of the target device to obtain the adjusted motion path includes: The offset of the battery compartment is determined based on the pose offset, and the offset is applied to the battery compartment position to obtain the target battery compartment position; During the battery replacement operation performed according to the motion path, the current position of the main robotic arm is determined; Based on the target battery compartment position and the main robotic arm position, the motion path is adjusted to obtain the adjusted motion path.
8. The method as described in claim 7, characterized in that, The step of adjusting the motion path based on the target battery compartment position and the main robotic arm position to obtain the adjusted motion path includes: Determine the positional deviation between the target battery compartment position and the main robotic arm position; If the position deviation is less than the deviation threshold, the motion path is adjusted based on the target battery compartment position and the main robotic arm position to obtain the adjusted motion path; The method further includes: If the position deviation is greater than or equal to the deviation threshold, the backup robotic arm is activated to perform the task, and the target motion path of the backup robotic arm is determined based on the target battery compartment position. Following the target motion path, the backup robotic arm is controlled to continue performing the battery replacement operation.
9. The method according to any one of claims 1-6, characterized in that, The method further includes: During the battery replacement operation, based on the vertical coordinates of the battery compartment location, the main robotic arm is controlled to move in the vertical direction, and the resistance encountered by the main robotic arm is detected. If the resistance is less than the first resistance threshold, the main robotic arm is controlled to continue moving; if the resistance is greater than the second resistance threshold, the backup robotic arm is activated to perform the task.
10. A battery replacement device, characterized in that, The device includes: The positioning module is used to locate the battery compartment of the target device and obtain the battery compartment position. The determination module is used to determine the movement path of the main robotic arm based on the position of the battery compartment, and the main robotic arm is used to perform a battery replacement operation on the battery in the battery compartment. The control module is used to control the main robotic arm to perform the battery replacement operation according to the motion path, and during the execution of the battery replacement operation, adjust the motion path based on the pose offset of the target device to obtain the adjusted motion path. The control module is also used to control the main robotic arm to continue performing the battery replacement operation according to the adjusted motion path.
11. An electronic device, characterized in that, The electronic device includes: Memory is used to store executable instructions for a computer; The processor, when executing computer-executable instructions stored in the memory, implements the battery replacement method according to any one of claims 1 to 9.
12. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by the processor, the battery replacement method according to any one of claims 1 to 9 is implemented.