Obstacle avoidance planning method for electric vehicle and electric vehicle

By combining the construction of a short-term obstacle memory database with the kinematic model of the scooter, the problem of obstacle neglect when the electric scooter sensor is briefly obscured or missed is solved, and safe obstacle avoidance planning in dynamic environments is realized.

CN122431350APending Publication Date: 2026-07-21BRIGHTWAY INNOVATION INTELLIGENT TECH (SUZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BRIGHTWAY INNOVATION INTELLIGENT TECH (SUZHOU) CO LTD
Filing Date
2026-04-28
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing electric scooters may ignore some obstacles when their sensors are briefly blocked or missed, which can lead to collision risks during path planning.

Method used

By constructing a short-term obstacle memory database and combining it with the scooter's own kinematic model, the positions of historical obstacles are predicted in real time, generating a current obstacle list, and obstacle avoidance planning is performed when sensor data is missing or unstable.

Benefits of technology

It significantly improves the navigation reliability of scooters in dynamic environments, ensures safe avoidance of potentially dangerous areas, and reduces the risk of collisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122431350A_ABST
    Figure CN122431350A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides an obstacle avoidance planning method of an electric vehicle and the electric vehicle, wherein the method comprises the following steps: obtaining real-time obstacle data of the electric vehicle; determining an obstacle with a confidence value within a preset range as a first obstacle, and generating a current obstacle list according to a plurality of first obstacles, wherein the first obstacle is an obstacle that needs to be planned for obstacle avoidance by the electric vehicle; matching a plurality of historical obstacles in a memory library in the current obstacle list, wherein the memory library stores recent observation data and time stamps of a plurality of historical obstacles; in the case that a second obstacle exists in the plurality of historical obstacles and the matching between the second obstacle and the current obstacle list fails, and a first time difference between a current time stamp and a first time stamp corresponding to the second obstacle is less than a first threshold value, estimating a current position of the second obstacle, and planning obstacle avoidance for the electric vehicle according to the current position.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electric vehicles, and more specifically, to an obstacle avoidance planning method for electric vehicles and an electric vehicle. Background Technology

[0002] Electric scooters, as a lightweight and flexible short-distance transportation tool, have been widely used in recent years in areas such as shared mobility and personal transportation. To achieve intelligent following and autonomous obstacle avoidance, most existing electric scooters are equipped with lidar, visual sensors, or millimeter-wave radar, and employ local path planning algorithms such as Dynamic Window (DWA) for real-time obstacle avoidance.

[0003] However, in real-world applications of electric scooters, these scooters often operate in dynamic and complex environments such as sidewalks, plazas, and parks, where pedestrians, vehicles, and greenery frequently intersect, causing sensors (such as cameras and lidar) to experience temporary obstruction or miss detections. Traditional systems consider obstacles "disappeared" once they are no longer detected, which can easily lead to the scooter's planned path traversing areas that still pose a danger, increasing the risk of collisions.

[0004] This shows that the relevant technology has a technical problem: when the sensors of electric scooters are briefly blocked or missed, some obstacles are ignored, which makes it easy to cause collision risks when planning the path. Summary of the Invention

[0005] This application provides an obstacle avoidance planning method for electric vehicles and an electric vehicle, to at least solve the technical problem in the related art that when the sensors of an electric scooter are briefly blocked or missed, some obstacles are ignored, which easily leads to collision risks when planning the path.

[0006] According to one aspect of the embodiments of this application, an obstacle avoidance planning method for an electric vehicle is provided, comprising: acquiring real-time obstacle data of the electric vehicle, wherein the real-time obstacle data includes: confidence levels and current timestamps of multiple obstacles; identifying obstacles with confidence levels within a preset range as first obstacles, and generating a current obstacle list based on the multiple first obstacles, wherein the first obstacles are obstacles for which the electric vehicle needs to perform obstacle avoidance planning; matching multiple historical obstacles in a memory bank in the current obstacle list, wherein the memory bank stores the most recent observation data and timestamps of the multiple historical obstacles, the most recent observation data being used to indicate the relative position of the historical obstacles to the electric vehicle; and estimating the current position of the second obstacle when a second obstacle among the multiple historical obstacles fails to match the current obstacle list, and a first time difference between the current timestamp and the timestamp corresponding to the second obstacle is less than a first threshold, and performing obstacle avoidance planning for the electric vehicle based on the current position.

[0007] In some exemplary embodiments, matching multiple historical obstacles in a memory bank within a current obstacle list includes: for any third obstacle among the multiple historical obstacles, calculating the Euclidean distances between the third obstacle and multiple first obstacles in the current obstacle list based on the first most recent observation data and the second timestamp of the third obstacle, thereby obtaining multiple Euclidean distances, wherein each of the multiple first obstacles corresponds one-to-one with the multiple Euclidean distances; if it is determined that a target Euclidean distance among the multiple Euclidean distances is less than a distance threshold, determining that the third obstacle is successfully matched with the current obstacle list; if it is determined that all of the multiple Euclidean distances are greater than or equal to the distance threshold, determining that the third obstacle is not matched with the current obstacle list.

[0008] In some exemplary embodiments, the real-time obstacle data further includes: the position coordinates of the plurality of obstacles in the vehicle's auto-coordinate system; calculating the Euclidean distance between the third obstacle and the plurality of first obstacles in the current obstacle list based on the first most recent observation data and the second timestamp of the third obstacle, including: for any fourth obstacle among the plurality of first obstacles, determining the first position coordinates of the fourth obstacle in the vehicle's auto-coordinate system; determining the second position coordinates of the third obstacle in the vehicle's auto-coordinate system at the second timestamp based on the first most recent observation data and the second timestamp; performing coordinate transformation on the second position coordinates based on the displacement of the electric vehicle within the time period corresponding to the second timestamp and the current timestamp to obtain the third position coordinates of the third obstacle in the vehicle's auto-coordinate system at the current timestamp; and calculating the Euclidean distance between the third obstacle and the fourth obstacle based on the first position coordinates and the third position coordinates.

[0009] In some exemplary embodiments, the second most recently observed data of the second obstacle further includes: a first dynamic / static flag indicating the motion state of the second obstacle, and a first relative velocity between the second obstacle and the electric vehicle; the real-time obstacle data further includes: the position coordinates of the plurality of obstacles in the electric vehicle's auto-coordinate system; estimating the current position of the second obstacle includes: determining the fourth position coordinate of the second obstacle in the electric vehicle's auto-coordinate system at the first timestamp based on the second most recently observed data and the first timestamp; determining the motion mode of the electric vehicle based on the current angular velocity of the electric vehicle when the first dynamic / static flag indicates that the second obstacle is stationary; determining the motion mode as non-linear motion when the current angular velocity is greater than a third threshold; determining the first displacement component of the electric vehicle based on the auto-rotation angle and motion arc radius included in the first relative velocity, and the first time difference, and performing coordinate transformation on the fourth position coordinates based on the first displacement component to obtain the current position.

[0010] In some exemplary embodiments, after determining the operating mode of the electric vehicle based on its current angular velocity, the method further includes: determining the motion mode as linear motion if the current angular velocity is less than or equal to the third threshold; determining a second displacement component of the electric vehicle based on its current velocity and the first time difference, wherein the first relative velocity includes the current velocity; and performing coordinate transformation on the fourth position coordinates based on the second displacement component to obtain the current position.

[0011] In some exemplary embodiments, the second most recently observed data of the second obstacle further includes: a first dynamic / static flag indicating the motion state of the second obstacle, and a first relative velocity between the second obstacle and the electric vehicle; the real-time obstacle data further includes: the position coordinates of the plurality of obstacles in the vehicle's auto-coordinate system; estimating the current position of the second obstacle includes: determining the fourth position coordinate of the second obstacle in the vehicle's auto-coordinate system at the first timestamp based on the second most recently observed data and the first timestamp; calculating a third displacement component of the second obstacle based on the first relative velocity and the first time difference when the first dynamic / static flag indicates that the second obstacle is in motion; and performing coordinate transformation on the fourth position coordinates based on the third displacement component to obtain the current position.

[0012] In some exemplary embodiments, the first most recently observed data further includes: a second dynamic / static flag indicating the motion state of the third obstacle, and a second relative velocity between the third obstacle and the electric vehicle; the real-time obstacle data further includes: the position coordinates of the plurality of obstacles in the vehicle's auto-coordinate system; the step of calculating the Euclidean distance between the third obstacle and the plurality of first obstacles in the current obstacle list based on the first most recently observed data and the second timestamp of the third obstacle includes: for any fourth obstacle among the plurality of first obstacles, determining the first position coordinate of the fourth obstacle in the vehicle's auto-coordinate system; and determining the second position coordinate of the third obstacle in the vehicle's auto-coordinate system at the second timestamp based on the first most recently observed data and the second timestamp. The coordinates are set; when the second dynamic and static flag indicates that the third obstacle is stationary, the motion mode of the electric vehicle is determined according to the current angular velocity of the electric vehicle; when the current angular velocity is greater than a third threshold, the motion mode is determined to be non-linear motion; the fourth displacement component of the electric vehicle is determined according to the second relative velocity including the vehicle's turning angle and the radius of the motion arc, and the second time difference, and the second position coordinates are transformed according to the fourth displacement component to obtain the fifth position coordinates of the third obstacle in the electric vehicle's vehicle coordinate system at the current timestamp, wherein the second time difference is the time difference between the second timestamp and the current timestamp; the Euclidean distance between the third obstacle and the fourth obstacle is calculated according to the first position coordinates and the fifth position coordinates.

[0013] In some exemplary embodiments, after determining the motion mode of the electric vehicle based on its current angular velocity, the method further includes: determining that the motion mode is linear motion if the current angular velocity is less than or equal to the third threshold; determining a fifth displacement component of the electric vehicle based on its current velocity and the second time difference, and performing coordinate transformation on the second position coordinates based on the fifth displacement component to obtain the sixth position coordinates of the third obstacle in the electric vehicle's self-vehicle coordinate system at the current timestamp, wherein the second relative velocity includes the current velocity; and calculating the Euclidean distance between the third obstacle and the fourth obstacle based on the first position coordinates and the sixth position coordinates.

[0014] In some exemplary embodiments, the first most recently observed data further includes: a second dynamic / static flag indicating the motion state of the third obstacle, and a second relative velocity between the third obstacle and the electric vehicle; the real-time obstacle data further includes: the position coordinates of the plurality of obstacles in the vehicle's auto-coordinate system; the step of calculating the Euclidean distance between the third obstacle and the plurality of first obstacles in the current obstacle list based on the first most recently observed data and the second timestamp of the third obstacle includes: for any fourth obstacle among the plurality of first obstacles, determining the first position coordinates of the fourth obstacle in the vehicle's auto-coordinate system; based on the first most recently observed data and the... The second timestamp determines the second position coordinates of the third obstacle in the vehicle's coordinate system at the second timestamp; when the second dynamic / static flag indicates that the third obstacle is in motion, the sixth displacement component of the third obstacle is calculated based on the second relative speed and the second time difference, wherein the second time difference is the time difference between the second timestamp and the current timestamp; the second position coordinates are transformed based on the sixth displacement component to obtain the seventh position coordinates of the third obstacle in the vehicle's coordinate system at the current timestamp; the Euclidean distance between the third obstacle and the fourth obstacle is calculated based on the first position coordinates and the seventh position coordinates.

[0015] In some exemplary embodiments, estimating the current position of the second obstacle includes: determining the eighth position coordinates of the plurality of historical obstacles in the vehicle coordinate system of the electric vehicle at the current timestamp; and determining the current position based on the plurality of eighth position coordinates, wherein the plurality of historical obstacles correspond one-to-one with the plurality of seventh positions.

[0016] In some exemplary embodiments, obstacle avoidance planning for the electric vehicle based on the current position includes: when the second distance is greater than or equal to a second threshold, performing obstacle avoidance planning for the electric vehicle based on the current obstacle list; when the second distance is less than the second threshold, adding the second obstacle to the current obstacle list, and performing obstacle avoidance planning for the electric vehicle based on the updated current obstacle list.

[0017] In some exemplary embodiments, after determining that the third obstacle successfully matches the current obstacle list, the method further includes: determining the fifth obstacle corresponding to the target Euclidean distance, wherein the plurality of first obstacles includes the fifth obstacle; and updating the first most recently observed data and the second timestamp of the third obstacle in the memory bank according to the real-time obstacle data of the fifth obstacle.

[0018] In some exemplary embodiments, after matching multiple historical obstacles in the memory bank in the current obstacle list, the method further includes: for any sixth obstacle among the multiple historical obstacles, determining whether a third time difference between the third timestamp of the sixth obstacle and the current timestamp is greater than or equal to a first threshold, and determining whether a first distance between the sixth obstacle and the electric vehicle is greater than or equal to a second threshold; if the second time difference is greater than or equal to the first threshold, or the first distance is greater than or equal to the second threshold, removing the sixth obstacle from the memory bank.

[0019] In some exemplary embodiments, after matching multiple historical obstacles in the memory bank in the current obstacle list, the method further includes: matching multiple first obstacles in the memory bank; and if it is determined that a seventh obstacle among the multiple first obstacles fails to match the memory bank, adding the real-time obstacle data of the seventh obstacle to the memory bank.

[0020] In some exemplary embodiments, determining an obstacle with a confidence level within a preset range as a first obstacle includes: determining an obstacle with a confidence level within the preset range and a relative distance less than a second threshold as the first obstacle, wherein the relative distance is the distance between the electric vehicle and the obstacle; wherein, after determining an obstacle with a confidence level within the preset range as the first obstacle, the method further includes: determining an obstacle with a confidence level greater than a fourth threshold as a following target of the electric vehicle, and controlling the electric vehicle to follow the following target, wherein the fourth threshold is the upper bound of the preset range; determining obstacles with a confidence level less than a fifth threshold, or a relative distance greater than or equal to the second threshold as other obstacles, and prohibiting obstacle avoidance planning for the other obstacles, wherein the fifth threshold is the lower bound of the preset range.

[0021] According to another aspect of the embodiments of this application, an electric vehicle is also provided, comprising: a perception module, configured to acquire real-time obstacle data of the electric vehicle, wherein the real-time obstacle data includes: the confidence level of the obstacle and a current timestamp; an obstacle determination module, connected to the perception module, configured to determine obstacles with confidence levels within a preset range as first obstacles, and generate a current obstacle list based on a plurality of first obstacles, wherein the first obstacles are obstacles for which the electric vehicle needs to perform obstacle avoidance planning; a matching module, connected to the obstacle determination module, configured to match a plurality of historical obstacles in a memory bank in the current obstacle list, wherein the memory bank stores the most recent observation data and timestamps of the plurality of historical obstacles, and the most recent observation data is used to indicate the relative position of the historical obstacles and the electric vehicle; and an obstacle avoidance planning module, connected to the matching module, configured to estimate the current position of the second obstacle when a second obstacle among the plurality of historical obstacles fails to match the current obstacle list, and a first time difference between the current timestamp and the timestamp corresponding to the second obstacle is less than a first threshold, and perform obstacle avoidance planning for the electric vehicle based on the current position.

[0022] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the computer device to perform the steps in any of the method embodiments described above.

[0023] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to perform the steps of any of the above method embodiments through the computer program.

[0024] According to the embodiments provided in this application, after obtaining real-time obstacle data of an electric vehicle, obstacles with confidence levels within a preset range are identified as first obstacles, and a current obstacle list containing multiple first obstacles is generated. The real-time obstacle data includes the confidence levels and current timestamps of multiple obstacles, and the first obstacles are those for which the electric vehicle needs obstacle avoidance planning. Then, the current obstacle list is matched with multiple historical obstacles in the memory bank that are of the same category as the first obstacles and for which the electric vehicle needs obstacle avoidance planning. The memory bank stores the most recent observation data and timestamps of multiple historical obstacles, and the most recent observation data is used to indicate the relative position of the historical obstacles and the electric vehicle. If there is a second obstacle among the multiple historical obstacles that fails to match the current obstacle list, and the first time difference between the current timestamp and the first timestamp corresponding to the second obstacle is less than a first threshold, the current position of the second obstacle is estimated, and obstacle avoidance planning is performed on the electric vehicle based on the current position. By constructing a short-term obstacle memory database and combining it with the scooter's own kinematic model to predict the location of historical obstacles in real time, the scooter can still safely avoid potentially dangerous areas (i.e., areas where undetected obstacles are located) even when sensor data is missing or unstable, thus significantly improving the navigation reliability of the scooter in dynamic environments. This also solves the problem in related technologies where some obstacles are ignored when the electric scooter's sensors are temporarily blocked or missed, leading to collision risks during path planning. Attached Figure Description

[0025] The accompanying drawings, which form part of this application, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. In the drawings:

[0026] Figure 1 This is a schematic diagram illustrating an application scenario of an obstacle avoidance planning method for an electric vehicle according to an embodiment of this application.

[0027] Figure 2 This is a flowchart of an optional obstacle avoidance planning method for an electric vehicle according to an embodiment of this application.

[0028] Figure 3 This is a schematic diagram of the overall process of an optional obstacle avoidance planning method for an electric vehicle according to an embodiment of this application.

[0029] Figure 4 This is a schematic diagram of an optional obstacle classification standard according to an embodiment of this application.

[0030] Figure 5 This is a flowchart illustrating an optional obstacle avoidance method based on vehicle kinematics compensation for dynamic and static obstacle memory and prediction, according to an embodiment of this application.

[0031] Figure 6 This is a structural block diagram of an optional electric vehicle according to an embodiment of this application. Detailed Implementation

[0032] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0033] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0034] According to one aspect of the embodiments of this application, an obstacle avoidance planning method for an electric vehicle is provided. Optionally, in this embodiment, the above-described obstacle avoidance planning method for an electric vehicle may be applied, but is not limited to, to applications such as... Figure 1 The hardware environment shown includes an electric scooter 102, a control terminal 104, and a server 106. The electric scooter 102 may have network connectivity, and the server 106 can connect to the electric scooter 102 via the network. It can be used to provide services (e.g., application services, location services, etc.) to the electric scooter 102 or clients installed on the electric scooter 102. A database can be set up on or independently of the server 106 to provide data storage services to the server 106.

