Method, device, program product, and storage medium for determining a path

CN122653279BActive Publication Date: 2026-10-09ZHEJIANG HUAFEI INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611143015.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-30
Publication Date
2026-10-09
Estimated Expiration
2046-07-30

AI Technical Summary

Technical Problem

[0005]本申请实施例提供了一种路径的确定方法、装置、程序产品以及存储介质,以至少解决相关技术中由于难以对终端运行的路径进行合理规划而导致的无法保证终端及时躲避障碍物的技术问题

Benefits of technology

[0011]This application first generates multiple potential obstacle avoidance directions based on the target terminal's current running direction (i.e., the aforementioned first direction) and a preset correction direction, thus overcoming the limitation of fixed obstacle avoidance directions in related technologies. Then, all trajectory points on the initial path are offset along each target direction, and the total movement distance of all points in each direction (i.e., the aforementioned total movement amount) is calculated. This ensures that the corrected path not only geometrically avoids the first obstacle but also maintains kinematic consistency with the initial path as much as possible. Finally, the target path is determined by selecting the set of target trajectory points with the smallest total movement amount. This allows for the rapid generation of an obstacle avoidance route at minimal cost while ensuring safety. Therefore, it solves the problem in related technologies where the difficulty in rationally planning the terminal's running path leads to the inability to guarantee timely obstacle avoidance. This significantly improves the terminal's response speed and obstacle avoidance success rate in dynamic and complex environments, thereby achieving the effect of timely determining a path that ensures the terminal avoids obstacles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122653279B_ABST
    Figure CN122653279B_ABST
Patent Text Reader

Abstract

The application discloses a path determination method and device, a program product and a storage medium, and relates to the technical field of path determination. The method comprises the following steps: in the case that a first obstacle exists in an initial path at a first time, determining a plurality of target directions based on a preset correction direction and a first direction; adjusting the positions of a plurality of initial trajectory points according to each target direction to obtain a plurality of first trajectory point sets; determining a first trajectory point set with the smallest total movement amount in the plurality of first trajectory point sets as a target trajectory point set, and adjusting the initial path to a target path determined based on the target trajectory point set. Through the application, the problem that a terminal cannot avoid obstacles in time due to the difficulty in reasonably planning the path of terminal operation in the related art is solved, and the effect of timely determining a path that can guarantee the terminal to avoid obstacles is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and more specifically, to a method, apparatus, program product, and storage medium for determining a path. Background Technology

[0002] With the widespread application of intelligent mobile terminals such as drones and autonomous vehicles in complex scenarios such as logistics, inspection, and search and rescue, the ability of these terminals to autonomously perceive their environment and avoid obstacles during operation is particularly important. In related technologies, when an obstacle is detected in the initially planned path, the approach often only performs simple path offsets or path planning based on the current obstacle's position, lacking a global and rational consideration of the terminal's overall operational trajectory.

[0003] Because it is difficult to plan the path of the terminal, the relevant technologies cannot guarantee that the terminal can avoid obstacles in the path in a timely and effective manner when the terminal runs according to the initially planned path, thus affecting the terminal's operating efficiency and security.

[0004] There is currently no effective solution to the above problems in the relevant technologies. Summary of the Invention

[0005] This application provides a path determination method, apparatus, program product, and storage medium to at least solve the technical problem in the related art where the terminal cannot be guaranteed to avoid obstacles in a timely manner due to the difficulty in rationally planning the path of the terminal's operation.

[0006] According to one aspect of the embodiments of this application, a path determination method is provided, comprising: when it is determined at a first moment that there is a first obstacle in the initial path, determining a plurality of target directions based on a preset correction direction and a first direction, wherein the initial path is the path run by a target terminal after a second moment, the second moment being later than the first moment, and the first direction representing the running direction of the target terminal at the first moment; adjusting the positions of a plurality of initial trajectory points according to each of the target directions to obtain a plurality of first trajectory point sets, wherein the initial path includes the plurality of initial trajectory points, and the plurality of first trajectory points included in each of the first trajectory point sets are trajectory points obtained by moving the plurality of initial trajectory points according to the same target direction; determining the first trajectory point set with the smallest total movement among the plurality of first trajectory point sets as a target trajectory point set, and adjusting the initial path to a target path determined based on the target trajectory point set, wherein the total movement is the sum of the movement distances between each of the first trajectory points included in the first trajectory point set and the corresponding initial trajectory point.

[0007] According to another aspect of the embodiments of this application, a path determination apparatus is also provided, comprising: a determination module, configured to determine a plurality of target directions based on a preset correction direction and a first direction when it is determined at a first moment that a first obstacle exists in an initial path, wherein the initial path is the path run by a target terminal after a second moment, the second moment being later than the first moment, and the first direction representing the running direction of the target terminal at the first moment; a first adjustment module, configured to adjust the positions of a plurality of initial trajectory points according to each of the target directions to obtain a plurality of first trajectory point sets, wherein the initial path includes the plurality of initial trajectory points, and the plurality of first trajectory points included in each of the first trajectory point sets are trajectory points obtained by moving the plurality of initial trajectory points according to the same target direction; and a second adjustment module, configured to determine the first trajectory point set with the smallest total movement among the plurality of first trajectory point sets as a target trajectory point set, and adjust the initial path to a target path determined based on the target trajectory point set, wherein the total movement is the sum of the movement distances between each of the first trajectory points included in the first trajectory point set and the corresponding initial trajectory point.

[0008] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored therein, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed by a processor.

[0009] 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.

[0010] 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.

[0011] This application first generates multiple potential obstacle avoidance directions based on the target terminal's current running direction (i.e., the aforementioned first direction) and a preset correction direction, thus overcoming the limitation of fixed obstacle avoidance directions in related technologies. Then, all trajectory points on the initial path are offset along each target direction, and the total movement distance of all points in each direction (i.e., the aforementioned total movement amount) is calculated. This ensures that the corrected path not only geometrically avoids the first obstacle but also maintains kinematic consistency with the initial path as much as possible. Finally, the target path is determined by selecting the set of target trajectory points with the smallest total movement amount. This allows for the rapid generation of an obstacle avoidance route at minimal cost while ensuring safety. Therefore, it solves the problem in related technologies where the difficulty in rationally planning the terminal's running path leads to the inability to guarantee timely obstacle avoidance. This significantly improves the terminal's response speed and obstacle avoidance success rate in dynamic and complex environments, thereby achieving the effect of timely determining a path that ensures the terminal avoids obstacles. Attached Figure Description

[0012] Figure 1 This is a schematic diagram illustrating an application scenario of a path determination method according to an embodiment of this application;

[0013] Figure 2 This is a flowchart illustrating a path determination method according to an embodiment of this application;

[0014] Figure 3 This is a flowchart illustrating a method for determining whether there are obstacles in the initial path according to an embodiment of this application;

[0015] Figure 4 This is a flowchart illustrating a method for determining the running path of an underwater robot according to an embodiment of this application;

[0016] Figure 5 This is a structural block diagram of a path determination device according to an embodiment of this application;

[0017] Figure 6 This is a computer system architecture block diagram of an electronic device according to an embodiment of this application. Detailed Implementation

[0018] 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 skilled in the art without creative effort should fall within the scope of protection of the present application. Furthermore, in the absence of conflict, the various embodiments and features in the embodiments of the present application can be arbitrarily combined with each other in principle.

[0019] 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.

[0020] According to one aspect of the embodiments of this application, a method for determining a path is provided. Optionally, in this embodiment, the above method may be applied, but is not limited to, to... Figure 1 The hardware environment shown includes terminal device 102 and server 104. Server 104 can be connected to terminal device 102 via a network and can be used to provide services (e.g., application services, etc.) to terminal device 102 or clients installed on terminal device 102. A database can be set up on server 104 or independently of server 104 to provide data storage services for server 104.

[0021] The aforementioned network may include, but is not limited to, at least one of the following: wired network and wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network (WAN), metropolitan area network (MAN), and local area network (LAN). The aforementioned wireless network may include, but is not limited to, at least one of the following: Wireless Fidelity (WIFI) and Bluetooth. Terminal device 102 may be, but is not limited to, a personal computer (PC), mobile phone, tablet computer, etc. Server 104 may be, but is not limited to, a cloud server, server cluster, or other server types.

[0022] The path determination method in this application embodiment can be executed by server 104, terminal device 102, or jointly by server 104 and terminal device 102. Alternatively, the path determination method executed by terminal device 102 can be executed by a client installed on it.

[0023] Taking the path determination method in this embodiment as an example, which is executed by the processor in terminal device 102, Figure 2 This is a flowchart illustrating a path determination method according to an embodiment of this application, as shown below. Figure 2 As shown, the process of this method may include the following steps:

[0024] Step S202: If it is determined at the first moment that there is a first obstacle in the initial path, multiple target directions are determined based on the preset correction direction and the first direction. The initial path is the path that the target terminal runs after the second moment, which is later than the first moment. The first direction is used to indicate the running direction of the target terminal at the first moment.

[0025] Optionally, the method provided in this embodiment can be applied to the field of autonomous obstacle avoidance of intelligent mobile terminals. Application scenarios include, but are not limited to: path planning of logistics delivery robots in complex urban environments, dynamic obstacle avoidance of automated guided vehicles in industrial manufacturing workshops, local trajectory planning of autonomous vehicles in dense traffic flow, safe navigation of indoor service robots in densely populated scenes, and intelligent navigation path planning of drones.

[0026] Optionally, in this embodiment, the first moment refers to a specific timestamp or the current control cycle moment when the target terminal's perception system or path planning algorithm executes obstacle detection and path correction decisions. For example, during the flight of the UAV, the system cyclically executes environmental perception and path planning at a fixed frequency (such as 25Hz or higher). The first moment is the starting point for executing the local obstacle avoidance strategy. It is earlier than the moment when the UAV actually arrives at the spatial position corresponding to the initial path and the target path, and is used to ensure that the path replanning is completed before the UAV enters the danger zone.