[0035] The control terminal 104 can be a mobile terminal or controller bound to the electric scooter 102. The electric scooter 102 can communicate with the control terminal 104 via a wireless network, which can include, but is not limited to, at least one of the following: Wireless Fidelity (WIFI) and Bluetooth. Optionally, the control terminal 104 can also be directly connected to the electric scooter 102 via a data cable or other connecting cable, and transmit signals based on the connecting cable to realize the interaction between the control terminal 104 and the electric scooter 102.

[0036] The electric scooter 102 may include components such as the frame, front wheel, rear wheel, and seat, and may also include a Vehicle Control Unit (VCU), a complex system integrating hardware and software. For the hardware portion, the VCU may contain one or more microprocessors, microcontroller units (MCUs), and necessary input / output interfaces, memory, power modules, communication modules, etc. These hardware components constitute the physical foundation of the VCU, enabling it to receive signals, process data, send control commands, and communicate with other vehicle subsystems or external devices. For the software portion, the VCU's software may include an embedded operating system, application programs, control algorithms, and diagnostic programs. The software is responsible for parsing data from sensors and subsystems, performing complex calculations and logical judgments, and generating control signals for actuators. The software is typically written to handle functions such as vehicle powertrain, energy management, and safety control.

[0037] When electric scooters are following a user or avoiding obstacles, the target user or obstacle often "disappears" temporarily due to turning, obstruction, sensor noise, or other reasons. Existing systems lack short-term memory mechanisms and cannot continuously track and predict the position of historical obstacles, leading to losing the target or accidentally entering dangerous areas.

[0038] To at least partially solve the above problems, this embodiment proposes a lightweight and efficient dynamic obstacle handling mechanism. By constructing a short-term obstacle memory (equivalent to the aforementioned memory) and combining it with the scooter's own kinematic model, the mechanism can predict the location of historical obstacles in real time. This enables the scooter to maintain safe avoidance of potentially dangerous areas even when sensor data is missing or unstable, significantly improving the navigation reliability of the scooter in dynamic environments.

[0039] The obstacle avoidance planning method for electric vehicles in this application embodiment can be executed by the electric scooter 102, or it can be executed jointly by the electric scooter 102 and at least one of the control terminal 104 and the server 106.

[0040] Taking the electric scooter 102 as an example to implement the obstacle avoidance planning method for electric vehicles in this embodiment, Figure 2 This is a flowchart illustrating an optional obstacle avoidance planning method for an electric vehicle according to an embodiment of this application, as shown below. Figure 2 As shown, the process of this method may include the following steps:

[0041] S202, acquire real-time obstacle data of the electric vehicle, wherein the real-time obstacle data includes: the confidence level of the obstacle and the current timestamp;

[0042] It should be noted that the current timestamp mentioned above can be understood as the timestamp of the moment when real-time obstacle data was obtained.

[0043] Optionally, the aforementioned real-time obstacle data may also include the position coordinates of the obstacle in the electric vehicle's vehicle coordinate system, used to determine the relative position of the obstacle and the electric vehicle.

[0044] S204, the obstacles with confidence levels within a preset range are identified as first obstacles, and a current obstacle list is generated based on multiple first obstacles, wherein the first obstacles are obstacles for which the electric vehicle needs to perform obstacle avoidance planning;

[0045] It should be noted that the first obstacle can be understood as an ordinary obstacle that requires obstacle avoidance planning during the operation of an electric vehicle. The above preset range can be set to 0.3-1.0 (for example only).

[0046] S206, Match multiple historical obstacles in the memory bank in the current obstacle list, wherein the memory bank stores the most recent observation data and timestamps of the multiple historical obstacles, and the most recent observation data is used to indicate the relative position of the historical obstacles and the electric vehicle;

[0047] It should be noted that the aforementioned historical obstacles can be understood as ordinary obstacles identified by electric vehicles in the past few time points, that is, obstacles of the same category as the first obstacle that required obstacle avoidance planning in the past few time points.

[0048] S208, if a second obstacle fails to match the current obstacle list among the multiple historical obstacles, and the first time difference between the current timestamp and the timestamp corresponding to the second obstacle is less than a first threshold, the current position of the second obstacle is estimated, and obstacle avoidance planning is performed on the electric vehicle based on the current position.

[0049] Here, the electric scooter 102 can be a vehicle that operates on electricity. Furthermore, the obstacle avoidance planning method for other similar electric vehicles, such as electric tricycles, electric unicycles, and other electric light vehicles, as well as intelligent electric machines requiring obstacle avoidance planning, such as robotic vacuum cleaners, is also applicable to electric vehicles in this embodiment.

[0050] According to the embodiments provided in this application, after obtaining real-time obstacle data of an electric vehicle, obstacles with confidence levels within a preset range are identified as first obstacles, and a current obstacle list containing multiple first obstacles is generated. The real-time obstacle data includes the obstacle's confidence level and current timestamp, and the first obstacles are those for which the electric vehicle needs obstacle avoidance planning. Then, among the multiple first obstacles in the current obstacle list, multiple historical obstacles in the memory bank that are of the same category as the first obstacles and for which the electric vehicle needs obstacle avoidance planning are matched. The memory bank stores the most recent observation data and timestamps of multiple historical obstacles, and the most recent observation data is used to indicate the relative position of the historical obstacles and the electric vehicle. If there is a second obstacle among the multiple historical obstacles that fails to match the current obstacle list, and the first time difference between the current timestamp and the timestamp corresponding to the second obstacle is less than a first threshold, the current position of the second obstacle is estimated, and obstacle avoidance planning is performed on the electric vehicle based on the current position. By constructing a short-term obstacle memory database and combining it with the scooter's own kinematic model to predict the location of historical obstacles in real time, the scooter can still safely avoid potentially dangerous areas (i.e., areas where undetected obstacles are located) even when sensor data is missing or unstable, thus significantly improving the navigation reliability of the scooter in dynamic environments. This also solves the problem in related technologies where some obstacles are ignored when the electric scooter's sensors are temporarily blocked or missed, leading to collision risks during path planning.

[0051] In an exemplary embodiment, the specific implementation process of matching multiple historical obstacles in the memory bank in the current obstacle list in step S206 above includes: for any third obstacle among the multiple historical obstacles, calculating the Euclidean distance between the third obstacle and multiple first obstacles in the current obstacle list based on the first most recent observation data and the second timestamp of the third obstacle, obtaining multiple Euclidean distances, wherein the multiple first obstacles correspond one-to-one with the multiple Euclidean distances; if it is determined that there is a target Euclidean distance less than a distance threshold among the multiple Euclidean distances, it is determined that the third obstacle is successfully matched with the current obstacle list; if it is determined that all of the multiple Euclidean distances are greater than or equal to the distance threshold, it is determined that the third obstacle is not matched with the current obstacle list.

[0052] When matching historical obstacles with the current detection list, the system calculates the distance between each third obstacle in the memory and each first obstacle in the current obstacle list, for example, by calculating the Euclidean distance between them.

[0053] For example, if any Euclidean distance is less than a preset distance threshold, the historical obstacle is determined to be the same entity as the currently detected object, and the matching process is completed. If all Euclidean distances are greater than or equal to the distance threshold, the historical obstacle is determined not to have been re-perceived in the current frame, the matching fails, and the subsequent kinematic prediction process is triggered. This process does not require identification or feature descriptors and relies entirely on spatial proximity to complete lightweight target association.

[0054] This mechanism enables efficient, ID-free continuous obstacle tracking on low-computing-power platforms, effectively addressing intermittent sensor occlusion and noise interference, and improving the system's perception robustness in complex dynamic environments with crowds.

[0055] In an exemplary embodiment, the real-time obstacle data further includes: the position coordinates of the plurality of obstacles in the vehicle's auto-coordinate system; calculating the Euclidean distance between the third obstacle and the plurality of first obstacles in the current obstacle list based on the first most recent observation data and the second timestamp of the third obstacle, including: for any fourth obstacle among the plurality of first obstacles, determining the first position coordinate of the fourth obstacle in the vehicle's auto-coordinate system; determining the second position coordinate of the third obstacle in the vehicle's auto-coordinate system at the second timestamp based on the first most recent observation data and the second timestamp; performing coordinate transformation on the second position coordinate based on the displacement of the electric vehicle within the time period corresponding to the second timestamp and the current timestamp to obtain the third position coordinate of the third obstacle in the vehicle's auto-coordinate system at the current timestamp; and calculating the Euclidean distance between the third obstacle and the fourth obstacle based on the first position coordinate and the third position coordinate.

[0056] Real-time obstacle data includes the two-dimensional position coordinates of each obstacle in the electric scooter's own coordinate system. This coordinate system has the handlebar center as the origin and the forward direction as the positive x-axis, serving as the unified reference benchmark for all perception and planning calculations in the system. When a historical obstacle entry in the memory bank is not re-detected in the current frame, the system uses its last observed position and timestamp, combined with the scooter's own motion trajectory during that time period (i.e., arc or linear displacement driven by linear and angular velocities), to reversely calculate the obstacle's relative spatial position at the current moment. This process is not a simple translation, but rather a reverse transformation of the historical observation points according to the rotation and translation vectors of the scooter's motion, restoring the obstacle's true relative pose in the current coordinate system. Then, it calculates the Euclidean distance between the obstacle and the position of each obstacle in the current detection list, achieving cross-frame identity association.

[0057] Among them, the Euclidean distance calculation uses the predicted coordinates after motion compensation, rather than the original observation value, to avoid misjudgment caused by the movement of the vehicle, and significantly improves matching accuracy, especially when turning and accelerating. This system enables the system to accurately maintain the spatial memory of the target obstacle even when the lidar is briefly blocked by pedestrians or the camera frame is lost, ensuring that the obstacle avoidance decision does not fail due to data discontinuity.

[0058] This embodiment achieves accurate cross-frame localization of historical obstacles through kinematic compensation, significantly improving the stability of target tracking and the reliability of obstacle avoidance under dynamic occlusion.

[0059] Based on the above steps, the second most recently observed data of the second obstacle further includes: a first dynamic and static flag indicating the motion state of the second obstacle, and a first relative velocity between the second obstacle and the electric vehicle; the real-time obstacle data further includes: the position coordinates of the plurality of obstacles in the electric vehicle's auto-coordinate system; estimating the current position of the second obstacle includes: determining the fourth position coordinate of the second obstacle in the electric vehicle's auto-coordinate system at the first timestamp based on the second most recently observed data and the first timestamp; when the first dynamic and static flag indicates that the second obstacle is stationary, determining the motion mode of the electric vehicle based on the current angular velocity of the electric vehicle; when the current angular velocity is greater than a third threshold, determining that the motion mode is non-linear motion; determining the first displacement component of the electric vehicle based on the auto-rotation angle and motion arc radius included in the first relative velocity, and the first time difference, and performing coordinate transformation on the fourth position coordinates based on the first displacement component to obtain the current position.

[0060] The most recent observation data of the second obstacle includes its spatial position in the vehicle's coordinate system, motion status identifier, and relative velocity vector. The motion status identifier is a Boolean flag used to distinguish whether the obstacle is a stationary object (such as a bollard or flower bed) or a dynamic target (such as a pedestrian or cyclist). The relative velocity is calculated by the perception module through continuous frame displacement, reflecting the relative motion trend between the obstacle and the scooter. The system uses the last observation timestamp as a reference to obtain the obstacle's position coordinates at that moment. Then, combining the time difference between the current moment and the last observation, it synchronously obtains the scooter's linear velocity and angular velocity within this interval. If the angular velocity exceeds a critical threshold of 0.1 rad / s, the system determines that the scooter is in a non-linear motion state. At this time, the scooter's trajectory is an arc, and its turning radius is determined by... Linear velocity is calculated from angular velocity, and then the displacement component of the scooter in time dt is deduced. This displacement is based on a pure geometric transformation of the scooter's rotation center, rather than a simple linear interpolation. The stationary obstacle is fixed in space, and its true position does not change. What changes is the observation coordinate system itself. Therefore, the historical coordinates of the obstacle need to be translated and rotated in reverse, using the scooter's own motion trajectory as a reference, to map it from the observation coordinate system of the previous frame to the scooter's own coordinate system in the current frame, and finally obtain the predicted position of the obstacle at the current moment. This process does not rely on the obstacle's own motion model, but only uses the scooter's kinematics to infer the coordinate offset, avoiding incorrect modeling of unknown dynamic behavior, reducing computational complexity, and improving the spatial memory accuracy of stationary obstacles in complex motion scenarios such as sharp turns and side shifts.

[0061] This embodiment achieves accurate positioning of stationary obstacles in the event of intermittent sensor readings through inverse kinematics compensation of the vehicle, significantly improving the stability and safety of the obstacle avoidance system during dynamic riding.

[0062] Optionally, after determining the operating mode of the electric vehicle based on its current angular velocity, the method further includes: determining the motion mode as linear motion if the current angular velocity is less than or equal to the third threshold; determining a second displacement component of the electric vehicle based on its current velocity and the first time difference, wherein the first relative velocity includes the current velocity; and performing coordinate transformation on the fourth position coordinates based on the second displacement component to obtain the current position.

[0063] When the current angular velocity of the electric scooter is less than or equal to a threshold of 0.1 rad / s, the system determines that it is in a straight-line motion mode. At this time, the vehicle trajectory is approximately a uniform straight line. There is no need to consider the coordinate system deflection caused by rotation. It only needs to calculate the linear displacement component of the vehicle within the time interval based on the real-time linear velocity and the time difference between the last observation timestamp and the current timestamp. This displacement directly reflects the forward movement distance of the vehicle along the x-axis. It is a simple geometric deduction based on kinematic integrals and does not involve the calculation of arc radius or turning angle. The system translates the stationary obstacle at the observation coordinate point of the previous frame by this displacement along the reverse x-axis to complete the mapping from the historical coordinate system to the current coordinate system. No rotation matrix is ​​required, and the computational overhead is extremely low. It is suitable for high-speed straight-line or slow-speed cruising scenarios. This strategy avoids unnecessary complex mathematical calculations while ensuring the accuracy of position prediction. It is adapted to the limited embedded computing resources of the scooter and ensures that all prediction and update operations are completed within the control cycle.