[0027] Optionally, before determining whether there is a first obstacle in the initial path at the first moment, the system first acquires environmental images by using multiple wide-angle vision sensors (such as fisheye cameras) deployed around the target terminal, and performs a health status assessment on each sensor (including ranging anomaly detection and lens occlusion / fogging detection); generates point clouds based on the normally functioning sensor data, constructs a three-dimensional grid map, identifies static obstacles in the environment (distinguishing between linear and non-linear obstacle types), and predicts the trajectory of the target terminal and dynamic obstacles, so as to use the predicted trajectory to determine whether there are obstacles in the initial path that the target terminal will pass through in future operation.

[0028] Optionally, in this embodiment, the first obstacle refers to a physical entity that, at the first moment, is detected by the target terminal's visual sensor (such as a multi-channel fisheye camera or a binocular camera) or radar sensor, and is located on the initial path or has a risk of intersecting with the initial path. The first obstacle includes, but is not limited to, static obstacles (such as high-voltage lines, utility poles, buildings, signal towers, and other linear or non-linear objects) and dynamic obstacles (such as other drones, birds, or floating plastic bags). The first obstacle occupies part or all of the space on the initial path, which may cause a collision if the target terminal runs along the initial path.

[0029] Optionally, the first obstacle in this embodiment includes static obstacles and dynamic obstacles. The dynamic obstacle identification method includes, but is not limited to: identifying the type and width of the dynamic obstacle based on an obstacle recognition network; performing image tracking on the pixels of the width of the obstacle; image tracking using optical flow tracking, descriptive word matching, or network tracking, etc.; first finding point cloud data sets OP1 and OP2 of the obstacle in the preceding and following frames of image tracking; then calculating the rotation and translation of the preceding and following frames using a preset algorithm and comparing it with the rotation and translation of the navigation; if the deviation is large, the obstacle's motion attribute is considered dynamic. Static obstacles include, but are not limited to, those identified using a recognition network.

[0030] Optionally, the target terminal in this embodiment is any intelligent terminal with autonomous mobility, including but not limited to drones, mobile robots, autonomous vehicles, underwater vehicles, etc.

[0031] Optionally, the initial path in this embodiment refers to the original flight trajectory generated by the target terminal based on the current global mission objective (such as the endpoint coordinates) and user or upper-level control commands, without undergoing local dynamic obstacle avoidance correction. For example, this path can be a theoretical path determined by connecting the user-defined intended flight endpoint with the current position of the UAV, which contains a series of discrete trajectory points arranged in time or space order, representing the UAV's ideal flight route.

[0032] Optionally, the initial path in this embodiment is the expected trajectory of the target terminal (such as a drone) after the second moment. This path is based on the environmental image data obtained by multiple visual sensors (such as a four-way fisheye camera) captured at the current moment (i.e. the first moment mentioned above) and historical moments, combined with the target terminal's own motion state information (such as pose, speed, acceleration, etc. obtained through integrated navigation) and the future trajectory generated by the prediction algorithm.

[0033] The following example illustrates how to determine if a first obstacle exists in the initial path during practical use. Figure 3 This is a flowchart illustrating a method for determining whether an obstacle exists in an initial path according to an embodiment of this application. In this optional example, the target terminal is a drone, and the drone is surrounded by four fisheye lenses. The resolution of the images or videos captured by these four fisheye lenses is W. H is measured in pixels (px), W can be 1952px, and H can be 1944px. Fisheye cameras offer a wide field of view, exceeding 180 degrees. Four fisheye lenses can completely cover the entire drone, with a frame rate exceeding 25Hz. Currently, drone operations are diverse, including low-altitude urban patrols, high-voltage power line inspections, jungle search and rescue, indoor search and rescue, and traffic patrols. These scenarios involve various static and dynamic obstacles, such as tall buildings, utility poles, signal towers, and other aircraft. Therefore, to ensure drone flight safety, it is crucial to pre-determine whether obstacles exist along the drone's future flight path and to enable the drone to plan its path to avoid obstacles in a timely manner. Figure 3 As shown, the process of this method may include the following steps:

[0034] Step S302: Detect whether there are any abnormal fisheye devices in the four fisheyes around the device. The abnormalities include, but are not limited to, ranging abnormalities, lens obstruction, and lens fogging.

[0035] Step S304: Generate point cloud data based on the images captured by the fisheye device. The specific steps for generating point cloud data include, but are not limited to: disassembling each pair of fisheyes to obtain common areas; using a cylindrical projection model to expand the field of view, enabling the image to achieve a larger field of view at a limited resolution; using a stereo matching network (this embodiment does not limit the network) for pixel matching; calculating the disparity; and calculating the depth based on the parameters after stereo calibration of the fisheyes to finally obtain point cloud data. If there is an abnormal fisheye device, and the abnormality is due to abnormal detection distance, complete occlusion, or complete fogging, the point cloud depth corresponding to the image captured by the abnormal fisheye device is set to 0, and the user is prompted that the visual detection is abnormal. If the fisheye is partially occluded or partially fogged, the point cloud depth of the occluded or fogged area is set to 0.

[0036] Step S306: Predict the dynamic obstacles and the trajectory of the UAV. Specifically, use optical flow tracking or descriptor matching algorithms to track dynamic obstacles (such as birds or other aircraft), and combine a fifth-order polynomial minimization Jerk time integral model to predict the future trajectory of the dynamic obstacles. Also, predict the trajectory of the target terminal itself based on a uniform steering model or a uniform velocity model. The predicted distance is determined by the velocity (i.e., distance D = t). V, where the velocity V1 obtained from the horizontal estimation is... The vertically estimated velocity V2=Vz, where t is the maximum warning time (which can be 5s), and Vx, Vy, and Vz represent the component velocities of the UAV in the three directions in the global coordinate system, respectively. Finally, the trajectory points (P1, P2, ..., Pn) are estimated. Dynamic obstacle trajectory prediction is constructed using a 5th-order polynomial, solved based on six location points tracked by dynamic obstacles. The tracking method uses optical flow or a network for image tracking, followed by point cloud solving and transformation to the global coordinate system. The target constraint is minimizing the Jerk time integral, where Jerk is the first derivative of acceleration. The formula for the aforementioned 5th-order polynomial is expressed as follows: Minimizing the Jerk time integral is expressed as The coefficients are solved by using polynomials to solve the equations, and the predicted position is deduced by predicting the time.

[0037] Step S308: A three-dimensional grid map is established based on point cloud data and predicted dynamic obstacles and the UAV's trajectory. The pose transformation from fisheye coordinates to UAV coordinates is known. The point cloud information is converted to UAV coordinates to establish the three-dimensional grid map. Each cell in the three-dimensional grid map has its corresponding attributes. The attributes of each cell are calculated using ray theory and point cloud information. The attributes include O (occupied, i.e., there is an obstacle in the cell), F (unoccupied, i.e., there is no obstacle in the cell), and U (unknown, i.e., it is uncertain whether there is an obstacle in the cell). The runnable area is represented by R(ф, θ), where ф represents the pitch angle, θ represents the azimuth angle, and R(ф, θ) represents the maximum unoccupied distance at each pitch angle and azimuth angle.

[0038] Step S310: Use the established 3D grid map to determine whether there are obstacles in the initial path. If the initial path (i.e. the predicted trajectory of the UAV) is detected to intersect with the predicted dynamic obstacle trajectory or static obstacle, it is determined that there are obstacles in the initial path, triggering the subsequent obstacle avoidance correction process.

[0039] It should be noted that the above-mentioned methods for detecting distance measurement anomalies include, but are not limited to, the following: using a standard reference object, such as a manually set QR code or a vehicle of known size, calculating the depth with a monocular camera and comparing it with the obstacle position calculated by a binocular camera; if the error exceeds a threshold (which can be designed empirically while considering measurement variance), then it is considered that there is a problem with the binocular disparity matching, and the distance measurement is abnormal; or, in the global coordinate system, calculating the position difference Perr of the same static obstacle at two times (e.g., t1 and t2) of the UAV; if Perr exceeds a certain threshold (which can be designed empirically while considering measurement variance), then it is considered that the distance measurement is abnormal, where Perr = O1 - O2, O1 represents the position of the static obstacle captured by the UAV camera at time t1 in the global coordinate system, and O1 = R1. P1+T1, where P1 represents the 3D position of the static obstacle at time t1 relative to the UAV camera coordinate system at time t1, R1 represents the global attitude rotation matrix of the UAV at time t1 (representing the rotation relationship from the UAV camera coordinate system to the global coordinate system), T1 represents the position of the UAV in the global coordinate system at time t1, and O2=R2. P2+T2, where P2 represents the 3D position of the same static obstacle at time t2 relative to the drone's camera coordinate system at time t2, R2 represents the global attitude rotation matrix of the drone at time t2 (representing the rotation relationship from the drone's camera coordinate system to the global coordinate system), and T2 represents the position of the drone in the global coordinate system at time t2. Lens occlusion or fogging is determined, but not limited to, by the following methods: directly determining whether the current lens is occluded or fogged using a known network trained for multiple scenarios; edge-mapping the image, calculating connected components and the number of pixels, selecting connected components T with a pixel count greater than a threshold, and then calculating the average fluctuation of pixels at the location of that connected component during a period of drone movement; if the average fluctuation is less than a certain set threshold, the lens is considered to be occluded or fogged.

[0040] Optionally, the preset correction direction in this embodiment refers to a pre-set geometric direction used to guide the target terminal away from the initial path to avoid obstacles. In actual use, the preset correction direction includes, but is not limited to: a direction perpendicular to the current running direction of the target terminal, a specific vertical direction (such as the J1 direction represented as (0, 0, -1) in the northeast coordinate system), and a specific avoidance direction determined according to the type of obstacle (such as linear obstacles requiring vertical detour).