[0064] This embodiment achieves lightweight processing of stationary obstacle prediction by distinguishing between linear and non-linear motion modes, significantly reducing computational load and improving the system's real-time response capability while ensuring obstacle avoidance reliability.

[0065] In an exemplary embodiment, the second most recently observed data of the second obstacle further includes: a first dynamic / static flag indicating the motion state of the second obstacle, and a first relative velocity between the second obstacle and the electric vehicle; the real-time obstacle data further includes: the position coordinates of the plurality of obstacles in the vehicle's auto-coordinate system; estimating the current position of the second obstacle includes: determining the fourth position coordinates of the second obstacle in the vehicle's auto-coordinate system at the first timestamp based on the second most recently observed data and the first timestamp; calculating a third displacement component of the second obstacle based on the first relative velocity and the first time difference when the first dynamic / static flag indicates that the second obstacle is in motion; and performing coordinate transformation on the fourth position coordinates based on the third displacement component to obtain the current position.

[0066] The most recent observation data of the second obstacle includes its spatial position in the vehicle coordinate system, motion status flag, and relative velocity vector. The motion status flag is a Boolean identifier that clearly distinguishes between static and dynamic targets, used to determine whether the obstacle is a static or dynamic obstacle. Relative velocity is the speed at which an obstacle moves relative to the scooter, calculated by the perception module based on continuous frame displacement. It includes x and y components and reflects the obstacle's approaching or receding trend from the vehicle's perspective. The system uses the timestamp of the obstacle's last successful detection as a reference to extract its coordinate position at that time, which serves as the prediction starting point. When a flag indicates that the obstacle is in motion, the system no longer relies on the vehicle's motion to infer its movement. Instead, it directly calculates the obstacle's independent displacement in physical space based on the relative velocity and time interval. This displacement represents the obstacle's actual movement in the global environment. It is then substituted into the current vehicle coordinate system for coordinate mapping, completing the accurate conversion from the historical observation point to the current prediction point. This method skips the consideration of the vehicle's motion and focuses on the continuity of the obstacle's trajectory, avoiding the superposition error introduced by coordinate system transformation when the vehicle makes sharp turns or accelerates. It effectively suppresses target position drift, especially in scenarios with multiple people traveling in parallel or intersecting traffic.

[0067] This embodiment achieves highly robust position prediction by independently modeling the motion trajectory of dynamic obstacles. Even when the sensor is lost for a short time, it can still maintain stable tracking of moving targets, significantly improving the accuracy of obstacle avoidance and the real-time performance of system response in complex environments.

[0068] Optionally, the first most recently observed data further includes: a second dynamic / static flag indicating the motion state of the third obstacle, and a second relative velocity between the third obstacle and the electric vehicle; the real-time obstacle data further includes: the position coordinates of the plurality of obstacles in the electric vehicle's auto-coordinate system; the step of calculating the Euclidean distance between the third obstacle and the plurality of first obstacles in the current obstacle list based on the first most recently observed data and the second timestamp of the third obstacle includes: for any fourth obstacle among the plurality of first obstacles, determining the first position coordinates of the fourth obstacle in the electric vehicle's auto-coordinate system; and determining the second position coordinates of the third obstacle in the electric vehicle's auto-coordinate system at the second timestamp based on the first most recently observed data and the second timestamp. When the second dynamic / static flag indicates that the third obstacle is stationary, the motion mode of the electric vehicle is determined based on its current angular velocity. If the current angular velocity is greater than a third threshold, the motion mode is determined to be non-linear motion. The fourth displacement component of the electric vehicle is determined based on the second relative velocity, including the vehicle's turning angle and the radius of the motion arc, and the second time difference. The second position coordinates are then transformed based on the fourth displacement component to obtain the fifth position coordinates of the third obstacle in the electric vehicle's vehicle coordinate system at the current timestamp, where the second time difference is the time difference between the second timestamp and the current timestamp. The Euclidean distance between the third obstacle and the fourth obstacle is calculated based on the first position coordinates and the fifth position coordinates.

[0069] The most recent observation data of the third obstacle includes its spatial position in the vehicle coordinate system, motion status flag, and relative speed. The flag is used to determine whether the target is a stationary obstacle or a dynamic obstacle. The system uses the timestamp of the last time the obstacle was detected as a reference to locate its coordinates at that moment. Then, based on the time difference between the current timestamp and the last observation, combined with the scooter's angular velocity at this time, it determines the scooter's motion pattern. When the angular velocity exceeds the threshold of 0.1 rad / s, the scooter is considered to be turning. At this time, the vehicle's trajectory is an arc, and its turning radius is calculated by dividing the linear velocity by the angular velocity. The scooter generates lateral and longitudinal displacement components along the arc within the time interval. The position of the stationary obstacle in space remains unchanged, and the change in its observed coordinates only comes from the rotation and translation of the scooter's coordinate system. Therefore, the historical coordinate points need to be corrected by the inverse transformation of the scooter's motion. That is, through rotation matrix and displacement compensation, the historical coordinate points are mapped from the observed coordinate system of the previous frame to the current scooter's coordinate system to obtain its prediction at the current moment. Then, the Euclidean distance is matched with the coordinates of each obstacle in the current detection list to determine whether they are the same target. This process does not assume obstacle motion, but only infers the coordinate offset from the scooter's kinematics to avoid target misjudgment or loss due to sensor occlusion or frame loss.

[0070] Optionally, after determining the motion mode of the electric vehicle based on its current angular velocity, the method further includes: determining the motion mode as linear motion if the current angular velocity is less than or equal to the third threshold; determining the fifth displacement component of the electric vehicle based on its current velocity and the second time difference, and performing coordinate transformation on the second position coordinates based on the fifth displacement component to obtain the sixth position coordinates of the third obstacle in the electric vehicle's self-vehicle coordinate system at the current timestamp, wherein the second relative velocity includes the current velocity; and calculating the Euclidean distance between the third obstacle and the fourth obstacle based on the first position coordinates and the sixth position coordinates.

[0071] When the current angular velocity of the electric scooter is less than or equal to 0.1 rad / s, the system determines that it is in a straight-line motion state. At this time, the vehicle has no obvious steering, and the motion trajectory is approximately a uniform straight line. It is only necessary to calculate the pure forward displacement of the vehicle within this interval based on the linear velocity and the time difference between the last observation timestamp and the current timestamp. This displacement is the actual offset of the origin of the vehicle's coordinate system in space. The position of the delicate obstacle in the physical world does not change. The change of its observed coordinates is entirely caused by the translation of the vehicle. Therefore, by translating the coordinates of the obstacle in the previous frame along the reverse x-axis by this displacement, the alignment from the historical observation coordinate system to the current coordinate system can be completed without rotation processing. The calculation process is simple and efficient. This method does not rely on the motion information of the obstacle itself. It only infers the spatial relationship through the motion of the vehicle. It is suitable for common working conditions such as high-speed star and slow cruise, which significantly reduces the computational burden. Finally, the Euclidean distance between the corrected obstacle position and the coordinates of each obstacle in the current detection list is calculated to achieve accurate matching and avoid duplicate modeling or target deletion caused by coordinate drift.

[0072] In some exemplary embodiments, the first most recently observed data further includes: a second dynamic / static flag indicating the motion state of the third obstacle, and a second relative velocity between the third obstacle and the electric vehicle; the real-time obstacle data further includes: the position coordinates of the plurality of obstacles in the vehicle's auto-coordinate system; the step of calculating the Euclidean distance between the third obstacle and the plurality of first obstacles in the current obstacle list based on the first most recently observed data and the second timestamp of the third obstacle includes: for any fourth obstacle among the plurality of first obstacles, determining the first position coordinates of the fourth obstacle in the vehicle's auto-coordinate system; based on the first most recently observed data and the... The second timestamp determines the second position coordinates of the third obstacle in the vehicle's coordinate system at the second timestamp; when the second dynamic / static flag indicates that the third obstacle is in motion, the sixth displacement component of the third obstacle is calculated based on the second relative speed and the second time difference, wherein the second time difference is the time difference between the second timestamp and the current timestamp; the second position coordinates are transformed based on the sixth displacement component to obtain the seventh position coordinates of the third obstacle in the vehicle's coordinate system at the current timestamp; the Euclidean distance between the third obstacle and the fourth obstacle is calculated based on the first position coordinates and the seventh position coordinates.

[0073] The most recent observation data of the third obstacle includes its position in the vehicle's coordinate system, motion status flag, and relative velocity. The flag clearly distinguishes whether it is a static or dynamic obstacle. The relative velocity is a two-dimensional motion vector of the obstacle relative to the scooter, calculated by the perception module based on consecutive frames, reflecting its approaching or deviating trend from the vehicle's perspective. The system uses the timestamp of the obstacle's last detection as a reference to obtain its position coordinates at that time. When the flag indicates that it is in motion, the system no longer relies on the vehicle's motion to infer the obstacle's position but directly calculates the relative displacement between the obstacle and the scooter based on the relative velocity and time difference. Based on this relative displacement, the second position coordinate is transformed to obtain the predicted position of the obstacle at the current moment. Finally, by calculating the Euclidean distance between the predicted position and the coordinates of each obstacle in the current detection list, target matching is completed, avoiding misjudgment or loss due to sensor omissions or occlusions. This method skips the complex calculations of traditional coordinate system transformation and directly performs spatial prediction based on relative motion, significantly reducing the computational load.

[0074] In some exemplary embodiments, estimating the current position of the second obstacle includes: determining the eighth position coordinates of the plurality of historical obstacles in the vehicle coordinate system of the electric vehicle at the current timestamp; and determining the current position based on the plurality of eighth position coordinates, wherein the plurality of historical obstacles correspond one-to-one with the plurality of seventh positions.

[0075] Within each control cycle, the system extracts all historical obstacles from the short-term memory that have not been updated by the current perception but are still within the effective time window. Each obstacle has been updated to its predicted position at the current timestamp through a kinematic model. These positions are the eighth position coordinates, which are independent spatial estimates derived from vehicle motion compensation or relative speed extrapolation, rather than raw sensor readings. The system does not rely on a single observation point but treats these historical observation points as multiple reliable samples of the same target on the time axis. By calculating their centroid or median coordinates as the final current position estimate, it effectively filters out abnormal deviations caused by brief occlusion, noise interference, or single-frame false detection. Especially in complex environments such as pedestrians turning, vehicles entering or leaving blind spots, or tree shadows swaying, this aggregation mechanism significantly improves the stability of target localization and avoids path changes or emergency braking caused by single-point failures.