[0041] Optionally, in this embodiment, the first direction refers to the instantaneous motion direction of the target terminal at the first moment. It is typically calculated by the target terminal's inertial measurement unit and integrated navigation system, reflecting the target terminal's current operating attitude and velocity vector (including horizontal velocities Vx, Vy, and vertical velocity Vz). The first direction is not only used to determine the target terminal's current orientation but also serves as a reference direction for subsequently determining the target's orientation.

[0042] Optionally, in this embodiment, the target direction refers to a specific adjustment direction generated based on a combination of a first direction and a preset correction direction, used to guide the movement of the trajectory point. For example, the target direction is derived from multiple candidate directions by performing vector operations (such as cross product) between the first direction (e.g., the current running direction of the UAV) and the preset correction direction. Each target direction represents a potential obstacle avoidance strategy, and the system needs to make tentative movements of the initial trajectory point along these different target directions to find the optimal obstacle avoidance path.

[0043] Step S204: Adjust the positions of multiple initial trajectory points according to each of the above target directions to obtain multiple sets of first trajectory points. The above initial path includes the above multiple initial trajectory points. The multiple first trajectory points included in each of the above sets of first trajectory points are trajectory points obtained by moving the above multiple initial trajectory points according to the same target direction.

[0044] Optionally, in this embodiment, the initial trajectory points refer to a series of discrete spatial coordinate points that constitute the initial path. These points are uniformly distributed in time or space, representing the target position of the target terminal at various times or locations on the initial path. The initial trajectory points include the endpoint and intermediate key control points on the initial path.

[0045] Optionally, in this embodiment, the first trajectory point set refers to a new sequence of trajectory points formed by moving all initial trajectory points in the initial path along the same target direction by a fixed distance or through iterative search. Each first trajectory point set corresponds to a specific target direction (such as a leftward correction direction, a rightward correction direction, etc.), and each first trajectory point in the set is a new position obtained by moving the corresponding initial trajectory point a certain amount in that target direction, used to simulate the new path of the target terminal running along that specific correction direction.

[0046] It should be noted that in practical use, the new initial path of the target terminal can also be determined through other methods. For example, when the target terminal is an underwater robot, four spherical cameras are deployed around the underwater robot, which can completely cover the entire body of the underwater robot. If there is an anomaly among the four spherical cameras at the first moment (e.g., abnormal ranging, lens obstruction, lens fogging), point cloud data is generated based on the images captured by the other spherical cameras, and the dynamic obstacles and the trajectory of the underwater robot are predicted. A three-dimensional grid map is built based on the point cloud data and the predicted dynamic obstacles and the trajectory of the underwater robot. Each cell in the three-dimensional grid map has its corresponding attributes, including O (occupied, i.e., there is an obstacle in the cell), F (unoccupied, i.e., there is no obstacle in the cell), and U (unknown, i.e., it is uncertain whether there is an obstacle in the cell). The runnable area is represented by R(ф, θ), where ф represents the pitch angle, θ represents the azimuth angle, and R(ф, θ) represents the maximum unoccupied distance at each pitch angle and azimuth angle. Based on the operational area, a point is determined at a preset distance (e.g., five meters) from the underwater robot. When searching for this point, the search starts from 0 degrees (i.e., the deviation angle from the underwater robot's running direction at the first moment is 0 degrees) and proceeds step by step. For example, if the distance corresponding to 0 degrees exceeds 5 meters, the point at the 0-degree 5-meter position is directly selected. If this condition is not met, the search proceeds sequentially according to the angle (i.e., according to preset deviation angles such as 1 degree from the underwater robot's running direction at the first moment) until a point is found that satisfies the condition that the distance between the found point and the current position of the underwater robot is 5 meters and the found point is located within the operational area.

[0047] Step S206: Determine the set of first trajectory points with the smallest total movement among the plurality of first trajectory point sets as the target trajectory point set, and adjust the initial path to the target path determined based on the target trajectory point set, wherein the total movement is the sum of the movement distances between each of the first trajectory points included in the first trajectory point set and the corresponding initial trajectory point.

[0048] Optionally, in this embodiment, the total movement refers to the sum of the distances moved by all first trajectory points in a first trajectory point set to their corresponding original initial trajectory points. The total movement serves as an evaluation metric to quantify the degree of path deformation under different correction directions. A smaller total movement indicates a smaller deviation between the new path and the original intended path, requiring less adjustment in attitude and position for the target terminal. This is generally considered a superior, smoother, and more user-intended obstacle avoidance solution.

[0049] Optionally, in this embodiment, the target trajectory point set refers to the trajectory point set with the smallest total movement among all generated first trajectory point sets. The target trajectory point set represents the optimal obstacle avoidance path point sequence calculated by the system at the current moment. The target terminal will replan the subsequent high-speed or low-speed running path based on this set of points to achieve the effect of avoiding obstacles while maintaining the original driving intention as much as possible.

[0050] Optionally, in this embodiment, the target path refers to the final local obstacle avoidance path regenerated based on the target trajectory point set, used to guide the actual operation of the target terminal. The target path not only includes discrete points in the target trajectory point set, but may also undergo subsequent smoothing processing (such as B-spline curve fitting, minimum jerk optimization, etc., where jerk is the jerk and is used to represent the rate of acceleration change) to generate a continuous, smooth, and executable running trajectory that conforms to the dynamic constraints of the target terminal, ensuring that the target terminal can safely and smoothly bypass the first obstacle.

[0051] Optionally, adjusting the initial path to a target path determined based on the set of target trajectory points includes at least one of the following: adjusting the running direction of the target terminal based on the target path; controlling the speed and acceleration of the target terminal when running on the first path to be less than the maximum speed and maximum acceleration of the target terminal when running on the first path, and controlling the speed and acceleration of the target terminal when running on the second path to be less than the maximum speed and maximum acceleration of the target terminal when running on the second path.

[0052] This embodiment first generates multiple potential obstacle avoidance directions based on the target terminal's current running direction (i.e., the aforementioned first direction) and a preset correction direction, overcoming the limitation of fixed obstacle avoidance directions in related technologies. Then, all trajectory points on the initial path are offset along each target direction, and the total movement distance of all points in each direction (i.e., the aforementioned total movement amount) is calculated. This ensures that the corrected path not only geometrically avoids the first obstacle but also maintains kinematic consistency with the initial path as much as possible. Finally, the target path is determined by selecting the set of target trajectory points with the smallest total movement amount. This allows for the rapid generation of an obstacle avoidance route at minimal cost while ensuring safety. Therefore, it solves the problem in related technologies where the inability to rationally plan the terminal's running path leads to the inability to guarantee timely obstacle avoidance. This significantly improves the terminal's response speed and obstacle avoidance success rate in dynamic and complex environments, thereby achieving the effect of timely determining a path that ensures the terminal avoids obstacles.

[0053] In an exemplary embodiment, determining multiple target directions based on a preset correction direction and a first direction includes: performing a cross product operation on a preset correction direction vector and a first vector to obtain a second vector, wherein the preset correction direction vector is used to indicate the preset correction direction and the first vector is used to indicate the first direction; repeating the following operations until the number of cross product operations is satisfied with a preset number to obtain multiple target directions; determining the direction indicated by the second vector as a target direction included in the multiple target directions; performing a cross product operation on the second vector and the first vector to obtain a third vector; and determining the third vector as a new second vector.

[0054] Optionally, the preset correction direction vector in this embodiment is used to indicate the preset correction direction. It is a geometric direction reference vector initially set by the target terminal when it detects an obstacle, used to deviate from the original running path or initial trajectory. The vector includes, but is not limited to: a single vertical downward direction, such as (0, 0, -1), a direction determined according to the type of obstacle (such as the vertical detour direction corresponding to a linear obstacle), and any spatial direction vector dynamically generated according to terrain features or safety policies.

[0055] Optionally, the first vector in this embodiment is used to indicate the first direction. It is the direction vector of the instantaneous motion state of the target terminal at the first moment. It is usually obtained by normalizing the velocity vector of the target terminal (which includes horizontal components Vx, Vy and vertical components Vz), or by calculating the unit direction vector from the current heading angle and pitch angle.

[0056] Optionally, in this embodiment, the second vector refers to the vector obtained by performing a cross product operation between the preset correction direction vector and the first vector. This vector is geometrically perpendicular to the plane formed by the preset correction direction vector and the first vector. During the iteration process, the second vector acts as the vector for generating the next target direction. It represents a specific obstacle avoidance direction derived in the current calculation step. As the number of iterations increases, the second vector will rotate or transform in the space or related subspace spanned by the first vector and the preset correction direction vector to cover more potential obstacle avoidance angles.

[0057] Optionally, in this embodiment, the target direction refers to the direction indicated by the second vector after the above-described cross product operation iteration process, which is a candidate avoidance direction used to guide the movement of the initial trajectory point. The target direction includes, but is not limited to, lateral (such as left turn, right turn), vertical (such as ascending, descending) directions perpendicular to the first vector (i.e., the current direction of movement), and combinations thereof.

[0058] Optionally, in this embodiment, the third vector refers to a new vector generated at the end of an iteration loop by performing a cross product operation on the current second vector and the first vector again; the third vector is reassigned to the second vector as input for the next iteration.

[0059] Optionally, in this embodiment, the preset number of times refers to an integer threshold that controls the termination condition of the target direction generation iteration process, i.e., specifies the number of times the cross product operation needs to be executed, thereby determining the size of the final generated target direction set. The preset number of times can be flexibly set according to the needs of the application scenario. For example, it can be set to 2 times to generate 3 mutually orthogonal main directions (such as forward, lateral, and vertical), or set to more times to generate a denser hemispherical or fully spatially distributed candidate direction set. The setting of the preset number of times balances computational complexity and the comprehensiveness of obstacle avoidance search, ensuring that the target terminal can quickly obtain enough avoidance directions for subsequent evaluation under limited computing resources.

[0060] The following examples illustrate the method provided in this embodiment. For instance, a preset correction direction vector J1 (0, 0, -1) in the northeast coordinate system is obtained; then, a cross product operation is performed on J1 and the first vector to obtain J2, and the direction indicated by J2 is determined as the target direction included among multiple target directions; a cross product operation is performed on J2 and the first vector to obtain J3, and the direction indicated by J3 is determined as the target direction included among multiple target directions; finally, three target directions are obtained (i.e., the directions indicated by J1, J2, and J3). For example, the orientation of a known linear obstacle is determined as a preset correction direction vector J1; then, a cross product operation is performed on J1 and the first vector to obtain J2, and the direction indicated by J2 is determined as one of the target directions included in multiple target directions; a cross product operation is performed on J2 and the first vector to obtain J3, and the direction indicated by J3 is determined as one of the target directions included in multiple target directions; a cross product operation is performed on J3 and the first vector to obtain J4, and the direction indicated by J4 is determined as one of the target directions included in multiple target directions; a cross product operation is performed on J4 and the first vector to obtain J5, and the direction indicated by J5 is determined as one of the target directions included in multiple target directions; finally, five target directions are obtained (i.e., the directions indicated by J1, J2, J3, J4, and J5).

[0061] It should be noted that in practical use, the target direction can also be obtained by deviating the first direction from a certain preset degree. The process of determining the target direction is not limited to the method provided in this embodiment. For example, with the first direction as the reference axis, a cone or hemispherical search domain with the current position of the target terminal as the vertex is constructed in three-dimensional space. By setting a preset deflection angle step size (such as 30 degrees deflection in the horizontal direction and 15 degrees deflection in the vertical direction each time), multiple target directions covering different orientations are generated. These directions are used to ensure that when the target terminal faces obstacles in different positions, it can select the optimal path from multiple potential avoidance angles.

[0062] In this embodiment, by utilizing the cyclic cross product mechanism (similar to the process of constructing a local orthogonal basis), multiple target directions covering different spatial dimensions can be generated step by step through simple vector operations without relying on complex matrix decomposition. This ensures that the generated multiple target directions are mathematically orthogonal or approximately orthogonal, thereby avoiding the overlap of target directions and ensuring that the first trajectory points included in the subsequent determined multiple sets of first trajectory points are different.

[0063] In an exemplary embodiment, adjusting the positions of multiple initial trajectory points according to each of the aforementioned target directions to obtain multiple sets of first trajectory points includes: performing the following operations for each of the aforementioned target directions to obtain the multiple sets of first trajectory points: sorting the multiple initial trajectory points according to the order in which they appear in the aforementioned initial path to obtain an initial set of trajectory points; moving the multiple initial trajectory points sequentially according to the aforementioned target directions based on the order of the multiple initial trajectory points until the first position to which the multiple initial trajectory points have moved satisfies a preset condition, and determining the multiple first trajectory points based on the first position to which the multiple initial trajectory points have moved to obtain a first set of trajectory points included in the multiple sets of first trajectory points, wherein the preset condition is used to indicate that there is no first obstacle in a preset area including the aforementioned first trajectory points.

[0064] Optionally, in this embodiment, the initial trajectory point set refers to an ordered sequence formed by arranging the aforementioned initial trajectory points according to their order of appearance in the initial path (such as the temporal order or spatial distance order from the starting point to the ending point). This set preserves the topological structure information of the initial path, ensuring that the logical order from front to back is followed when moving and correcting the trajectory points.

[0065] Optionally, in this embodiment, the first position refers to the new position reached by an initial trajectory point after moving a certain distance along a specific target direction. At the first position, it is verified whether the point and its surrounding area are safe. If safe, the point is confirmed as the corrected trajectory point; otherwise, the movement amount continues to be adjusted.

[0066] Optionally, the preset conditions in this embodiment refer to geometric constraints or spatial detection rules used to determine whether the position of the initial trajectory point after movement is safe. The preset conditions include, but are not limited to: there is no first obstacle within the volume of a sphere or cylinder with the first position as the center and a radius of a preset safe distance (such as 3 meters); there is no first obstacle in the preset areas such as rectangles and squares including the first position.

[0067] Optionally, in this embodiment, the first trajectory point refers to a new position point determined after moving along the target direction and meeting preset conditions. The first trajectory point is used to determine how to correct the initial path subsequently.

[0068] Optionally, in this embodiment, the first set of trajectory points refers to a complete sequence of new trajectory points generated after moving sequentially according to the order of the initial trajectory points and determining the first position for a specific target direction. Each set of first trajectory points corresponds to a specific obstacle avoidance strategy (such as avoiding to the left, avoiding downwards, etc.).

[0069] In this embodiment, multiple initial trajectory points are moved according to the order in which they appear in the initial path, and preset conditions are introduced to ensure that the first trajectory point has sufficient safety redundancy space (i.e., there are no first obstacles around it), thereby ensuring that the subsequently determined target path can effectively avoid obstacles.

[0070] In an exemplary embodiment, based on the order of the plurality of initial trajectory points, the plurality of initial trajectory points are moved sequentially in the target direction until the first position reached by the initial trajectory points satisfies a preset condition, and the plurality of first trajectory points are determined based on the first position reached by the plurality of initial trajectory points, including: setting the initial movement amount to 0 and repeatedly performing the following target operation until the set of initial trajectory points is empty, to obtain the plurality of first trajectory points: taking the trajectory point ranked first in the set of initial trajectory points as the current point to be processed, and deleting the current point to be processed from the set of initial trajectory points to update the set of initial trajectory points; moving the current point to be processed a distance indicated by the initial movement amount in the target direction to obtain a second trajectory point; moving the second trajectory point in the target direction until the position reached by the second trajectory point satisfies the preset condition, and determining the position reached as the first position; taking the point corresponding to the first position as the first trajectory point corresponding to the current point to be processed; calculating the first movement amount of the current point to be processed moving to the first trajectory point, and updating the initial movement amount based on the first movement amount.

[0071] Optionally, in this embodiment, the initial movement amount refers to a reference distance parameter used to control the tentative movement of the current trajectory point to be processed along the target direction. In the initial stage of the algorithm execution provided in this embodiment, this value is set to 0, indicating that the attempt to avoid obstacles begins from the original position of the current point to be processed. As the loop executes, this value is dynamically updated to the avoidance offset required by the previous trajectory point, thus forming a cumulative avoidance strategy that ensures that subsequent trajectory points not only avoid obstacles themselves but also maintain their relative positional relationship with the previously corrected trajectory points.

[0072] Optionally, in this embodiment, the initial trajectory point set refers to an ordered data set including all initial trajectory points to be corrected. During the cyclic processing, this set acts as a queue of tasks to be processed. By continuously taking the first point from the set for processing and immediately deleting it to update the set state, it is ensured that the initial trajectory points are processed one by one in the order they appear in the initial path (e.g., from the starting point to the ending point).

[0073] Optionally, in this embodiment, the current point to be processed refers to a specific initial trajectory point extracted from the initial trajectory point set and located at the top. This point represents a specific spatial coordinate of the target terminal on the initial path. It is used as the starting point of movement, and its new position after avoiding the first obstacle is determined by searching and moving along the target direction.

[0074] Optionally, in this embodiment, the second trajectory point refers to a temporary position point obtained after the current point to be processed moves a distance indicated by the initial movement amount along the target direction. The second trajectory point is an intermediate state point in the trajectory correction process. Then, based on the second trajectory point, further displacement search is performed along the target direction until the position moved by the second trajectory point meets the preset conditions.

[0075] Optionally, in this embodiment, the first position refers to the spatial coordinates of the second trajectory point after it continues to move along the target direction and first meets the preset condition (i.e., there is no first obstacle in the safe area of ​​the position and its surrounding area). In other words, the first position represents the first safe avoidance point found by the current point to be processed in a specific target direction.

[0076] Optionally, in this embodiment, the first movement amount refers to the total displacement distance traversed by the current point to be processed from its original position (i.e., the position indicated by the initial trajectory point) to its final safe position (i.e., the first trajectory point). In actual use, the calculation of the first movement amount is performed on the premise that the initial trajectory set is not empty.

[0077] The method provided in this embodiment is illustrated below with an example. The first point P1 (the first trajectory point in the initial trajectory point set) moves in the J1 direction. It stops moving when there are no obstacles within a 3m radius, and the current movement is recorded as deltaP1 and the point P1 moves to is PE1. The second point P2 (the first trajectory point after removing P1 from the initial trajectory point set) first moves in the J1 direction by the distance indicated by deltaP1 (or by the distance indicated by deltaP1 ± a preset distance), obtaining p2. Then, p2 moves in the J1 direction until there are no obstacles within a 3m radius, stopping and the point PE2 moved to is recorded. At this point, the calculation... The movement between P2 and PE2 is deltaP2; the third point P3 (i.e., the trajectory point that is first after removing P1 and P2 from the initial trajectory point set) moves in the J1 direction by the distance indicated by deltaP2 (or moves by the distance indicated by deltaP2 ± the preset distance) to obtain p3. Then, p3 is moved in the J1 direction until there are no obstacles within 3m around it. The movement stops and the point PE3 that p3 moves to is recorded. At this time, the movement between P3 and PE3 is calculated as deltaP3... and so on until the initial trajectory point set is empty and multiple first trajectory points PE1, PE2, PE3, etc. are obtained.

[0078] In this embodiment, the movement distance of each initial trajectory point is determined by continuously updating the initial movement amount, ensuring that subsequent initial trajectory points can refer to the avoidance range of the previous initial trajectory point when avoiding obstacles. This accurately controls the final position obtained by each initial trajectory point after movement, avoiding the problem of sudden changes in the target path that may be caused by adjusting each initial trajectory point in isolation.

[0079] In an exemplary embodiment, moving the second trajectory point in the target direction until the position reached by the second trajectory point satisfies the preset condition, and determining the position reached as the first position, includes: if the position of the second trajectory point satisfies the preset condition, determining the position of the second trajectory point as the first position; if the position of the second trajectory point does not satisfy the preset condition, continuing to move the second trajectory point in the second direction until the position to which the second trajectory point continues to move satisfies the preset condition, and determining the position to which it continues to move as the first position.