[0076] This embodiment achieves robust position estimation of disappearing obstacles through a spatial aggregation strategy of multiple historical prediction points. It can maintain stable obstacle avoidance decisions even when the sensors are unreliable, and significantly reduce the risk of false triggering and losing track of the target.

[0077] In some exemplary embodiments, obstacle avoidance planning for the electric vehicle based on the current location includes: calculating a second distance between the second obstacle and the electric vehicle based on the current location; if the second distance is greater than or equal to a second threshold, performing obstacle avoidance planning for the electric vehicle based on the current obstacle list; if the second distance is less than the second threshold, adding the second obstacle to the current obstacle list, and performing obstacle avoidance planning for the electric vehicle based on the updated current obstacle list.

[0078] Based on the predicted current position of historical obstacles, the system calculates the real-time distance between the obstacle and the electric scooter. When this distance exceeds a safety threshold (e.g., 5m), the target is considered to be far from the risk area and does not need to participate in the current obstacle avoidance decision. The system only uses the current obstacle list composed of real-time detected obstacles to drive the DWA planner to generate control commands, ensuring that the path search focuses on close targets that truly pose a threat. When the predicted position shows that the distance to the obstacle is less than the threshold, the system re-includes it in the current obstacle list and participates in the obstacle avoidance calculation as a potential collision object. Even if the target is not directly observed by the sensor, its historical predicted trajectory is still regarded as an effective risk source. This mechanism enables the scooter to maintain continuous obstacle avoidance capability when facing temporary obstruction, sensor blind spots, or low-confidence targets, avoiding entering dangerous areas due to missed obstacles, while preventing low-confidence distant targets from interfering with path planning and improving decision-making efficiency.

[0079] In some exemplary embodiments, after determining that the third obstacle successfully matches the current obstacle list, the method further includes: determining the fifth obstacle corresponding to the target Euclidean distance, wherein the plurality of first obstacles includes the fifth obstacle; and updating the first most recently observed data and the second timestamp of the third obstacle in the memory bank according to the real-time obstacle data of the fifth obstacle.

[0080] Once the system confirms that a historical obstacle and the currently detected fifth obstacle are the same target through Euclidean distance matching, it immediately overwrites the old record of the obstacle in the memory bank with the latest perception data (including its precise position in the vehicle coordinate system, motion status flags, and relative speed, etc.) and refreshes its last observation timestamp. This operation is not a simple overwrite, but a seamless regression from the predicted state to the actual observation, ensuring that the information in the memory bank is always anchored on the latest perception, avoiding trajectory drift caused by long-term reliance on model prediction. Especially after the occlusion is removed, the system can immediately resume high-precision tracking instead of slowly converging, ensuring the continuity and accuracy of following and obstacle avoidance.

[0081] This embodiment achieves state correction by feeding observation data back into the memory bank, maintaining a dynamic balance between balanced prediction and actual measurement, and significantly improving the stability and response accuracy of obstacle tracking.

[0082] In some exemplary embodiments, after matching multiple historical obstacles in the memory bank in the current obstacle list, the method further includes: for any sixth obstacle among the multiple historical obstacles, determining whether a third time difference between the third timestamp of the sixth obstacle and the current timestamp is greater than or equal to a first threshold, and determining whether a first distance between the sixth obstacle and the electric vehicle is greater than or equal to a second threshold; if the second time difference is greater than or equal to the first threshold, or the first distance is greater than or equal to the second threshold, removing the sixth obstacle from the memory bank.

[0083] After matching historical obstacles with the currently detected target, the system performs a double cleanup check on each residual entry in the memory bank. If the time difference between an obstacle and the last observation exceeds 10 seconds of its effective survival period, or if the straight-line distance between the obstacle and the scooter exceeds the second threshold (e.g., 3 meters, 5 meters) of the safety perception range, it is directly removed regardless of whether it has been successfully matched before. This mechanism eliminates "ghost obstacles" that have not been re-detected for a long time or irrelevant targets that have moved away, avoiding the memory bank from slowing down the calculation efficiency due to the expansion of redundant data. Especially in scenarios with dense crowds and frequent obstacles, it ensures that the system only retains short-term risk trajectories that are truly meaningful for the current navigation, preventing outdated predictions from interfering with the DWA path search space.

[0084] This embodiment uses a dual threshold clearing mechanism based on time and distance to actively clean up invalid historical data, achieving efficient self-maintenance of the memory bank on a resource-constrained embedded platform, thus ensuring the real-time performance and accuracy of the obstacle avoidance system.

[0085] In some exemplary embodiments, after matching multiple historical obstacles in the memory bank in the current obstacle list, the method further includes: matching multiple first obstacles in the memory bank; and if it is determined that a seventh obstacle among the multiple first obstacles fails to match the memory bank, adding the real-time obstacle data of the seventh obstacle to the memory bank.

[0086] After the current obstacle list is matched with the memory database, the system screens all currently detected targets that have not been matched. If an obstacle is found to have no corresponding historical entry in the memory database, and its confidence level is within a preset range and its distance is less than the second threshold, the system directly regards it as a newly emerging potential risk and writes the obstacle's real-time position, motion state, and relative speed into the memory database as a new tracking object. This operation does not rely on historical association but is based on independent judgment of the perceived input, ensuring that suddenly appearing pedestrians, pets, or temporary obstacles can be included in the obstacle avoidance system in an instant, avoiding collisions caused by the system ignoring them when they first appear. This is especially valuable in areas where traditional sensors are prone to miss detection, such as corners and intersections of pedestrian traffic.

[0087] This embodiment achieves dynamic expansion of the memory bank by actively capturing new, unmatched obstacles, thereby improving the system's response sensitivity to unknown threats without increasing computational burden and significantly enhancing security coverage in complex and dynamic environments.

[0088] In some exemplary embodiments, determining an obstacle with a confidence level within a preset range as a first obstacle includes: determining an obstacle with a confidence level within the preset range and a relative distance less than a second threshold as the first obstacle, wherein the relative distance is the distance between the electric vehicle and the obstacle; wherein, after determining an obstacle with a confidence level within the preset range as the first obstacle, the method further includes: determining an obstacle with a confidence level greater than a fourth threshold as a following target of the electric vehicle, and controlling the electric vehicle to follow the following target, wherein the fourth threshold is the upper bound of the preset range; determining obstacles with a confidence level less than a fifth threshold, or a relative distance greater than or equal to the second threshold as other obstacles, and prohibiting obstacle avoidance planning for the other obstacles, wherein the fifth threshold is the lower bound of the preset range.

[0089] The system includes obstacles with a confidence level within a preset range (e.g., 0.3-1.0) and a straight-line distance to the scooter less than a second threshold (e.g., 3m, 5m, etc.) in its processing scope as key targets for obstacle avoidance. These targets are typically pedestrians, vehicles, or delicate objects at close range, and their perception data is sufficiently reliable. Targets with a confidence level higher than the fourth threshold are identified as following users with a bound identity, and the system automatically sets them as local target points, driving the scooter to continuously track their movement trajectory. Obstacles with a confidence level lower than the fifth threshold, or a distance exceeding the second threshold, are directly filtered out and do not participate in any obstacle avoidance logic. This type of data is mostly irrelevant objects at a distance, sensor noise, or false detection interference. After exclusion, the input size of the DWA planner is significantly reduced, avoiding low-quality information from polluting the path search space, while ensuring that system resources are concentrated on the core objects that truly affect safety, achieving precise focus in perception, decision-making, and control.

[0090] This embodiment achieves hierarchical target management under lightweight constraints through a dual screening mechanism of confidence level and distance, which not only ensures the continuity of following but also improves the efficiency and robustness of obstacle avoidance.

[0091] In an optional embodiment, this application combines Figure 3 The overall process of the obstacle avoidance planning method for electric vehicles described in the above embodiments will be integrated and explained, such as... Figure 3 As shown, the method includes the following steps:

[0092] Step 3.1: The system traverses the unre-examined obstacles in the memory database;

[0093] It should be noted that unre-detected obstacles are those that exist in the short-term memory (i.e., the aforementioned memory) but have not been re-detected in the current frame and have not timed out.

[0094] Step 3.2: Identify the information of the first dynamic and static flag bits of the undetected obstacle; if it is a static flag bit, proceed to step 3.3; if it is a dynamic flag bit, proceed to step 3.4.

[0095] Step 3.3: For static obstacles, perform inverse prediction based on scooter kinematics.

[0096] When the first dynamic / static flag is static When the value is 1, it indicates that the obstacle is stationary. The prediction input parameters include: the current linear velocity v of the scooter, the current angular velocity w of the scooter, the control period dt, and the predicted starting position of the obstacle (x0, y0).

[0097] At this point, the vehicle's operating mode will be determined. If the vehicle's current angular velocity is greater than a minimum threshold (equivalent to the third threshold mentioned above), the vehicle will be considered to be in non-linear motion, and the vehicle's turning angle theta = w will be calculated. Given that the radius of the arc is R = v / w, the displacement component of the vehicle during time dt is x. e =R sin(theta), y e =R (1-cos(theta)). Otherwise, assuming the vehicle is moving in a straight line, then x e =v dt, y e =0.0, theta=0.0. Then, calculate the predicted position of the static obstacle in the vehicle coordinate system (i.e., the current position mentioned above).

[0098] x ps = (x0 - x e ) cos(theta) + (y0 - ye ) sin(theta), y ps = -(x0 - x e ) sin(theta) + (y0 - y e ) cos(theta).

[0099] Step 3.4: For dynamic obstacles, prediction is made based on a constant speed model plus vehicle motion compensation.

[0100] When the first dynamic / static flag is static When the value is 0, it indicates that the obstacle is in motion. The calculation method for the displacement component of the vehicle during time dt (i.e., the second displacement component mentioned above) is the same as in step 3.3. Unlike step 3.3, the calculation of dynamic obstacles cannot use the obstacle to predict the starting position (x0, y0). Therefore, a constant velocity model is used to predict the position fut of the obstacle after time dt. obs (x f , y f ), x f = x0 + v x dt, y f = y0 + v y If dt, then the predicted position of the dynamic obstacle in the vehicle coordinate system is (x pd ,y pd ), x pd = (x f - x e ) cos(theta) + (y f - y e ) sin(theta), y pd = -(x f - x e ) sin(theta) + (y f - y e ) cos(theta).

[0101] Step 3.5: Update the predicted positions to the memory bank;

[0102] Step 3.6: If the distance between the predicted position of the obstacle and the vehicle (i.e., the second distance mentioned above) is less than the distance threshold (i.e., the second threshold mentioned above), then add the obstacle to the current obstacle list (obs).ego If it is in the middle, then it is not added; otherwise, it is not added.