[0080] In this embodiment, the second trajectory point determined by the initial movement is used as the starting point for trial. Real-time verification is performed based on preset conditions: if the second trajectory point is already within a safe area, it is directly confirmed as the corrected first position, thus reducing unnecessary computational overhead; if the second trajectory point is still within the obstacle's influence range (i.e., does not meet the preset conditions), the algorithm continuously or incrementally extends along the target direction, gradually moving away from the obstacle until the first position that meets the preset conditions is found as the first position. This mechanism ensures the generation of collision-free trajectory points even in complex obstacle environments, improving the adaptability and computational efficiency of subsequent path planning. It avoids resource waste caused by excessive searching in open areas and ensures that in dense obstacle areas, the local optimum trajectory point can be reliably found by dynamically adjusting the movement step size or range, providing a basic reference standard for generating subsequent obstacle avoidance target paths.

[0081] In an exemplary embodiment, before adjusting the initial path to a target path determined based on the target trajectory point set, the method further includes: sorting the plurality of first trajectory points included in the target trajectory point set according to the order in which the initial trajectory points corresponding to each of the first trajectory points appear in the initial path to obtain a second trajectory point set; determining the shortest path between every two adjacent first trajectory points in the second trajectory point set to obtain a plurality of shortest paths; determining an initial search path based on the plurality of shortest paths; and determining a first segmentation point on the initial search path based on a runnable region, wherein the first segmentation point is the first point on the initial search path that is not in the runnable region, and the runnable region... The region is the area where the first obstacle is no longer present after the second time point. Based on the first segmentation point, the initial search path is divided into a starting segment path and an ending segment path. The starting segment path is the path from the current position to the first segmentation point, and the ending segment path is the path from the first segmentation point to the target intent point. The current position is the position reached by the target terminal at the first time point, and the target intent point is the last-ranked trajectory point included in the second trajectory point set. Optimization operations are performed on the starting segment path and the ending segment path to obtain a first path and a second path. Both the first path and the second path satisfy preset constraints. The target path is determined based on the first path and the second path.

[0082] Optionally, the second set of trajectory points in this embodiment refers to a series of first trajectory points obtained after avoidance correction, which are an ordered list of points formed by rearranging and organizing them strictly according to the order in which their corresponding initial trajectory points appear in the initial path (such as the temporal or spatial topological order from the starting point to the end point).

[0083] Optionally, in this embodiment, the shortest path refers to a collision-free connected line segment or polyline sequence that connects any two adjacent first trajectory points in the second trajectory point set in a grid map or 3D space using traditional graph search algorithms or geometric lines. In this embodiment, the shortest path is the path with the shortest geometric distance or the minimum cost function, determined while avoiding the first obstacle. The shortest path can connect discrete first trajectory points into a complete, initially feasible polyline trajectory.

[0084] Optionally, the initial search path in this embodiment refers to the complete initial polyline trajectory formed by connecting the shortest paths between multiple adjacent first trajectory points, linking the current position to the last-ranked first trajectory point in the second trajectory point set. The initial search path may include multiple acute-angle turns, which, while satisfying basic obstacle avoidance requirements, may not meet the kinematic constraints of the target terminal (such as maximum curvature and jerk limits), thus requiring further optimization.

[0085] Optionally, the operable area in this embodiment refers to a safe passage space that is dynamically calculated based on environmental perception information after the second time (i.e., the current time and a future period of time) and in which there are no first obstacles (including static obstacles and dynamic obstacles) in space.

[0086] Optionally, in this embodiment, the first segmentation point refers to the first path point encountered when traveling along the initial search path from the current position to the last-ranked first trajectory point in the second trajectory point set, entering or being in a non-safe area (i.e., outside the operational area, such as an obstacle-occupied area, a no-fly zone, or an unknown danger zone). The first segmentation point marks the end of the safe operation phase and the beginning of the high-risk / unknown operation phase. It is a key node for defining path strategies. The location of the first segmentation point helps the target terminal distinguish between known safe environments and unknown or dangerous environments that require careful handling, thereby enabling the implementation of differentiated speed control and path smoothing strategies in the subsequent process.

[0087] Optionally, in this embodiment, the starting segment path is the path from the current location to the first segmentation point. This segment path is entirely located within a known and defined operable area, and the environmental information is relatively reliable. Therefore, this segment path usually allows the target terminal to run at a high speed.

[0088] Optionally, in this embodiment, the termination segment path refers to the path from the first segmentation point to the target intention point (i.e., the last point in the second trajectory point set). This segment path traverses unknown or high-risk areas with high environmental uncertainty. Therefore, this segment path usually requires the target terminal to reduce its operating speed to cope with possible dynamic changes or perception errors.

[0089] Optionally, the preset constraints in this embodiment refer to a series of physical, geometric, and safety restrictions that the generated first and second paths must satisfy, including but not limited to maximum running speed, maximum acceleration / angular velocity, minimum turning radius, safe distance to avoid collisions with obstacles, and trajectory smoothness indices (such as minimizing Jerk or angular acceleration integrals). These conditions ensure that the generated target path is not only geometrically connected but also dynamically executable.

[0090] Optionally, the target path in this embodiment refers to the path that is finally generated for the target terminal to actually run after performing smooth optimization based on spline curves (such as B-splines) on the starting segment path and the ending segment path respectively, and satisfying all preset constraints. This path combines the strategies of high-speed and efficient safe segment operation and low-speed and cautious dangerous segment operation, thus achieving a balance between safety and efficiency.

[0091] In this embodiment, an initial search path is obtained by generating the shortest path between every two adjacent first trajectory points in the second trajectory point set. Then, the concept of a runnable region is introduced, and the initial search path is divided into a start segment path and an end segment path. The start segment path and the end segment path are then optimized to meet different preset constraints. This ensures that the target terminal can run according to different strategies on the start segment path and the end segment path, avoiding computational redundancy caused by uniform optimization of the entire path.

[0092] In an exemplary embodiment, determining the shortest path between every two adjacent first trajectory points in the second trajectory point set includes: determining the shortest path between two adjacent first trajectory points in the second trajectory point set sequentially as follows: determining the current speed of the target terminal and the third moment when the target terminal reaches the third trajectory point; determining the shortest path from the third trajectory point to the fourth trajectory point based on the current speed and the third moment; wherein the current speed is the speed of the target terminal when it reaches the current position, and the third trajectory point and the fourth trajectory point are trajectory points included in the two adjacent first trajectory points.

[0093] Optionally, the current speed in this embodiment refers to the instantaneous speed of the target terminal when it reaches the current position at the first moment. It usually includes horizontal speed components (such as Vx, Vy) and vertical speed components (such as Vz), or the combined speed magnitude and heading angle.

[0094] Optionally, in this embodiment, the third moment refers to the predicted arrival time of the target terminal from its current position (i.e., the state point corresponding to the current speed) to the next trajectory point to be processed in the sequence (i.e., the third trajectory point, the trajectory point in the second trajectory point set); this moment is a timestamp calculated based on the current speed, distance, and kinematic model (such as uniform speed model, uniform acceleration model, or polynomial trajectory model), used to transform spatial path planning into a time-related trajectory optimization problem, including but not limited to simple time intervals calculated based on the uniform speed assumption, or complex time parameters obtained by solving the minimum jerk polynomial.

[0095] Optionally, in this embodiment, the third trajectory point refers to the first first trajectory point in the second trajectory point set that is located before the fourth trajectory point and adjacent to the current state point (or the previous processed point).

[0096] Optionally, in this embodiment, the fourth trajectory point refers to another first trajectory point in the second trajectory point set that is located after the third trajectory point and adjacent to the third trajectory point. It and the third trajectory point together constitute a basic unit segment in the path planning.

[0097] Optionally, in this embodiment, the shortest path refers to the connecting line between the third trajectory point and the fourth trajectory point that minimizes a certain cost function (such as geometric distance, time cost, or energy consumption) while satisfying the no-collision constraint (i.e., not crossing the grid or space volume occupied by the first obstacle). The shortest path in this embodiment is not limited to the minimum Euclidean geometric distance; it can also be the path with the fewest steps obtained based on grid search, the optimal path obtained based on dynamic programming, or the asymptotically optimal path obtained based on a sampling algorithm.

[0098] In this embodiment, the shortest path between adjacent trajectory points is dynamically determined based on the current speed and arrival time, so that the path planning can closely follow the real-time motion state of the target terminal. By combining time constraints for path optimization, a more time-consistent feasible trajectory can be generated, ensuring that the target terminal does not need to frequently accelerate or decelerate or adjust its attitude during subsequent operation.

[0099] In an exemplary embodiment, the aforementioned preset constraints include: a feasibility constraint, wherein the feasibility constraint indicates that the maximum speed and maximum acceleration of the target terminal running on the first path are greater than a first threshold and a second threshold, respectively, and the maximum speed and maximum acceleration of the target terminal running on the second path are less than a third threshold and a fourth threshold, respectively, wherein the first threshold is greater than the third threshold and the second threshold is greater than the fourth threshold; and a smoothness constraint, wherein the smoothness constraint indicates that the values ​​calculated using a first function and a second function are less than a fifth threshold and a sixth threshold, respectively, wherein the first function represents the weighted average of the time integral of the jerk and the time integral of the angular acceleration when the target terminal runs on the first path. The sum value, the second function mentioned above, is used to represent the weighted sum of the time integral of the jerk and the time integral of the angular acceleration when the target terminal runs on the second path; the anti-collision constraint, wherein the anti-collision constraint is used to indicate that the target value is less than the seventh threshold, the target value is used to represent the sum of the first value and the second value, the first value is used to represent the sum of the distances between each first discrete point included in the first path and the fifth trajectory point included in the starting segment path, the fifth trajectory point being the point closest to the current first discrete point, the second value is used to represent the sum of the distances between each second discrete point included in the second path and the sixth trajectory point included in the ending segment path, the sixth trajectory point being the point closest to the current second discrete point.