[0103] In an optional embodiment, Figure 4 The obstacle classification criteria of embodiments of this application are shown, such as Figure 4 As shown, when the confidence level of an obstacle is greater than 1.0, the obstacle is determined to be the target to be followed by the electric vehicle and is set as a local target point; when the confidence level of an obstacle is in the range of 0.3-1.0 and the distance between the obstacle and the electric vehicle is less than the second threshold, it is determined to be a normal obstacle and added to the current obstacle list; for other types of obstacles, that is, when the obstacle confidence level is less than 0.3 or the distance between the obstacle and the electric vehicle is greater than or equal to the second threshold, the obstacle is determined to be discarded and will not participate in subsequent processing.

[0104] This strategy decouples the following and obstacle avoidance functions through a clear identity and distance filtering mechanism, significantly reducing computational redundancy and improving the system's response efficiency and task focus in cluttered environments.

[0105] To further illustrate the obstacle avoidance planning method for electric vehicles described above, this application provides a detailed explanation of the implementation process of the method in conjunction with several optional embodiments. In one optional embodiment, Figure 5 An optional obstacle avoidance method based on vehicle kinematics compensation for dynamic and static obstacle memory and prediction is shown, which includes the following stages:

[0106] Phase 1: Data Reception and Preprocessing

[0107] First, the obstacle list output by the perception module is received in real time via shared memory. Each obstacle contains the following information: its position coordinates (x, y) in the vehicle's coordinate system, its first dynamic / static flag (is_static), confidence level, and its first relative velocity (v). x v y ).

[0108] Phase Two, Obstacle Classification:

[0109] Then, based on confidence level and task role, the system categorizes obstacles into three types. Obstacles with a confidence level greater than 1.0 are identified as following targets, typically corresponding to target users with bound identities, and serve as local target points in DWA (Dynamic Window Approach). Obstacles with a confidence level between 0.3 and 1.0 and a distance less than a set distance threshold from the scooter are considered ordinary obstacles (i.e., the first type of obstacle mentioned above). These obstacles participate in obstacle avoidance and are added to the current obstacle list (obs). egoIn the middle, other obstacles (including low-confidence noise, targets that are too far away, negative distance outliers, etc.) are directly discarded. The method provided in this application embodiment is mainly for processing ordinary obstacles.

[0110] It's important to note that DWA stands for Dynamic Window Approach, a local path algorithm for real-time obstacle avoidance and velocity planning in mobile robots. Within a "dynamic window" defined by the robot's current speed and acceleration constraints, it enumerates all possible combinations of linear and angular velocities, performs short-term trajectory simulations for each velocity group, evaluates the safety, target approach capability, and motion smoothness of each trajectory, and ultimately selects the speed command with the highest overall balance to drive the robot's movement. In electric scooter systems, DWA serves as the core control module. Based on the obstacle distribution and target position in the scooter's coordinate system, it outputs linear and angular velocity commands every 100 milliseconds. Its advantages lie in its high computational efficiency, lack of need for a global map, and rapid response to dynamic environmental changes, making it particularly suitable for real-time obstacle avoidance scenarios on small, highly maneuverable platforms with low computational power.

[0111] Phase 3: Updating the obstacle memory bank:

[0112] Next, maintain a short-term memory for obstacles (equivalent to the memory mentioned above). history This is used to store ego values ​​that are still valid within the time limit and are at least equal to a distance threshold (i.e., the second threshold mentioned above). dis The historical state of common obstacles. The memory uses a mapping structure with obstacle position coordinates as the key. Each entry contains: the original obstacle data of the last observation, the starting position of the next position prediction, and the last observation timestamp. For the currently detected obstacle list... obstacles The distance between the center and the car is less than ego dis For each common obstacle, iterate through all entries in the memory bank and calculate its Euclidean distance to the current obstacle. If there exists a historical obstacle whose distance is less than the position matching threshold k... dis If the observed position is not an obstacle, it is considered the same obstacle, its data is updated, the timestamp is refreshed, and the predicted initial position is set to the current observation position; otherwise, the observed position is not an obstacle. history Add a new entry for this obstacle information.

[0113] Phase 4: Predicting the location of unre-inspected obstacles:

[0114] Predicting the location of undetected obstacles involves inverse prediction based on the scooter's kinematics, targeting obstacles that were not redetected in the current frame but did not time out. The prediction input parameters include: the scooter's current linear velocity v, current angular velocity w, control period dt, and the obstacle prediction starting position (x0, y0). Ordinary obstacles in the obstacle short-term memory that require inverse prediction must meet the following conditions: the difference between the obstacle's current timestamp and the last observed timestamp is less than a valid time threshold, and it is not in the current real-time detection list. The method for determining whether an obstacle is already in the current detection list is to traverse the current real-time obstacle detection list (detected). obstacles If there exists a real-time obstacle whose Euclidean distance to the obstacle is less than ego... dis If the obstacle is detected, it is assumed to exist in the current real-time detection list. Otherwise, it is not detected, and a reverse prediction calculation is performed based on the vehicle's movement trend.

[0115] The reverse prediction will perform different calculations based on the first dynamic and static flag of the obstacle. When the first dynamic and static flag is_static is 1, it means that the obstacle is stationary. The prediction input parameters include: the current linear velocity v of the scooter, the current angular velocity w of the scooter, the control period dt, and the predicted starting position of the obstacle (x0, y0).

[0116] At this point, the vehicle's operating mode will be determined. If the vehicle's current angular velocity is greater than a minimum threshold (equivalent to the third threshold mentioned above), the vehicle will be considered to be in non-linear motion, and the vehicle's turning angle theta = w will be calculated. Given that the radius of the arc is R = v / w, the displacement component of the vehicle during time dt is x. e =R sin(theta), y e =R (1-cos(theta)). Otherwise, assuming the vehicle is moving in a straight line, then x e =v dt, y e =0.0, theta=0.0. Then, calculate the predicted position of the static obstacle in the vehicle coordinate system (i.e., the current position mentioned above). If the distance between the predicted position of the obstacle and the vehicle is less than the second threshold ego... dis Then add it to the current obstacle list (obs). ego In, and put it in obstacles history The starting position of the next position prediction in the matrix is ​​updated to (x ps ,y ps ).

[0117] When the first dynamic / static flag is staticWhen the value is 0, it indicates that the obstacle is in motion. The calculation method for the displacement component of the vehicle during time dt (i.e., the second displacement component mentioned above) is the same as in step 3.3. Unlike step 3.3, the calculation of dynamic obstacles cannot use the obstacle to predict the starting position (x0, y0). Therefore, a constant velocity model is used to predict the position fut of the obstacle after time dt. obs (x f , y f ), x f = x0 + v x dt, y f = y0 + v y If dt, then the predicted position of the dynamic obstacle in the vehicle coordinate system is (x pd ,y pd ), x pd = (x f - x e ) cos(theta) + (y f - y e ) sin(theta), y pd = -(x f - x e ) sin(theta) + (y f - y e ) cos(theta). Similarly, determine whether to add to OBS based on the predicted position. ego In the middle, should the starting position of its next position prediction be updated to (x)? pd ,y pd ).

[0118] Phase 5, Memory Bank Cleanup and Input DWA Planner:

[0119] Then, the memory bank cleanup mechanism continues to be executed, clearing ego values ​​that are more than a valid time threshold since the last observation or that indicate obstacles are more than a distance threshold from the scooter. dis The timeout mechanism ensures that the memory bank does not retain invalid obstacles for extended periods, avoiding interference from "ghost obstacles," while also accommodating both sudden occlusion and long-term disappearance scenarios.

[0120] Finally, the current obstacle list obs ego Input to the standard DWA planner. Based on the robot's current state (speed, acceleration limits), target position, and obstacle distribution, DWA searches for the optimal speed command (linear velocity and angular velocity) to get as close to the target as possible while ensuring safety.

[0121] As can be seen from the above description, the method proposed in this application has significant advantages over existing technologies. First, it greatly improves following continuity: when the target is occluded for no more than 10 seconds, the system remains in a waiting state instead of interrupting the task, and can seamlessly resume following after the occlusion is removed. Second, it enhances obstacle avoidance robustness: it has strong tolerance for obstacles "disappearing" due to sensor misses or occlusion, effectively preventing the path from crossing dangerous areas. Real-world testing shows that in typical urban sidewalk scenarios, the success rate of self-following tasks performed by this method is significantly improved, and collision events are greatly reduced.

[0122] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the related technology, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / random access memory (RAM), magnetic disk, optical disk), and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0123] According to another aspect of the embodiments of this application, an electric vehicle is also provided, which can be used to implement the obstacle avoidance planning method for electric vehicles provided in the above embodiments, and will not be repeated hereafter. As used below, the terms "unit" and "module" are equivalent to a combination of software and / or hardware that can perform a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0124] Figure 6 This is a structural block diagram of an optional electric vehicle according to an embodiment of this application, such as... Figure 6 As shown, the electric vehicle includes:

[0125] The perception module 62 is used to acquire real-time obstacle data of the electric vehicle, wherein the real-time obstacle data includes: the confidence level of multiple obstacles and the current timestamp;

[0126] The obstacle determination module 64 is connected to the perception module 62 and is used to determine obstacles with confidence levels within a preset range as first obstacles, and generate a current obstacle list based on multiple first obstacles, wherein the first obstacles are obstacles for which the electric vehicle needs to perform obstacle avoidance planning.

[0127] The matching module 66, connected to the obstacle determination module 64, is used to match multiple historical obstacles in the memory bank in the current obstacle list. The memory bank stores the most recent observation data and timestamps of the multiple historical obstacles. The most recent observation data is used to indicate the relative position of the historical obstacles and the electric vehicle.

[0128] The obstacle avoidance planning module 68, connected to the matching module 66, is used to estimate the current position of the second obstacle when there is a second obstacle among the multiple historical obstacles that fails to match the current obstacle list and the first time difference between the current timestamp and the first timestamp corresponding to the second obstacle is less than a first threshold, and to perform obstacle avoidance planning for the electric vehicle based on the current position.

[0129] According to the embodiments provided in this application, a perception module acquires real-time obstacle data of an electric vehicle. This real-time obstacle data includes the confidence levels and current timestamps of multiple obstacles. An obstacle determination module identifies obstacles with confidence levels within a preset range as first obstacles and generates a current obstacle list containing multiple first obstacles. The first obstacles are those for which the electric vehicle needs obstacle avoidance planning. Then, a matching module matches multiple historical obstacles in a memory bank that are of the same category as the first obstacles and for which the electric vehicle needs obstacle avoidance planning. The memory bank stores the most recent observation data and timestamps of multiple historical obstacles, with the most recent observation data indicating the relative position of the historical obstacles to the electric vehicle. Finally, if a second obstacle among the multiple historical obstacles fails to match the current obstacle list, and the first time difference between the current timestamp and the first timestamp corresponding to the second obstacle is less than a first threshold, the obstacle avoidance planning module estimates the current position of the second obstacle and performs obstacle avoidance planning for the electric vehicle based on the current position. By constructing a short-term obstacle memory database and combining it with the scooter's own kinematic model to predict the location of historical obstacles in real time, the scooter can still safely avoid potentially dangerous areas (i.e., areas where undetected obstacles are located) even when sensor data is missing or unstable, thus significantly improving the navigation reliability of the scooter in dynamic environments. This also solves the problem in related technologies where some obstacles are ignored when the electric scooter's sensors are temporarily blocked or missed, leading to collision risks during path planning.

[0130] In an optional embodiment, the matching module 66 is further configured to, for any third obstacle among the plurality of historical obstacles, calculate the Euclidean distance between the third obstacle and the plurality of first obstacles in the current obstacle list based on the first most recent observation data and the second timestamp of the third obstacle, thereby obtaining a plurality of Euclidean distances, wherein the plurality of first obstacles corresponds one-to-one with the plurality of Euclidean distances; if it is determined that there is a target Euclidean distance less than a distance threshold among the plurality of Euclidean distances, it is determined that the third obstacle is successfully matched with the current obstacle list; if it is determined that all of the plurality of Euclidean distances are greater than or equal to the distance threshold, it is determined that the third obstacle is unmatched with the current obstacle list.

[0131] In an optional embodiment, the real-time obstacle data further includes: the position coordinates of the plurality of obstacles in the vehicle's coordinate system; the matching module 66 is further configured to: determine the first position coordinates of any fourth obstacle among the plurality of first obstacles in the vehicle's coordinate system; determine the second position coordinates of the third obstacle in the vehicle's coordinate system at the second time stamp based on the first most recent observation data and the second timestamp; perform coordinate transformation on the second position coordinates based on the displacement of the electric vehicle within the time period corresponding to the second timestamp and the current timestamp to obtain the third position coordinates of the third obstacle in the vehicle's coordinate system at the current timestamp; and calculate the Euclidean distance between the third obstacle and the fourth obstacle based on the first position coordinates and the third position coordinates.

[0132] In an optional embodiment, the second most recently observed data of the second obstacle further includes: a first dynamic and static flag indicating the motion state of the second obstacle, and a first relative velocity between the second obstacle and the electric vehicle; the real-time obstacle data further includes: the position coordinates of the plurality of obstacles in the electric vehicle's auto-coordinate system; the matching module 66 is further configured to determine the fourth position coordinate of the second obstacle in the electric vehicle's auto-coordinate system at the first time stamp based on the second most recently observed data and the first timestamp; when the first dynamic and static flag indicates that the second obstacle is stationary, determine the motion mode of the electric vehicle based on the current angular velocity of the electric vehicle; when the current angular velocity is greater than a third threshold, determine that the motion mode is non-linear motion; determine the first displacement component of the electric vehicle based on the auto-rotation angle and motion arc radius included in the first relative velocity, and the first time difference, and perform coordinate transformation on the fourth position coordinates based on the first displacement component to obtain the current position.

[0133] In an optional embodiment, the matching module 66 is further configured to determine that the motion mode is linear motion when the current angular velocity is less than or equal to the third threshold; determine the second displacement component of the electric vehicle based on the current speed of the electric vehicle and the first time difference, wherein the first relative speed includes the current speed; and perform coordinate transformation on the fourth position coordinates based on the second displacement component to obtain the current position.

[0134] In an optional embodiment, the second most recently observed data of the second obstacle further includes: a first dynamic and static flag indicating the motion state of the second obstacle, and a first relative velocity between the second obstacle and the electric vehicle; the real-time obstacle data further includes: the position coordinates of the plurality of obstacles in the vehicle's auto-coordinate system; the obstacle avoidance planning module 68 is further configured to determine the fourth position coordinate of the second obstacle in the vehicle's auto-coordinate system at the first time stamp based on the second most recently observed data and the first timestamp; when the first dynamic and static flag indicates that the second obstacle is in motion, calculate the third displacement component of the second obstacle based on the first relative velocity and the first time difference; and perform coordinate transformation on the fourth position coordinate based on the third displacement component to obtain the current position.

[0135] In an optional embodiment, the first most recently observed data further includes: a second dynamic / static flag indicating the motion state of the third obstacle, and a second relative velocity between the third obstacle and the electric vehicle; the real-time obstacle data further includes: the position coordinates of the plurality of obstacles in the electric vehicle's auto-coordinate system; the matching module 66 is further configured to, for any fourth obstacle among the plurality of first obstacles, determine the first position coordinates of the fourth obstacle in the electric vehicle's auto-coordinate system; determine the second position coordinates of the third obstacle in the electric vehicle's auto-coordinate system at the second timestamp based on the first most recently observed data and the second timestamp; and indicate that the third obstacle is in a static state at the second dynamic / static flag. In the stationary state, the motion mode of the electric vehicle is determined based on its current angular velocity; if the current angular velocity is greater than a third threshold, the motion mode is determined to be non-linear motion; the fourth displacement component of the electric vehicle is determined based on the second relative velocity, including the vehicle's turning angle and the radius of the motion arc, and the second time difference; and the second position coordinates are transformed based on the fourth displacement component to obtain the fifth position coordinates of the third obstacle in the electric vehicle's vehicle coordinate system at the current timestamp, wherein the second time difference is the time difference between the second timestamp and the current timestamp; the Euclidean distance between the third obstacle and the fourth obstacle is calculated based on the first position coordinates and the fifth position coordinates.

[0136] In an optional embodiment, the matching module 66 is further configured to: determine that the motion mode is linear motion when the current angular velocity is less than or equal to the third threshold; determine the fifth displacement component of the electric vehicle based on the current speed of the electric vehicle and the second time difference; and perform coordinate transformation on the second position coordinates based on the fifth displacement component to obtain the sixth position coordinates of the third obstacle in the electric vehicle's self-vehicle coordinate system at the current timestamp, wherein the second relative speed includes the current speed; and calculate the Euclidean distance between the third obstacle and the fourth obstacle based on the first position coordinates and the sixth position coordinates.

[0137] In an optional embodiment, the first most recently observed data further includes: a second dynamic / static flag indicating the motion state of the third obstacle, and a second relative velocity between the third obstacle and the electric vehicle; the real-time obstacle data further includes: the position coordinates of the plurality of obstacles in the vehicle's auto-coordinate system; the matching module 66 is further configured to, for any fourth obstacle among the plurality of first obstacles, determine the first position coordinates of the fourth obstacle in the vehicle's auto-coordinate system; determine the second position coordinates of the third obstacle in the vehicle's auto-coordinate system at the second timestamp based on the first most recently observed data and the second timestamp; when the second dynamic / static flag indicates that the third obstacle is in motion, calculate the sixth displacement component of the third obstacle based on the second relative velocity and the second time difference, wherein the second time difference is the time difference between the second timestamp and the current timestamp; perform coordinate transformation on the second position coordinates based on the sixth displacement component to obtain the seventh position coordinates of the third obstacle in the vehicle's auto-coordinate system at the current timestamp; and calculate the Euclidean distance between the third obstacle and the fourth obstacle based on the first position coordinates and the seventh position coordinates.

[0138] In an optional embodiment, the obstacle avoidance planning module 68 is further configured to determine the eighth position coordinates of the plurality of historical obstacles in the vehicle coordinate system of the electric vehicle at the current timestamp; and to determine the current position based on the plurality of eighth position coordinates, wherein the plurality of historical obstacles correspond one-to-one with the plurality of seventh positions.

[0139] In an optional embodiment, the obstacle avoidance planning module 68 is further configured to perform obstacle avoidance planning for the electric vehicle based on the current obstacle list when the second distance is greater than or equal to the second threshold; and to add the second obstacle to the current obstacle list when the second distance is less than the second threshold, and perform obstacle avoidance planning for the electric vehicle based on the updated current obstacle list.

[0140] In an optional embodiment, the matching module 66 is further configured to determine the fifth obstacle corresponding to the target Euclidean distance, wherein the plurality of first obstacles include the fifth obstacle; and to update the first most recently observed data and the second timestamp of the third obstacle in the memory bank according to the real-time obstacle data of the fifth obstacle.

[0141] In an optional embodiment, the matching module 66 is further configured to, for any sixth obstacle among the plurality of historical obstacles, determine whether the third time difference between the third timestamp of the sixth obstacle and the current timestamp is greater than or equal to the first threshold, and determine whether the first distance between the sixth obstacle and the electric vehicle is greater than or equal to the second threshold; if the second time difference is greater than or equal to the first threshold, or the first distance is greater than or equal to the second threshold, the sixth obstacle is cleared from the memory bank.

[0142] In an optional embodiment, the matching module 66 is further configured to match multiple first obstacles in the memory bank; and if it is determined that a seventh obstacle among the multiple first obstacles fails to match the memory bank, add the real-time obstacle data of the seventh obstacle to the memory bank.

[0143] In an optional embodiment, the obstacle determination module 64 is further configured to determine obstacles with confidence levels within the preset range and relative distances less than a second threshold as the first obstacle, wherein the relative distance is the distance between the electric vehicle and the obstacle; wherein, after determining obstacles with confidence levels within the preset range as the first obstacle, the method further includes: determining obstacles with confidence levels greater than a fourth threshold as the following target of the electric vehicle, and controlling the electric vehicle to follow the following target, wherein the fourth threshold is the upper bound of the preset range; determining obstacles with confidence levels less than a fifth threshold, or relative distances greater than or equal to the second threshold as other obstacles, and prohibiting obstacle avoidance planning for the other obstacles, wherein the fifth threshold is the lower bound of the preset range.

[0144] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.

[0145] The above are merely preferred embodiments of this application and are not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.

Claims

1. An obstacle avoidance planning method for electric vehicles, characterized in that, include: Acquire real-time obstacle data for electric vehicles, wherein the real-time obstacle data includes: confidence levels of multiple obstacles and current timestamps; Obstacles with confidence levels within a preset range are identified as first obstacles, and a current obstacle list is generated based on multiple first obstacles, wherein the first obstacles are obstacles for which the electric vehicle needs to perform obstacle avoidance planning; The current obstacle list is matched with multiple historical obstacles in the memory bank, wherein the memory bank stores the most recent observation data and timestamps of the multiple historical obstacles, and the most recent observation data is used to indicate the relative position of the historical obstacles to the electric vehicle; If, among the multiple historical obstacles, a second obstacle fails to match the current obstacle list, and the first time difference between the current timestamp and the first timestamp corresponding to the second obstacle is less than a first threshold, the current position of the second obstacle is estimated, and obstacle avoidance planning is performed on the electric vehicle based on the current position.