[0100] Optionally, the feasibility constraint in this embodiment refers to a set of conditions that restrict the dynamic performance boundaries of the target terminal when running on different path segments. Specifically, it is manifested as upper and lower limit control of the maximum speed and maximum acceleration. Among them, the starting segment path (i.e., the path included in the safe known area) allows higher maximum speed and acceleration to pursue flight or driving efficiency, while the ending segment path (i.e., the path included in the unknown or high-risk area) strictly limits the maximum speed and acceleration to be relatively small to ensure the controllability and safety of the target terminal in the uncertain environment. This constraint ensures that the generated path is physically executable and conforms to the safety policies of different areas.

[0101] Optionally, the smoothness constraint in this embodiment refers to the mathematical optimization conditions used to ensure the continuity and comfort of the path motion, which is achieved by minimizing the time integrals of jerk (i.e., the rate of change of acceleration) and angular acceleration (the rate of change of angular velocity). Specifically, the first function and the second function calculate the weighted sum of jerk and angular acceleration in the starting and ending segments of the trajectory, respectively, and require that these values ​​be less than the fifth threshold and the sixth threshold, respectively, thereby avoiding severe shaking, impact, or sudden attitude changes in the terminal during motion.

[0102] Optionally, the collision avoidance constraint in this embodiment refers to the geometric constraint condition that ensures a sufficient safe distance between the optimized target path (the first path and the second path) and the initial search path (the starting segment path and the ending segment path). Specifically, by calculating the sum of the distances (i.e., the target value) between each discrete point on the optimized path and its nearest corresponding point (the fifth trajectory point or the sixth trajectory point) on the initial search path, and requiring that this sum be less than a seventh threshold, the optimization process is prevented from deviating too far from the initial search path due to excessive pursuit of smoothness or feasibility, thereby accidentally intruding into the area occupied by obstacles. This constraint establishes a balance mechanism between trajectory smoothness and obstacle avoidance safety.

[0103] Optionally, the first path in this embodiment refers to a high-precision, smooth trajectory segment that corresponds to the initial segment path and satisfies dynamic constraints, generated after optimization. This path is located within a known safe and operable area. Therefore, its optimization strategy focuses on maximizing the maximum speed and acceleration threshold while satisfying low collision avoidance deviation constraints, so as to achieve efficient and fast motion.

[0104] Optionally, the second path in this embodiment refers to a high-precision, smooth trajectory segment that corresponds to the terminal segment path and satisfies dynamic constraints, generated after optimization. This path traverses unknown or high-risk areas, so its optimization strategy focuses on strictly limiting the maximum speed and acceleration and strengthening anti-collision constraints to cope with potential environmental changes.

[0105] Optionally, in this embodiment, the first discrete point and the second discrete point refer to a sequence of sampling points with temporal or spatial intervals, which are respectively discretized into the optimized first path and the second path. These points are used to discretize and evaluate the collision avoidance constraints, and the degree of path deviation is quantified by calculating the distance of each discrete point to its nearest point on the initial search path.

[0106] Optionally, in this embodiment, the fifth and sixth trajectory points are the points on the starting and ending paths that are spatially closest to the first and second discrete points, respectively. They serve as reference benchmarks for calculating the offset of the optimized target path relative to the initial search path, ensuring that the optimized target does not deviate excessively from the initial search path when pursuing smoothness or feasibility. The fifth and sixth trajectory points include, but are not limited to, those determined using a nearest neighbor search algorithm.

[0107] This embodiment constructs a multi-dimensional constraint system encompassing feasibility constraints, smoothness constraints, and collision avoidance constraints, and sets differentiated thresholds for the initial and final path segments. The initial path segment employs relatively lenient constraints to ensure rapid response and high-speed passage, while the final path segment utilizes strict smoothness and collision avoidance constraints to ensure the stability and safety of the final attitude. This segmented constraint strategy significantly improves the overall performance of path planning in complex dynamic environments, ensuring both the operational efficiency and safety of the target terminal during operation.

[0108] In an exemplary embodiment, after adjusting the initial path to a target path determined based on the target trajectory point set, the method further includes: monitoring whether a second obstacle exists in the third path during the operation of the target terminal according to the target path, wherein the target path includes the third path, and the third path is the path operated by the target terminal after the fourth time; and adjusting the third path if it is determined at the fifth time that the second obstacle exists in the third path, wherein the fourth time is later than the fifth time.

[0109] Optionally, in this embodiment, the third path refers to the sub-path segment of the target path that extends from a specific time point (i.e., the fourth time point) to the destination.

[0110] Optionally, in this embodiment, the second obstacle refers to a dynamic obstacle or a sudden static obstacle detected by real-time sensors (such as LiDAR, visual cameras, millimeter-wave radar, etc.) during the operation of the target terminal, which was known before the target path was planned. The second obstacle is sudden, dynamic, or uncertain, and may appear at any location on the third path. It may be a variable first obstacle or a newly appearing obstacle. The second obstacle includes, but is not limited to, birds suddenly flying into the field of view, other moving vehicles / pedestrians, temporarily placed objects, or new obstructions caused by environmental changes. Its detection depends on real-time environmental perception and updates.

[0111] Optionally, in this embodiment, the target terminal will move along the portion defined by the third path in the target path starting from the fourth moment. This moment is a relative time reference point, and the fourth moment is a planned time point in the future.

[0112] Optionally, in this embodiment, the fifth moment is the time point for performing obstacle detection and path replanning decisions. At this moment, sensor data is used to determine whether a second obstacle exists on the third path, and an adjustment mechanism is triggered based on the determination result. The fourth moment is later than the fifth moment to ensure that risks can be detected in advance and corrections made to the target terminal can be made.

[0113] Optionally, adjusting the third path in this embodiment refers to the process of replanning, partially modifying, or dynamically avoiding the original third path when a second obstacle is detected. This process usually involves regenerating a new trajectory segment that avoids the second obstacle, while maintaining consistency with the original target path as much as possible (such as smoothness and dynamic feasibility), and updating the planning of subsequent paths.

[0114] Optionally, before adjusting the third path in this embodiment, multiple new target directions need to be determined based on the running direction of the target terminal obtained at the fifth moment and the preset correction direction. Then, the positions of multiple seventh trajectory points are adjusted according to each new target direction to obtain multiple sets of third trajectory points. The third path includes multiple seventh trajectory points, and the multiple eighth trajectory points included in each set of third trajectory points are trajectory points obtained by moving multiple seventh trajectory points according to the same new target direction. Finally, the set of third trajectory points with the smallest total movement among the multiple sets of third trajectory points is determined as the new set of target trajectory points, and the third path is adjusted to the fourth path determined based on the new set of target trajectory points. The total movement is the sum of the movement distances between each eighth trajectory point included in the set of third trajectory points and the corresponding seventh initial trajectory point.

[0115] This embodiment further clarifies that the target terminal has the ability to monitor obstacles and fine-tune the path in real time during operation, and can respond to emergencies in a timely manner. By replanning or adjusting future path segments in real time, it can ensure that the target terminal always has the ability to deal with sudden obstacles during long-distance operation.

[0116] The above method is described below through a specific embodiment. In an obstacle avoidance scenario where an underwater robot is inspecting a complex seabed reef area, the underwater robot is equipped with a four-sided fisheye vision sensor and an inertial navigation system. Figure 4 This is a flowchart illustrating a method for determining the running path of an underwater robot according to an embodiment of this application, as shown below. Figure 4 As shown, it includes the following steps:

[0117] Step S402: Obtain the historical trajectory of the underwater robot and the current speed of the underwater robot when it reaches the current position at the first moment. The underwater robot moves at a speed of 2m / s along the due north direction (i.e., the first direction mentioned above) at the first moment (e.g., T=10s).

[0118] Step S404: If obstacles are determined to exist in the initial path using historical trajectory and current speed, multiple target directions are determined based on a preset correction direction and a first direction. For example, the preset correction direction is a vector perpendicular to the first direction and pointing to the right. The preset correction direction vector J1 is represented as (1, 0, 0). The preset correction direction vector is used to indicate the preset correction direction. Then, a cross product operation is performed on J1 and the first vector to obtain J2. The direction indicated by J2 is determined as one of the target directions included in the multiple target directions. The first vector is used to indicate the first direction. A cross product operation is performed on J2 and the first vector to obtain J3. The direction indicated by J3 is determined as one of the target directions included in the multiple target directions. Finally, three target directions are obtained (i.e., the directions indicated by J1, J2, and J3).

[0119] Step S406: Determine multiple initial trajectory points P1, P2, P3...Pn on the initial path;

[0120] Step S408: Adjust the positions of multiple initial trajectory points according to each target direction to obtain multiple sets of first trajectory points. Each set of first trajectory points includes multiple first trajectory points obtained by moving multiple initial trajectory points along the same target direction. For the direction indicated by J1: move P1, P2, P3...Pn sequentially along the direction indicated by J1 until there are no obstacles within a 3-meter radius around each point, obtaining a set of first trajectory points A (P1A, P2A, P3A...PnA). Calculate the total movement of set A (the sum of the distances moved by all points) as S1. For the direction indicated by J2... For the direction indicated by J2: Move P1, P2, P3...Pn sequentially along the direction indicated by J2 until there are no obstacles within 3 meters around each point, thus obtaining the first trajectory point set B (P1B, P2B, P3B...PnB). Calculate the total movement of set B (the sum of the movement distances of all points) as S2. For the direction indicated by J3: Move P1, P2, P3...Pn sequentially along the direction indicated by J3 until there are no obstacles within 3 meters around each point, thus obtaining the first trajectory point set C (P1C, P2C, P3C...PnC). Calculate the total movement of set C (the sum of the movement distances of all points) as S3.

[0121] Step S410: Compare the total movement amounts S1, S2, and S3, and determine the first set of trajectory points with the smallest total movement amount as the target trajectory point set;

[0122] Step S412: Determine the target path based on the trajectory points included in the target trajectory point set, so that the underwater robot can avoid obstacles;

[0123] Step S414: Adjust the initial path to the target path, and instruct the underwater robot to run according to the adjusted initial path.

[0124] Through the above embodiments, when an underwater robot anticipates encountering obstacles, it can generate multiple target directions and select the optimal avoidance direction by evaluating the total movement under different target directions. The target path is determined by selecting the set of target trajectory points with the minimum total movement. This allows for the rapid generation of an obstacle avoidance route with minimal cost while ensuring safety. Therefore, it improves the underwater robot's response speed and obstacle avoidance success rate in complex underwater environments, thereby achieving the effect of timely determining a path that ensures the underwater robot can avoid obstacles.

[0125] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0126] 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 prior art, 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.

[0127] According to another aspect of the embodiments of this application, a path determination apparatus is also provided. This apparatus can be used to implement the path determination method provided in the above embodiments, and details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements 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.

[0128] Figure 5 This is a structural block diagram of a path determination device according to an embodiment of this application, such as... Figure 5 As shown, the device includes:

[0129] The determining module 52 is used to determine multiple target directions based on a preset correction direction and a first direction when it is determined that there is a first obstacle in the initial path at the first moment. The initial path is the path that the target terminal runs after the second moment, which is later than the first moment. The first direction is used to indicate the running direction of the target terminal at the first moment.

[0130] The first adjustment module 54 is used to adjust the positions of multiple initial trajectory points according to each of the above-mentioned target directions to obtain multiple sets of first trajectory points. The above-mentioned initial path includes the above-mentioned multiple initial trajectory points, and the multiple first trajectory points included in each of the above-mentioned sets of first trajectory points are trajectory points obtained after moving the above-mentioned multiple initial trajectory points according to the same target direction.

[0131] The second adjustment module 56 is used to determine the set of first trajectory points with the smallest total movement among the plurality of first trajectory point sets as the target trajectory point set, and to adjust the initial path to the target path determined based on the target trajectory point set, wherein the total movement is the sum of the movement distances between each of the first trajectory points included in the first trajectory point set and the corresponding initial trajectory point.

[0132] It should be noted that the determining module 52 in this embodiment can be used to perform the above step S202, the first adjustment module 54 in this embodiment can be used to perform the above step S204, and the second adjustment module 56 in this embodiment can be used to perform the above step S206.

[0133] The apparatus provided in this application first generates multiple potential obstacle avoidance directions based on the target terminal's current running direction (i.e., the aforementioned first direction) and a preset correction direction, thus overcoming the limitation of fixed obstacle avoidance directions in related technologies. Then, all trajectory points on the initial path are offset along each target direction, and the total distance moved by all points in each direction (i.e., the aforementioned total movement) is calculated to ensure that the corrected path not only geometrically avoids the first obstacle but also kinematically remains consistent with the initial path as much as possible. Finally, the target path is determined by selecting the set of target trajectory points with the smallest total movement, enabling the rapid generation of an obstacle avoidance route at minimal cost while ensuring safety. Therefore, it solves the problem in related technologies where the inability to rationally plan the terminal's running path leads to the inability to guarantee timely obstacle avoidance, significantly improving the terminal's response speed and obstacle avoidance success rate in dynamic and complex environments, thereby achieving the effect of timely determining a path that ensures the terminal avoids obstacles.

[0134] In an exemplary embodiment, the determining module 52 is further configured to determine a plurality of target directions based on a preset correction direction and a first direction in the following manner: performing a cross product operation on the preset correction direction vector and the first vector to obtain a second vector, wherein the preset correction direction vector is used to indicate the preset correction direction and the first vector is used to indicate the first direction; repeating the following operation until the number of times the cross product operation is performed meets a preset number to obtain a plurality of target directions: determining the direction indicated by the second vector as a target direction included in the plurality of target directions; performing a cross product operation on the second vector and the first vector to obtain a third vector; and determining the third vector as a new second vector.

[0135] In an exemplary embodiment, the first adjustment module 54 is further configured to adjust the positions of multiple initial trajectory points according to each of the target directions to obtain multiple sets of first trajectory points by: performing the following operations for each target direction to obtain the multiple sets of first trajectory points: sorting the multiple initial trajectory points according to the order in which they appear in the initial path to obtain an initial set of trajectory points; moving the multiple initial trajectory points sequentially according to the target direction based on the order of the multiple initial trajectory points until the first position reached by the initial trajectory points satisfies a preset condition, and determining the multiple first trajectory points based on the first position reached by the multiple initial trajectory points to obtain a first set of trajectory points included in the multiple sets of first trajectory points, wherein the preset condition is used to indicate that there is no first obstacle in a preset area including the first trajectory points.

[0136] In an exemplary embodiment, the first adjustment module 54 is further configured to move the plurality of initial trajectory points sequentially according to the target direction based on the order of the plurality of initial trajectory points, until the first position reached by the initial trajectory points satisfies a preset condition, and determine the plurality of first trajectory points based on the first position reached by the plurality of initial trajectory points: setting the initial movement amount to 0 and repeatedly performing the following target operation until the set of initial trajectory points is empty, thereby obtaining the plurality of first trajectory points: taking the trajectory point ranked first in the set of initial trajectory points as the current point to be processed, and deleting the current point to be processed from the set of initial trajectory points to update the set of initial trajectory points; moving the current point to be processed a distance indicated by the initial movement amount in the target direction to obtain a second trajectory point; moving the second trajectory point according to the target direction until the position reached by the second trajectory point satisfies the preset condition, and determining the position reached as the first position; taking the point corresponding to the first position as the first trajectory point corresponding to the current point to be processed; calculating the first movement amount of the current point to be processed moving to the first trajectory point, and updating the initial movement amount based on the first movement amount.

[0137] In an exemplary embodiment, the first adjustment module 54 is further configured to move the second trajectory point in the target direction in the following manner until the position to which the second trajectory point has moved satisfies the preset condition, and to determine the position to which it has moved as the first position: if the position of the second trajectory point satisfies the preset condition, the position of the second trajectory point is determined as the first position; if the position of the second trajectory point does not satisfy the preset condition, the second trajectory point continues to move in the second direction until the position to which the second trajectory point continues to move satisfies the preset condition, and the position to which it continues to move is determined as the first position.

[0138] In an exemplary embodiment, the second adjustment module 56 is further configured to, before adjusting the initial path to a target path determined based on the target trajectory point set, sort the plurality of first trajectory points included in the target trajectory point set according to the order in which the initial trajectory points corresponding to each of the first trajectory points appear in the initial path, to obtain a second trajectory point set; determine the shortest path between every two adjacent first trajectory points in the second trajectory point set, to obtain a plurality of shortest paths; determine an initial search path based on the plurality of shortest paths; and determine a first segmentation point on the initial search path based on the runnable region, wherein the first segmentation point is the first point on the initial search path that is not in the runnable region, and the runnable region... The region is the area where the first obstacle is no longer present after the second time point. Based on the first segmentation point, the initial search path is divided into a starting segment path and an ending segment path. The starting segment path is the path from the current position to the first segmentation point, and the ending segment path is the path from the first segmentation point to the target intent point. The current position is the position reached by the target terminal at the first time point, and the target intent point is the last trajectory point included in the second trajectory point set. Optimization operations are performed on the starting segment path and the ending segment path to obtain a first path and a second path. Both the first path and the second path satisfy preset constraints. The target path is determined based on the first path and the second path.The aforementioned preset constraints include: a feasibility constraint, wherein the feasibility constraint indicates that the maximum speed and maximum acceleration of the target terminal running on the first path are greater than a first threshold and a second threshold, respectively, and the maximum speed and maximum acceleration of the target terminal running on the second path are less than a third threshold and a fourth threshold, respectively, wherein the first threshold is greater than the third threshold and the second threshold is greater than the fourth threshold; and a smoothness constraint, wherein the smoothness constraint indicates that the values ​​calculated using a first function and a second function are less than a fifth threshold and a sixth threshold, respectively, wherein the first function represents the weighted sum of the time integrals of the jerk and the angular acceleration when the target terminal runs on the first path. The second function represents the weighted sum of the time integral of the jerk and the time integral of the angular acceleration when the target terminal runs on the second path; the anti-collision constraint is used to indicate that the target value is less than a seventh threshold, the target value represents the sum of the first value and the second value, the first value represents the sum of the distances between each first discrete point included in the first path and the fifth trajectory point included in the starting segment path, the fifth trajectory point being the point closest to the current first discrete point, the second value represents the sum of the distances between each second discrete point included in the second path and the sixth trajectory point included in the ending segment path, the sixth trajectory point being the point closest to the current second discrete point.

[0139] In an exemplary embodiment, the second adjustment module 56 is further configured to determine the shortest path between every two adjacent first trajectory points in the second trajectory point set: determining the shortest path between two adjacent first trajectory points in the second trajectory point set in the following manner: determining the current speed of the target terminal and the third moment when the target terminal reaches the third trajectory point; determining the shortest path from the third trajectory point to the fourth trajectory point based on the current speed and the third moment; wherein the current speed is the speed of the target terminal when it reaches the current position, and the third trajectory point and the fourth trajectory point are trajectory points included in the two adjacent first trajectory points.

[0140] In an exemplary embodiment, the second adjustment module 56 is further configured to, after adjusting the initial path to the target path determined based on the target trajectory point set, monitor whether there is a second obstacle in the third path during the operation of the target terminal according to the target path, wherein the target path includes the third path, and the third path is the path operated by the target terminal after the fourth time; if it is determined at the fifth time that there is a second obstacle in the third path, adjust the third path, wherein the fourth time is later than the fifth time.

[0141] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.

[0142] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein the program executes the steps in any of the above method embodiments when it is run.