2. The method according to claim 1, characterized in that, Match multiple historical obstacles from the memory in the current obstacle list, including: For any third obstacle among the plurality of historical obstacles, the Euclidean distances between the third obstacle and the plurality of first obstacles in the current obstacle list are calculated based on the first most recent observation data and the second timestamp of the third obstacle, respectively, to obtain a plurality of Euclidean distances, wherein the plurality of first obstacles correspond one-to-one with the plurality of Euclidean distances; If it is determined that there is a target Euclidean distance less than a distance threshold among the multiple Euclidean distances, it is determined that the third obstacle is successfully matched with the current obstacle list; If it is determined that all of the multiple Euclidean distances are greater than or equal to the distance threshold, it is determined that the third obstacle fails to match the current obstacle list.

3. The method according to claim 2, characterized in that, The real-time obstacle data further includes: the position coordinates of the plurality of obstacles in the vehicle's coordinate system; and the calculation of the Euclidean distances between the third obstacle and the plurality of first obstacles in the current obstacle list based on the first most recent observation data and the second timestamp of the third obstacle, including: For any fourth obstacle among the plurality of first obstacles, determine the first position coordinates of the fourth obstacle in the vehicle coordinate system of the electric vehicle; The second position coordinates of the third obstacle in the vehicle's coordinate system at the second time stamp are determined based on the first most recent observation data and the second timestamp. Based on the displacement of the electric vehicle within the time period corresponding to the second timestamp and the current timestamp, the coordinates of the second position are transformed to obtain the third position coordinates of the third obstacle in the electric vehicle's vehicle coordinate system at the current timestamp; The Euclidean distance between the third obstacle and the fourth obstacle is calculated based on the first and third position coordinates.

4. The method according to claim 3, characterized in that, The second most recent observation data of the second obstacle further includes: a first dynamic and static flag indicating the motion state of the second obstacle, and a first relative velocity between the second obstacle and the electric vehicle; the real-time obstacle data further includes: the position coordinates of the plurality of obstacles in the electric vehicle's vehicle coordinate system; estimating the current position of the second obstacle includes: The second obstacle is determined at its fourth position coordinate in the electric vehicle's vehicle coordinate system at the first time point based on the second most recent observation data and the first timestamp. When the first dynamic and static flag indicates that the second obstacle is stationary, the motion mode of the electric vehicle is determined based on the current angular velocity of the electric vehicle. If the current angular velocity is greater than the third threshold, the motion mode is determined to be non-linear motion; The first displacement component of the electric vehicle is determined based on the vehicle's turning angle and radius of motion arc included in the first relative velocity, and the first time difference. The fourth position coordinates are then transformed based on the first displacement component to obtain the current position.

5. The method according to claim 4, characterized in that, After determining the operating mode of the electric vehicle based on its current angular velocity, the method further includes: If the current angular velocity is less than or equal to the third threshold, the motion mode is determined to be linear motion; The second displacement component of the electric vehicle is determined based on the current speed of the electric vehicle and the first time difference, wherein the first relative speed includes the current speed; The fourth position coordinates are transformed based on the second displacement component to obtain the current position.

6. The method according to claim 3, characterized in that, The second most recent observation data of the second obstacle further includes: a first dynamic and static flag indicating the motion state of the second obstacle, and a first relative velocity between the second obstacle and the electric vehicle; the real-time obstacle data further includes: the position coordinates of the plurality of obstacles in the electric vehicle's vehicle coordinate system; estimating the current position of the second obstacle includes: The second obstacle is determined at its fourth position coordinate in the electric vehicle's vehicle coordinate system at the first time point based on the second most recent observation data and the first timestamp. When the first dynamic and static flag indicates that the second obstacle is in motion, the third displacement component of the second obstacle relative to the electric vehicle is calculated based on the first relative velocity and the first time difference. The current position is obtained by performing coordinate transformation on the fourth position coordinates based on the third displacement component.

7. The method according to claim 2, characterized in that, The first most recently observed data further includes: a second dynamic and static flag indicating the motion state of the third obstacle, and a second relative velocity between the third obstacle and the electric vehicle; the real-time obstacle data further includes: the position coordinates of the plurality of obstacles in the vehicle's auto-coordinate system; the step of calculating the Euclidean distance between the third obstacle and the plurality of the first obstacles in the current obstacle list based on the first most recently observed data and the second timestamp of the third obstacle includes: For any fourth obstacle among the plurality of first obstacles, determine the first position coordinates of the fourth obstacle in the vehicle coordinate system of the electric vehicle; The second position coordinates of the third obstacle in the vehicle's coordinate system at the second time stamp are determined based on the first most recent observation data and the second timestamp. When the second dynamic and static flag indicates that the third obstacle is stationary, the motion mode of the electric vehicle is determined based on the current angular velocity of the electric vehicle. If the current angular velocity is greater than the third threshold, the motion mode is determined to be non-linear motion; The fourth displacement component of the electric vehicle is determined based on the second relative speed, including the vehicle's turning angle and the radius of the motion arc, and the second time difference. The second position coordinates are then transformed based on the fourth displacement component to obtain the fifth position coordinates of the third obstacle in the electric vehicle's vehicle coordinate system at the current timestamp. The second time difference is the time difference between the second timestamp and the current timestamp. The Euclidean distance between the third obstacle and the fourth obstacle is calculated based on the first and fifth position coordinates.

8. The method according to claim 7, characterized in that, After determining the motion mode of the electric vehicle based on its current angular velocity, the method further includes: If the current angular velocity is less than or equal to the third threshold, the motion mode is determined to be linear motion; The fifth displacement component of the electric vehicle is determined based on the current speed of the electric vehicle and the second time difference, and the second position coordinates are transformed based on the fifth displacement component to obtain the sixth position coordinates of the third obstacle in the electric vehicle's self-vehicle coordinate system at the current timestamp, wherein the second relative speed includes the current speed; The Euclidean distance between the third obstacle and the fourth obstacle is calculated based on the first position coordinates and the sixth position coordinates.

9. The method according to claim 2, characterized in that, The first most recently observed data further includes: a second dynamic and static flag indicating the motion state of the third obstacle, and a second relative velocity between the third obstacle and the electric vehicle; the real-time obstacle data further includes: the position coordinates of the plurality of obstacles in the vehicle's auto-coordinate system; the step of calculating the Euclidean distance between the third obstacle and the plurality of the first obstacles in the current obstacle list based on the first most recently observed data and the second timestamp of the third obstacle includes: For any fourth obstacle among the plurality of first obstacles, determine the first position coordinates of the fourth obstacle in the vehicle coordinate system of the electric vehicle; The second position coordinates of the third obstacle in the vehicle's coordinate system at the second time stamp are determined based on the first most recent observation data and the second timestamp. When the second dynamic and static flag indicates that the third obstacle is in motion, the sixth displacement component of the third obstacle is calculated based on the second relative velocity and the second time difference, wherein the second time difference is the time difference between the second timestamp and the current timestamp; The second position coordinates are transformed according to the sixth displacement component to obtain the seventh position coordinates of the third obstacle in the vehicle coordinate system of the electric vehicle at the current timestamp; The Euclidean distance between the third obstacle and the fourth obstacle is calculated based on the first position coordinates and the seventh position coordinates.

10. The method according to any one of claims 7 to 9, characterized in that, Estimating the current position of the second obstacle includes: Determine the eighth position coordinates of the plurality of historical obstacles in the vehicle's auto-coordinate system at the current timestamp; The current position is determined based on multiple eighth position coordinates, wherein the multiple historical obstacles correspond one-to-one with multiple seventh positions.

11. The method according to claim 1, characterized in that, Based on the current location, obstacle avoidance planning for the electric vehicle includes: Calculate the second distance between the second obstacle and the electric vehicle based on the current position; If the second distance is greater than or equal to the second threshold, obstacle avoidance planning is performed on the electric vehicle based on the current obstacle list; If the second distance is less than the second threshold, the second obstacle is added to the current obstacle list, and obstacle avoidance planning is performed on the electric vehicle based on the updated current obstacle list.

12. The method according to claim 2, characterized in that, After determining that the third obstacle successfully matches the current obstacle list, the method further includes: Identify the fifth obstacle corresponding to the target Euclidean distance, wherein the plurality of first obstacles include the fifth obstacle; The first most recently observed data and the second timestamp of the third obstacle are updated in the memory bank based on the real-time obstacle data of the fifth obstacle.

13. The method according to claim 2, characterized in that, After matching multiple historical obstacles from the memory bank in the current obstacle list, the method further includes: For any sixth obstacle among the plurality of historical obstacles, determine whether the third time difference between the third timestamp of the sixth obstacle and the current timestamp is greater than or equal to the first threshold, and determine whether the first distance between the sixth obstacle and the electric vehicle is greater than or equal to the second threshold. If the second time difference is greater than or equal to the first threshold, or the first distance is greater than or equal to the second threshold, the sixth obstacle is removed from the memory bank.

14. The method according to claim 1, characterized in that, After matching multiple historical obstacles from the memory bank in the current obstacle list, the method further includes: Match multiple of the first obstacles in the memory bank; If it is determined that a seventh obstacle among the multiple first obstacles fails to match the memory database, the real-time obstacle data of the seventh obstacle is added to the memory database.

15. The method according to claim 1, characterized in that, Obstacles with confidence levels within a preset range are identified as first obstacles, including: The first obstacle is defined as an obstacle whose confidence level is within the preset range and whose relative distance is less than the second threshold, wherein the relative distance is the distance between the electric vehicle and the obstacle; After identifying obstacles with confidence levels within a preset range as the first obstacle, the method further includes: Obstacles with a confidence level greater than a fourth threshold are identified as the following targets of the electric vehicle, and the electric vehicle is controlled to follow the following targets. The fourth threshold is the upper bound of the preset range. Obstacles with a confidence level less than the fifth threshold or a relative distance greater than or equal to the second threshold are identified as remaining obstacles, and obstacle avoidance planning is prohibited for the remaining obstacles. The fifth threshold is the lower bound of the preset range.

16. An electric vehicle, characterized in that, include: A perception module is used to acquire real-time obstacle data of electric vehicles, wherein the real-time obstacle data includes: confidence levels of multiple obstacles and current timestamps; An obstacle determination module, connected to the perception module, is used to determine obstacles with confidence levels within a preset range as first obstacles, and to generate a current obstacle list based on multiple first obstacles, wherein the first obstacles are obstacles for which the electric vehicle needs to perform obstacle avoidance planning; A matching module, connected to the obstacle determination module, is used to match multiple historical obstacles in the memory bank in the current obstacle list. The memory bank stores the most recent observation data and timestamps of the multiple historical obstacles. The most recent observation data is used to indicate the relative position of the historical obstacles to the electric vehicle. An obstacle avoidance planning module, connected to the matching module, is used to estimate the current position of the second obstacle when a second obstacle fails to match the current obstacle list among the multiple historical obstacles, and the first time difference between the current timestamp and the first timestamp corresponding to the second obstacle is less than a first threshold, and to perform obstacle avoidance planning for the electric vehicle based on the current position.