[0143] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, ROMs, RAMs, portable hard drives, magnetic disks, or optical disks.

[0144] According to another aspect of the embodiments of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor is configured to perform the steps of any of the method embodiments described above via the computer program. In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0145] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.

[0146] According to another aspect of the embodiments of this application, a computer program product is also provided, which includes a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by a central processing unit, it performs various functions provided in the embodiments of this application. The sequence numbers of the embodiments of this application above are merely descriptive and do not represent the superiority or inferiority of the embodiments.

[0147] Figure 6 This is a computer system architecture block diagram of an electronic device according to an embodiment of this application. For example... Figure 6 As shown, the computer system includes a Central Processing Unit (CPU) 601, which can determine the data stored in ROM (corresponding to...). Figure 6 The program is stored in the read-only memory 602 or loaded from the storage section 608 into the RAM (corresponding to the read-only memory 602). Figure 6The system executes various appropriate actions and processes by storing programs in the random access memory (RAM) 603. The RAM 603 also stores various programs and data required for system operation. The central processing unit 601, the read-only memory 602, and the RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0148] The following components are connected to the I / O interface (corresponding to...) Figure 6 The input / output interface 605 includes an input section 606 such as a keyboard and mouse; an output section 607 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and speakers; a storage section 608 including a hard disk; and a communication section 609 including network interface cards such as LAN cards and modems. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the input / output interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 610 as needed so that computer programs read from it can be installed into the storage section 608 as needed.

[0149] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 609, and / or installed from removable medium 611. When the computer program is executed by central processing unit 601, it performs various functions defined in the system of this application.

[0150] It should be noted that, Figure 6 The computer system of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0151] 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.

[0152] 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. A method for determining a path, characterized in that, include: If a first obstacle is found in the initial path at the first moment, multiple target directions are determined based on a preset correction direction and a first direction. The initial path is the path that the target terminal runs after the second moment, which is later than the first moment. The first direction is used to indicate the running direction of the target terminal at the first moment. The positions of multiple initial trajectory points are adjusted according to each target direction to obtain multiple sets of first trajectory points. The initial path includes the multiple initial trajectory points, and the multiple first trajectory points included in each set of first trajectory points are trajectory points obtained by moving the multiple initial trajectory points in the same target direction. The set of first trajectory points with the smallest total movement among the plurality of first trajectory point sets is determined as the target trajectory point set, and the initial path is adjusted to the target path determined based on the target trajectory point set, wherein the total movement is the sum of the movement distances between each first trajectory point included in the first trajectory point set and the corresponding initial trajectory point.

2. The method according to claim 1, characterized in that, Multiple target directions are determined based on the preset correction direction and the first direction, including: A cross product operation is performed between a preset correction direction vector and a first vector to obtain a second vector, wherein the preset correction direction vector is used to indicate the preset correction direction, and the first vector is used to indicate the first direction; Repeat the following operation until the cross product operation is performed a preset number of times to obtain multiple target directions: determine the direction indicated by the second vector as the target direction included in the multiple target directions; perform a cross product operation on the second vector and the first vector to obtain a third vector; determine the third vector as a new second vector.

3. The method according to claim 1, characterized in that, The positions of multiple initial trajectory points are adjusted according to each of the stated target directions to obtain multiple sets of first trajectory points, including: For each target direction, the following operations are performed to obtain the plurality of first trajectory point sets: The initial trajectory points are sorted according to the order in which they appear in the initial path to obtain an initial trajectory point set. Based on the order of the initial trajectory points, the initial trajectory points are moved sequentially in the target direction until the first position reached by the initial trajectory points satisfies a preset condition. Based on the first position reached by the initial trajectory points, the multiple first trajectory points are determined to obtain a first trajectory point set included in the multiple first trajectory point set. The preset condition indicates that there is no first obstacle in a preset area including the first trajectory point.

4. The method according to claim 3, characterized in that, Based on the order of the plurality of initial trajectory points, the plurality of initial trajectory points are moved sequentially according to the target direction until the first position reached by the initial trajectory points satisfies a preset condition, and the plurality of first trajectory points are determined based on the first position reached by the plurality of initial trajectory points, including: Set the initial movement to 0 and repeat the following target operation until the initial trajectory point set is empty, thus obtaining the plurality of first trajectory points: The trajectory point at the top of the initial trajectory point set is taken as the current point to be processed, and the current point to be processed is deleted from the initial trajectory point set to update the initial trajectory point set. The current point to be processed is moved a distance indicated by the initial movement in the target direction to obtain a second trajectory point; The second trajectory point is moved in the target direction until the position reached by the second trajectory point satisfies the preset condition, and the position reached is determined as the first position. The point corresponding to the first position is taken as the first trajectory point corresponding to the current point to be processed; Calculate the first movement amount of the current point to be processed to the first trajectory point, and update the initial movement amount based on the first movement amount.

5. The method according to claim 4, characterized in that, The second trajectory point is moved in the target direction until the position reached by the second trajectory point satisfies the preset condition, and the position reached is determined as the first position, including: If the location of the second trajectory point meets the preset condition, the location of the second trajectory point is determined as the first location; If the location of the second trajectory point does not meet the preset conditions, the second trajectory point continues to move in the target direction until the location to which the second trajectory point continues to move meets the preset conditions, and the location to which it continues to move is determined as the first location.

6. The method according to claim 1, characterized in that, Before adjusting the initial path to the target path determined based on the target trajectory point set, the method further includes: The plurality of first trajectory points included in the target trajectory point set are sorted according to the order in which the initial trajectory points corresponding to each first trajectory point appear in the initial path, so as to obtain the second trajectory point set. Determine the shortest path between every two adjacent first trajectory points in the second trajectory point set to obtain multiple shortest paths; The initial search path is determined based on the multiple shortest paths; Based on the runnable region, a first segmentation point is determined on the initial search path, wherein the first segmentation point is the first point on the initial search path that is not in the runnable region, and the runnable region is the region where the first obstacle does not exist after the second time point; Based on the first segmentation point, the initial search path is divided into a starting segment path and an ending segment path. The starting segment path is the path from the current position to the first segmentation point, and the ending segment path is the path from the first segmentation point to the target intent point. The current position is the position where the target terminal is running at the first moment, and the target intent point is the last trajectory point included in the second trajectory point set. An optimization operation is performed on the starting segment path and the ending segment path to obtain a first path and a second path, wherein both the first path and the second path satisfy preset constraints. The target path is determined based on the first path and the second path.

7. The method according to claim 6, characterized in that, Determining the shortest path between every two adjacent first trajectory points in the second set of trajectory points includes: The shortest path between two adjacent first trajectory points in the second trajectory point set is determined sequentially as follows: The current speed of the target terminal and the third moment when the target terminal reaches the third trajectory point are determined; based on the current speed and the third moment, the shortest path from the third trajectory point to the fourth trajectory point is determined; wherein, the current speed is the speed of the target terminal when it reaches the current position, and the third trajectory point and the fourth trajectory point are trajectory points included in two adjacent first trajectory points.

8. The method according to claim 6, characterized in that, The preset constraints include: Feasibility constraints, wherein the feasibility constraints are used to indicate that the maximum speed and maximum acceleration of the target terminal when running on the first path are greater than a first threshold and a second threshold, respectively, and the maximum speed and maximum acceleration of the target terminal when running on the second path are less than a third threshold and a fourth threshold, respectively, wherein the first threshold is greater than the third threshold and the second threshold is greater than the fourth threshold; Smoothness constraint, wherein the smoothness constraint is used to indicate that the values ​​calculated by the first function and the second function are less than the fifth threshold and the sixth threshold, respectively; the first function is used to represent the weighted sum of the time integral of the jerk and the time integral of the angular acceleration when the target terminal runs on the first path; and the second function is used to represent the weighted sum of the time integral of the jerk and the time integral of the angular acceleration when the target terminal runs on the second path. The collision avoidance constraint is used to indicate that the target value is less than a seventh threshold. The target value is used to indicate the sum of a first value and a second value. The first value is used to indicate the sum of the distances between each first discrete point included in the first path and the fifth trajectory point included in the starting segment path, where the fifth trajectory point is the point closest to the current first discrete point. The second value is used to indicate the sum of the distances between each second discrete point included in the second path and the sixth trajectory point included in the ending segment path, where the sixth trajectory point is the point closest to the current second discrete point.

9. The method according to claim 1, characterized in that, After adjusting the initial path to a target path determined based on the target trajectory point set, the method further includes: During the process of the target terminal running along the target path, it is monitored whether there is a second obstacle in the third path, wherein the target path includes the third path, and the third path is the path that the target terminal runs after the fourth time. If it is determined at the fifth moment that the second obstacle exists in the third path, the third path is adjusted, wherein the fourth moment is later than the fifth moment.

10. A path determination device, characterized in that, include: The determination module is used to determine multiple target directions based on a preset correction direction and a first direction when it is determined that there is a first obstacle in the initial path at the first moment. The initial path is the path that the target terminal runs after the second moment, which is later than the first moment. The first direction is used to indicate the running direction of the target terminal at the first moment. The first adjustment module is used to adjust the positions of multiple initial trajectory points according to each target direction to obtain multiple sets of first trajectory points. The initial path includes the multiple initial trajectory points, and the multiple first trajectory points included in each set of first trajectory points are trajectory points obtained by moving the multiple initial trajectory points according to the same target direction. The second adjustment module is used to determine the set of first trajectory points with the smallest total movement among the plurality of first trajectory point sets as the target trajectory point set, and adjust the initial path to the target path determined based on the target trajectory point set, wherein the total movement is the sum of the movement distances between each first trajectory point included in the first trajectory point set and the corresponding initial trajectory point.

11. A computer program product, comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method according to any one of claims 1 to 9.

13. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Obstacle avoidance method, device, equipment and medium based on imitation learning

    CN119781503A

  • Dynamic edge path generation method, computer device, and storage medium

    US20250138553A1