Method for a robot to continuously maintain an optimal path under multiple obstacles
By using real-time obstacle threat level classification and multi-evaluation function optimization, the robot achieves coordination between global path planning and local trajectory in multi-obstacle environments, solving the problems of path planning failure and low target tracking efficiency in traditional methods, and improving the robot's task adaptability and execution efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN BAILINCHUAN TECHNOLOGY CO LTD
- Filing Date
- 2026-03-10
- Publication Date
- 2026-06-05
AI Technical Summary
Traditional mobile robots struggle to adjust their paths safely and in real time in environments with multiple obstacles, especially when dynamic obstacles appear. They are unable to effectively avoid obstacles and track moving targets, resulting in low execution efficiency and path planning failures.
Information is acquired in real time by environmental perception sensors, obstacle threat levels are dynamically classified, and a controller that generates trajectories by weighted summation of multiple evaluation functions is used in combination with global path planning and local trajectory optimization. The trajectory is then predicted and replanned based on the motion state of the target object.
It enables robots to avoid obstacles in real time and safely in multi-obstacle environments, adapt to different types of tasks, ensure the overall near-optimal and local safe and feasible path, and improve task adaptability and execution efficiency.
Smart Images

Figure CN122151858A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent navigation technology for ball-retrieving robots, specifically a method for a robot to continuously maintain the optimal path under multiple obstacles. Background Technology
[0002] Traditional mobile robots (such as tennis ball-retrieving robots and floor cleaning robots) typically rely on pre-defined static path planning algorithms, such as the A* algorithm, when performing fixed-point tasks. However, in complex real-world scenarios filled with multiple static and dynamic obstacles (such as scattered objects and other mobile devices), these methods face significant limitations. First, static planning cannot effectively handle the sudden appearance or movement of obstacles, easily leading to planning failures or collisions. Second, for tasks requiring tracking moving targets (such as picking up rolling balls), traditional methods lack prediction of the target's motion state and dynamic replanning mechanisms, often resulting in the target having shifted by the time the robot arrives, leading to low execution efficiency. Furthermore, for tasks such as cleaning that follow pre-defined paths, traditional methods struggle to adjust the path safely and in real-time when dynamic obstacles appear. Moreover, while existing local obstacle avoidance algorithms can react in real-time, they often become disconnected from the global path target and are prone to oscillations or getting trapped in local optima among dense obstacles, making it difficult to maintain optimal global efficiency throughout the entire operation. Therefore, how to enable robots to avoid various threats safely and in real time in dynamic environments with multiple obstacles, adapt to different types of tasks (such as dynamic tracking and static execution), and ensure that the overall path from the starting point to the end point is nearly optimal has become a key challenge to improve the practicality, adaptability and intelligence of such robots. Summary of the Invention
[0003] The purpose of this application is to provide a method for a robot to continuously maintain the optimal path under multiple obstacles, so as to solve the technical problems mentioned in the background art.
[0004] To achieve the above objectives, this application discloses the following technical solution: a method for a robot to continuously maintain the optimal path under multiple obstacles, the method comprising the following steps: S1: Acquire environmental information in real time through at least one environmental perception sensor, identify and classify obstacles and target objects, calculate the threat level of each obstacle, and dynamically classify and mark obstacles as high-risk obstacles according to the threat level; S2: Taking the current position of the target object as the planning endpoint, and based on the information of the high-risk obstacle, a path search algorithm is used to plan a global reference path from the robot's current position to the planning endpoint; and in the robot's velocity space, guided by the global reference path, a local execution trajectory is generated by a controller based on the weighted summation of multiple evaluation functions, and the weight of at least one evaluation function is dynamically adjusted according to the threat level of the high-risk obstacle; S3: If the target object is a non-moving object, then execute S4; if the target object is a moving object, then predict its future position based on its motion state; if the deviation between the future position and the current position of the target object exceeds a preset threshold, then update the future position to a new planning endpoint and re-execute S2. S4: Control the robot to move according to the local execution trajectory, and after successfully executing the current task, return to S1 to process the next task to be executed.
[0005] In one embodiment, the threat level is calculated based on at least one parameter among the following: the distance between the obstacle and the robot, the approach speed of the obstacle relative to the robot, and the type of obstacle. The dynamic classification includes defining an obstacle as a high-risk obstacle when the threat level of an obstacle is greater than a preset high-risk threshold.
[0006] In one embodiment, the threat level is calculated using the following formula: in, To calculate the threat level, The real-time distance between the obstacle and the robot. Let be the approach velocity of the obstacle relative to the robot. The base threat level is set based on the type of obstacle. , and These are the preset normalized weights.
[0007] In one embodiment, the environmental perception sensor includes at least one of lidar, camera, millimeter-wave radar or ultrasonic sensor, and performs spatiotemporal correlation fusion processing on multi-source perception data to complete the identification and classification of obstacles and target objects.
[0008] In one embodiment, the fusion process is implemented using a deep learning detection model, and the classification results include at least static obstacles, dynamic obstacles, and target objects.
[0009] In one embodiment, the evaluation function that dynamically adjusts the weights based on the threat level of the high-risk obstacle is an obstacle avoidance evaluation function, and the corresponding dynamic adjustment formula for the obstacle avoidance evaluation weights is: in, The obstacle avoidance evaluation weights are dynamically adjusted. For baseline weights, It represents the highest threat level among all current high-risk obstacles. This represents the threat level impact coefficient.
[0010] In one embodiment, the process of generating a local execution trajectory based on the controller using a weighted summation of multiple evaluation functions includes: Based on the robot's current linear velocity, angular velocity, and acceleration limitations, within the time window Generate a set of candidate trajectories ; For each candidate trajectory Through a set of evaluation functions Calculate the obstacle avoidance costs for both the obstacle and the obstacle. The cost of fitting with the global reference path and the alignment cost toward the planned endpoint. ; Based on the dynamically adjusted obstacle avoidance evaluation weights Preset path fitting weight Alignment weights with preset targets We obtain the total cost by weighted summation of all costs: The candidate trajectory with the lowest total cost is selected as the local execution trajectory.
[0011] In one embodiment, the candidate trajectory The generation process includes: Sampling is performed in the velocity space, and each set of sampled velocities is processed within a time window. A forward kinematics simulation is performed to obtain a candidate trajectory, in which the robot's kinematic model is suitable for its driving mode.
[0012] In one embodiment, the process of predicting the future location of the target object includes: According to the current time Detected ball position and speed The prediction is performed using a uniformly decelerated motion model, wherein the expression for the uniformly decelerated motion model is: , The coefficient of friction of the field. This is the acceleration due to gravity.
[0013] In one embodiment, the path search algorithm is an improved A* algorithm, and its cost function is: Furthermore, in this cost function, the time from the starting point to the node will be... The actual cost Revised to ,in, The path from the starting point to the node The sum of the threat levels of all obstacles in the grid that the device passes through. This represents the threat cost coefficient.
[0014] Beneficial Effects: The method for robots to continuously maintain the optimal path under multiple obstacles, as presented in this application, enables the robot to focus on key threats through comprehensive threat calculation and dynamic classification, improving the pertinence and safety of real-time decision-making. Real-time optimization of local trajectories under global path guidance and dynamic weight adjustment ensure that the robot's movement conforms to the macroscopic optimal direction while flexibly and promptly avoiding dynamic obstacles, solving the problem of coordinating global objectives and local obstacle avoidance. Through position prediction of moving targets and condition-triggered replanning mechanisms, as well as direct path following mechanisms for static tasks, the robot can adapt to the needs of different types of tasks, achieving accurate tracking of dynamic targets and efficient execution of static tasks. Overall, this application forms a closed-loop collaboration in the perception, planning, and execution stages, improving the robot's task adaptability, operational continuity, success rate, and overall efficiency in complex dynamic scenarios. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart illustrating a method for a robot to continuously maintain the optimal path amidst multiple obstacles, as provided in an embodiment of this application. Detailed Implementation
[0017] To facilitate understanding of the technical solutions provided in the embodiments of this application, the background technology involved in the embodiments of this application will be described below.
[0018] Currently, mobile robots such as automatic ball-picking robots and cleaning robots used in scenarios such as tennis training courts and indoor cleaning areas have systemic deficiencies in their core navigation and control solutions when facing real and complex dynamic environments. These deficiencies are mainly manifested in three interrelated technical fragmentation issues.
[0019] First, there is a disconnect between environmental perception and path planning. Existing solutions mostly rely on pre-set static maps or simple real-time obstacle avoidance, lacking dynamic risk assessment and classification of different obstacles in the environment. The robot treats moving people, rolling balls, and static obstacles as homogeneous threats, making it unable to distinguish truly high-risk targets among dense obstacles. This leads to overly conservative or blindly risky path decisions, resulting in inefficient real-time obstacle avoidance and unstable safety.
[0020] Secondly, there is a disconnect between global path planning and local trajectory generation. Robots typically employ a hierarchical planning architecture, where a global path is first calculated using a heuristic search algorithm, followed by real-time obstacle avoidance using a local planner. However, the planning objectives at these two levels are often separate: the global path focuses only on geometric shortest distances, while local planning only considers instantaneous obstacle avoidance. This often leads to the robot deviating significantly from the global direction during local obstacle avoidance, or even falling into local oscillations, failing to generate a smooth trajectory that is both globally near-optimal and locally safe and feasible, resulting in low overall motion efficiency.
[0021] Finally, there is a feedback loop between task execution and target adaptation. For continuously moving targets, traditional methods typically treat them as fixed endpoints. After the robot plans its path and begins to move, even if the target has shifted, it often only executes the original plan, only re-perceiving and planning after reaching the wrong location, forming a passive "catch-lag" cycle. This open-loop task execution method lacks the ability to predict the target's motion state and proactively correct the path, resulting in low success rates for dynamic tasks and uncontrollable task completion times. For static or path-execution tasks, traditional methods struggle to maintain overall path optimization and real-time safety when obstacles dynamically change.
[0022] In summary, the essence of the problem with existing technologies lies in the isolation of core components such as perception, planning, and execution, lacking a closed-loop collaborative and task-adaptive mechanism based on unified risk assessment. The embodiments of this application aim to provide an integrated solution to overcome this fragmentation, simultaneously supporting dynamic target tracking and static task execution, enabling robots to operate autonomously, efficiently, and reliably in dynamic and complex environments.
[0023] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application. Secondly, in this document, the term "comprising" is intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements, but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.
[0024] The following example uses a ball-retrieving robot, whose target object is a moving sphere, which is not limited to tennis balls, pickles, etc. Specifically, the method of the robot in this embodiment to continuously maintain the optimal path under multiple obstacles is as follows: Figure 1 As shown, the method includes the following steps in sequence: Step S1: Acquire environmental information in real time through at least one environmental perception sensor, identify and classify obstacles and target objects, calculate the threat level of each obstacle, and dynamically classify and mark obstacles as high-risk obstacles according to the threat level.
[0025] In practical implementation, this method is executed by the robot's main control unit (such as an industrial computer, MCU, etc.). This main control unit typically includes a processor, memory, and necessary input / output interfaces to run all the algorithms and logic of this method. Multiple sensors can usually be mounted on the robot body to scan the surrounding environment in 360 degrees or from a specific perspective. In practical applications, sensors can be one or more combinations of LiDAR, cameras, millimeter-wave radar, and ultrasonic sensors. Those skilled in the art can choose according to cost, accuracy, and environmental requirements (such as lighting conditions), and this application embodiment does not limit this. The main control unit reads the raw data from these sensors in real time through a communication interface (such as CAN bus, Ethernet) to form environmental information. Identification and classification refer to the main control unit processing the environmental information through built-in algorithms, distinguishing different objects and assigning them category labels, such as "static obstacle," "dynamic obstacle," and "target ball." Calculating the threat level of each obstacle means that the main control unit calculates a value representing the current degree of danger posed to the robot by each identified obstacle according to a set of preset rules or models. Dynamic grading and labeling refers to comparing the calculated threat level with one or more preset thresholds to classify obstacles in real time, such as "high risk" or "low risk". High-risk obstacles are those whose threat level exceeds the high-risk threshold and are the objects that need to be avoided in subsequent path planning.
[0026] Step S2: Using the current position of the target object as the planning endpoint, and based on the information of the high-risk obstacle, a path search algorithm is used to plan a global reference path from the robot's current position to the planning endpoint; and in the robot's velocity space, guided by the global reference path, a local execution trajectory is generated by a controller based on the weighted summation of multiple evaluation functions, and the weight of at least one evaluation function is dynamically adjusted according to the threat level of the high-risk obstacle.
[0027] In specific implementation, the current position of the target ball is the three-dimensional or two-dimensional coordinates identified and calculated by sensors in step S1. The planning endpoint is the target point of the path search algorithm. The robot's current position is usually obtained by combining the robot's odometry, inertial measurement unit (IMU) with sensor information through simultaneous localization and mapping (SMR) technology. A path search algorithm is an algorithm used to find a path from the starting point to the endpoint in a graph or grid, such as Dijkstra's algorithm, A algorithm, D algorithm, etc., which are not limited in this application embodiment. The global reference path is a sequence of path points output by the path search algorithm, providing the robot with a macroscopic direction of movement. The robot's velocity space is a set of reachable velocities composed of the robot's linear velocity components and angular velocities. Using the global reference path as a guide means using the global reference path as an important reference in the local trajectory planning process. A controller based on the weighted summation of multiple evaluation functions is a local motion controller, such as the dynamic window method or its improved controller. The controller works by sampling and generating multiple short-term (e.g., 1-3 seconds) possible motion trajectories in the velocity space (i.e., candidate trajectories). Each trajectory is then scored (cost-value calculated) using multiple different evaluation functions. Each evaluation function focuses on one aspect of the trajectory (e.g., obstacle avoidance, conforming to the global path, or heading towards the target), and each function has a corresponding weight to adjust the importance of that aspect in the final decision. The scores of all evaluation functions are multiplied by their weights and summed to obtain a total score. The controller selects the trajectory with the optimal total score (e.g., minimum total cost) as the local execution trajectory for the current cycle. Dynamically adjusting the weights of at least one evaluation function based on the threat level of high-risk obstacles means monitoring the threat level of high-risk obstacles in real time and dynamically modifying the weights of one or more evaluation functions (usually obstacle avoidance-related functions) according to a set of rules (e.g., linear mapping).
[0028] Step S3: If the target object is a non-moving object (such as when the target object of the cleaning robot is a stationary "garbage" object), then execute S4; if the target object is a moving object (such as when the target object in the main example of this embodiment is a "sphere"), then predict its future position based on its motion state. If the deviation between the future position and the current position of the target object exceeds a preset threshold, then update the future position to a new planning endpoint and re-execute S2.
[0029] In practice, the motion state of the target ball includes at least its current position and instantaneous velocity. This information can be obtained from the perception results of step S1 combined with the time difference method. Predicting its future position means using a kinematic model to estimate its possible position at a future moment (e.g., 0.5 seconds later) based on its current motion state. The preset threshold is a configurable distance value used to determine whether the movement of the target ball is significant. If the distance difference between the predicted position and the current target position is greater than this threshold, it is considered that the target has undergone significant displacement. At this time, the predicted position is set as the new planning endpoint, and a complete replanning process starting from step S2 is immediately triggered.
[0030] Step S4: Control the robot to move according to the local execution trajectory, and after successfully executing the current task, return to S1 to process the next task to be executed.
[0031] In practice, controlling robot movement based on a local execution trajectory means calculating the trajectory into speed and steering commands for the robot's chassis drive motors (such as hub motors), and executing these commands through the motor controller to make the robot move along the trajectory. Successful grasping can be determined by tactile sensors, vision sensors, or pressure sensors at the end of the robot arm. Once successful grasping is confirmed, the control flow jumps back to step S1 to begin sensing and planning for the next target ball to be picked up in the environment, thereby achieving continuous automated execution of the task.
[0032] Based on the above, this method quantifies and focuses environmental threats in step S1, solving the problem of coarse perception and decision-making and providing precise input for subsequent planning. In step S2, the macroscopic guidance of the global path and real-time obstacle avoidance of the local trajectory are deeply coordinated through a dynamic weight adjustment mechanism, solving the problem of the disconnect between global and local planning objectives and ensuring the overall approximate optimality and local safety and feasibility of the path. In step S3, the closed loop of prediction based on target dynamics and condition-triggered replanning solves the problem of the robot passively chasing the target and achieves active and accurate tracking of dynamic targets. Finally, step S4 completes execution and task iteration, making the entire method a tightly coupled automated closed loop of perception, planning, tracking, and execution, improving the consistency, safety, and overall efficiency of the robot in dynamic and complex environments.
[0033] To accurately distinguish the risk levels of different obstacles and avoid subjective or experiential judgments, as an optional implementation method in this embodiment, the threat level is calculated based on at least one parameter among the following: the distance between the obstacle and the robot, the approach speed of the obstacle relative to the robot, and the type of obstacle. Dynamic grading includes defining an obstacle as a high-risk obstacle when the threat level of an obstacle is greater than a preset high-risk threshold.
[0034] Specifically, the formula for calculating threat level is: in, To calculate the threat level, The real-time distance between the obstacle and the robot. Let be the approach velocity of the obstacle relative to the robot. The base threat level is set based on the type of obstacle. , and These are the preset normalized weights.
[0035] In practice, to ensure that all terms in the formula are summable, the main control unit needs to normalize the original physical quantities before actual calculation. Parameters The unit is meters (m), and its value is obtained directly from sensor ranging data. The calculation is performed relative to a preset maximum sensing distance. The normalized value. The unit is meters per second (m / s), and its value can be calculated by the difference between the obstacle positions in two consecutive frames of perception data and the robot's own velocity. In the calculation, it is taken relative to a preset maximum relative velocity. The normalized value, i.e. . It is a dimensionless coefficient used to characterize the inherent hazard of different categories of obstacles; for example, it can be used to define the hazard of dynamically moving people or machines. Higher (e.g., 1.0), stationary cones or fences. Medium (e.g., 0.5), while the tennis ball rolls slowly. Lower (e.g., 0.1). , , These are weighting coefficients used to adjust the weighting of the inverse distance term, relative speed term, and category coefficient term in the total threat level. The contribution ratio can be calibrated experimentally before actual deployment and meets the following requirements. To achieve normalization, so that The value range is relatively stable. High-risk threshold. It is a constant set according to the safety requirements of the actual scenario. When the calculated value for a certain obstacle... Value greater than At that time, the main control unit marks the obstacle's status as "high risk" in the memory data structure.
[0036] Based on the above, the threat level calculation formula integrates three key risk factors: distance, relative speed, and object type. The closer the distance (…), the higher the threat level. The larger the size, the faster the opposing speed. The larger the object, the more dangerous it is. The larger the value, the greater the threat level. The higher the risk, the better. This quantitative assessment method enables robots to accurately and consistently distinguish between high-risk and low-risk obstacles, focusing limited computing power on addressing real threats, thereby improving the accuracy and efficiency of security decisions across the entire control unit.
[0037] To achieve stable and reliable obstacle and target ball recognition, especially under complex lighting and occlusion conditions, as an optional implementation method in this embodiment, the environmental perception sensor includes at least one of lidar, camera, millimeter-wave radar or ultrasonic sensor, and performs spatiotemporal correlation fusion processing on multi-source perception data to complete the recognition and classification of obstacles and target objects.
[0038] In specific implementation, fusion processing refers to associating and complementing two types of data. In an example using LiDAR and a camera as environmental perception sensors, the specific implementation is as follows: First, a deep learning model (such as a network based on the YOLOv5 architecture) is used to detect objects in the camera image, obtaining the object category and two-dimensional bounding box. Simultaneously, a point cloud clustering algorithm (such as Euclidean clustering) is used to segment the LiDAR point cloud, obtaining point cloud clusters. Then, the two-dimensional detection boxes of the image are projected onto the three-dimensional point cloud through coordinate transformation, or the three-dimensional point cloud is projected onto the image, assigning each point cloud cluster a category label obtained from image detection. Areas not covered by image detection but containing point cloud clusters can be separately classified as "unknown obstacles." In practical applications, other mature perception fusion frameworks can also be used for the fusion algorithm; this application does not limit this approach.
[0039] Based on the above, by fusing data from multiple sensors, it is possible to accurately distinguish target objects from numerous obstacles and achieve fine classification of obstacles, providing high-quality input for subsequent threat level calculation and improving the robustness and accuracy of perception.
[0040] To achieve efficient and accurate object recognition and classification, as a further optional implementation method in this embodiment, the fusion processing is implemented using a deep learning detection model, and the classification result includes at least static obstacles, dynamic obstacles, and target objects. Feasibly, the fusion processing can be implemented using a deep learning model based on the YOLOv5 architecture.
[0041] In specific implementations, the deep learning model based on the YOLOv5 architecture refers to using specific network variants such as YOLOv5s, YOLOv5m, or YOLOv5l. Before deployment, this model requires training with a large amount of labeled image data containing various obstacles and target balls, learning the mapping relationship from image pixels to object categories and positions. The trained model is integrated into the robot's computing unit, performing real-time inference on each frame of image captured by the camera, directly outputting the category (e.g., "person", "cone", "tennis_ball") and position information of each detected object in the image. Static obstacles correspond to categories such as "cone" and "fence"; dynamic obstacles correspond to categories such as "person" and "robot"; and the target ball corresponds to the "tennis_ball" category. In practical applications, other object detection models, such as Faster R-CNN and SSD, can also be used; this application does not limit this approach.
[0042] Based on the above, the YOLOv5-based deep learning model is used for target recognition in images. It has the characteristics of high speed and high accuracy, which can meet the needs of real-time perception of robots. It directly provides visual category information of obstacles and target balls. After being fused with the geometric information of LiDAR, it constitutes a complete perception result, providing reliable obstacle category information for subsequent steps.
[0043] To specifically implement the adaptive obstacle avoidance mechanism where the weights of the evaluation function are dynamically adjusted based on the threat level, as an optional implementation method in this embodiment, the evaluation function whose weights are dynamically adjusted based on the threat level of high-risk obstacles is the obstacle avoidance evaluation function, and the corresponding dynamic adjustment formula for the obstacle avoidance evaluation weights is as follows: in, The obstacle avoidance evaluation weights are dynamically adjusted. For baseline weights, It represents the highest threat level among all current high-risk obstacles. This represents the threat level impact coefficient.
[0044] In the specific implementation, , and All are dimensionless weight values. It is the basic weight of the obstacle avoidance evaluation function when there is no high-risk threat, ensuring basic obstacle avoidance capability. It selects the threat level from all obstacles currently marked as "high risk". The maximum value. It is a coefficient greater than 0, which determines the strength of the threat level's influence on the weight. When high-risk obstacles appear in the environment ( When ), the weights of the obstacle avoidance evaluation function The value will increase linearly, which means that when the level of danger is high, the local trajectory planner will increase the importance of obstacle avoidance as an evaluation criterion, thereby generating trajectories that are more inclined to stay away from high-risk obstacles. and The specific values need to be adjusted through simulation and real vehicle testing to balance the robot's safety and maneuverability, and can be obtained by those skilled in the art using existing technology. This embodiment does not limit this.
[0045] Based on the above, this dynamic adjustment formula establishes a direct feedback loop: the higher the perceived environmental threat ( The larger the value, the higher the priority of obstacle avoidance during planning. (The larger the value). This allows the robot's behavior to adaptively adjust according to the level of danger in the environment, prioritizing efficiency and path conformity when it is safe, and ensuring safety when it is dangerous, thus achieving a dynamic and intelligent balance between safety and efficiency.
[0046] To clarify the internal workflow of the controller, as a further optional implementation of this embodiment, the process of generating a local execution trajectory based on the controller's weighted summation of multiple evaluation functions includes: Based on the robot's current linear velocity, angular velocity, and acceleration limitations, within the time window Generate a set of candidate trajectories (For example, the robot has a current linear velocity component) , and angular velocity And acceleration limits); For each candidate trajectory Through a set of evaluation functions Calculate the obstacle avoidance costs for both the obstacle and the obstacle. Cost of conforming to the global reference path And the alignment costs toward the planned endpoint. ; Based on dynamically adjusted obstacle avoidance evaluation weights Preset path fitting weight Alignment weights with preset targets We obtain the total cost by weighted summation of all costs: The candidate trajectory with the minimum total cost is selected as the local execution trajectory.
[0047] In the specific implementation, firstly in the velocity space Inside, at the robot's current speed Centered on the maximum acceleration / deceleration limit, multiple sets of simulated velocities are obtained by uniformly or randomly sampling within that limit. For each set of velocities, assume the robot in the future... If the robot moves at a constant speed (e.g., within 1 second), a simulated future trajectory, i.e., a candidate trajectory, can be obtained by performing forward simulation using a robot kinematics model. Then, for each trajectory Three evaluations will be conducted: ① : Calculate the sum or minimum of the reciprocals of the distances between all points on the trajectory and the nearest obstacle (especially high-risk obstacles); the closer the distance, the higher the cost; ② : Calculate the lateral distance between the endpoint of the trajectory or each point along the entire path and the global reference path; the greater the deviation, the higher the cost; ③ The cost is calculated by determining the angle between the trajectory endpoint and the line connecting the robot and the target sphere; a larger angle results in a higher cost. These three costs are calculated using the obstacle avoidance evaluation function, path fitting evaluation function, and target alignment evaluation function, respectively. Finally, the dynamically calculated costs are used... and pre-configured fixed weights and The weighted sum is calculated according to the formula. The main control unit traverses all candidate trajectories. ,choose The trajectory with the smallest value is used as the local execution trajectory output in the current control cycle and sent to the underlying controller for execution.
[0048] Based on the above, this process clearly demonstrates how the controller comprehensively considers three core objectives: obstacle avoidance, path following, and target pointing. Through dynamic... This allows for enhanced obstacle avoidance considerations when threats escalate; through fixed... and It consistently follows the global path and the ultimate goal. This weighted summation decision-making mechanism generates a real-time trajectory that is optimal under multiple constraints, ensuring the coordination and purposefulness of the robot's movements.
[0049] To clarify the method for generating candidate trajectories and ensure that the trajectories conform to robot dynamics constraints, as a further optional implementation method in this embodiment, candidate trajectories... The generation process includes: Sampling is performed in the velocity space, and each set of sampled velocities is processed within a time window. A forward kinematics simulation is performed to obtain a candidate trajectory, in which the robot's kinematic model is suitable for its driving mode.
[0050] For example, in velocity space In the process, uniform sampling is performed with the current speed as the origin, and for each group of sampled speeds... In the time window A forward kinematics simulation was performed to obtain a candidate trajectory. .
[0051] In practice, the first step is to determine the achievable speed range of the robot within the current control cycle. For example, linear velocity. , The sampling range can be angular velocity The sampling ranges are similar, among which This is the maximum acceleration. Then, at fixed intervals (e.g., ...) in each velocity dimension... and Interval 0.1 m / s Uniform discrete sampling is performed at intervals of 0.1 rad / s to obtain hundreds to thousands of different sets of samples. Combinations. For each set of velocities, assume the robot in the future... Maintaining this velocity constant over time, forward simulation is performed by integrating its kinematic equations (for a differentially driven robot, its specific kinematic model) to calculate... The robot's predicted pose is obtained after each small time step (e.g., 0.1 seconds) within a given time period. Connecting these consecutive pose points forms a candidate trajectory. The trajectories generated by this method naturally satisfy the robot's instantaneous kinematic constraints.
[0052] Based on the above, by sampling and performing kinematic simulation within a dynamically constrained velocity space, it is ensured that each generated candidate trajectory is physically executable for the robot, avoiding the planning of unfollowable trajectories. This provides a feasible candidate set for subsequent evaluation and selection.
[0053] To achieve accurate prediction of a rolling tennis ball, as an optional implementation of this embodiment, the process of predicting the future position of the target object includes: According to the current time Detected ball position and speed The prediction is performed using a uniformly decelerated motion model, where the expression for the uniformly decelerated motion model is: , The coefficient of friction of the field. This is the acceleration due to gravity.
[0054] In the specific implementation, and It is a three-dimensional or two-dimensional vector, provided by the perception module. It is the predicted time step, which is consistent with or slightly longer than the cycle of the main control unit. It is the coefficient of friction between the tennis ball and the ground (such as hard court or grass), which is an empirical constant preset according to the type of court. It is the gravitational acceleration constant (approximately 9.8 m / s²). 2 ). It is a unit vector in the direction of velocity. This uniformly decelerated motion model assumes that the tennis ball is mainly subjected to a constant frictional force (of magnitude 1.5) in the opposite direction to the velocity during its rolling process. , For the mass, (canceled in the formula), it undergoes uniformly decelerated linear motion. This is a reasonable simplification of the tennis ball's rolling behavior on a flat surface. In practical applications, more complex models considering bounce and spin can also be used, but this application does not limit this approach.
[0055] Based on the above, this uniformly decelerated motion model utilizes basic physical principles and only requires the current position, velocity, and friction coefficient to effectively estimate the ball's position in a short time. It provides the robot with an advance estimate of the target's future position, so that the replanning decision in step S3 is no longer based on outdated position information, but on a predicted and more likely target point, thereby improving the robot's advance capability and accuracy in tracking moving targets.
[0056] To ensure that the global path not only avoids the geometric locations of obstacles but also circumvents high-risk areas, as an optional implementation method in this embodiment, the path search algorithm is an improved A* algorithm, with the following cost function: Furthermore, in this cost function, the time from the starting point to the node will be... The actual cost Revised to ,in, The path from the starting point to the node The sum of the threat levels of all obstacles in the grid that the device passes through. This represents the threat cost coefficient.
[0057] In the specific implementation, the environment map is first discretized into a grid. In the traditional A algorithm, This typically represents the geometric distance cost of moving from the starting point to node n. This is the estimated distance cost (such as Manhattan distance or Euclidean distance) from node n to the destination. The improvement in this implementation lies in the computation... At this time, not only the geometric distance of movement is accumulated, but also the threat cost of the grids traversed by the path is accumulated. Specifically, for each grid traversed by the path from the starting point to the current node n, if there is an obstacle within that grid, the threat level of that obstacle is queried. Threat levels corresponding to all grid cells Adding them together gives . It is a conversion factor used to map the threat level value to a cost dimension that can be added to the distance cost. Therefore, the new actual cost... This also reflects both the length and safety of the path. During the search, the algorithm automatically tends to choose paths that, while potentially longer, pass through low-threat areas, avoiding high-risk zones.
[0058] Based on the above, by integrating the threat level into the cost function of the A* algorithm, the global path planning result becomes risk-aware. The generated global reference path is not only the geometrically shortest path, but also a safe path that comprehensively balances length and safety. This provides a better and safer macro-level guidance for subsequent local planning, reducing the possibility of the robot entering high-risk areas at the global level, and achieving an effective connection between global path safety and real-time local obstacle avoidance.
[0059] To ensure that replanning can efficiently and accurately generate feasible paths for the latest objective, as an optional implementation of this embodiment, S2 is re-executed, including: Focusing on the new planning endpoint, a new global reference path is generated, and a new local execution trajectory is generated based on the new global reference path.
[0060] In practice, the new planning endpoint is the target ball's position coordinates, updated based on the prediction model and determined in step S3. Once a replanning is deemed necessary, these new coordinates are immediately used as the target point for the path search. Generating a new global reference path involves immediately invoking the aforementioned improved A* algorithm, using the robot's current real-time position as the starting point and the new planning endpoint as the target point. Based on the environmental map obtained and updated in step S1, which contains the latest threat information for all obstacles (especially high-risk obstacles), a global path search is re-executed. This process generates a new global reference path that directly leads from the current position to the new target point, taking into account both distance and threat level. Generating a new local execution trajectory based on the new global reference path means that after obtaining the new global reference path, the controller immediately uses this new path as guidance, combined with the environmental information perceived in real-time by the sensors (especially the real-time threat level of high-risk obstacles). Used for dynamic calculation Following the process described above for generating candidate trajectories and local execution trajectories, a new local execution trajectory that is optimal for the current cycle is resampled, evaluated, and selected in the velocity space.
[0061] Based on the above, this description clarifies that replanning is not a simple process jump, but a complete, goal-oriented planning cycle refresh. It ensures that once the target position is updated, the robot's global path guidance and local motion decisions can be adjusted immediately, keeping the planning output of the entire control unit consistent with the dynamically changing task objective. This constitutes a rapid response loop, effectively overcoming the path lag problem caused by target movement, achieving continuous and tight tracking of moving targets, and improving the success rate and timeliness of ball-picking operations.
[0062] In the embodiments provided in this application, it should be understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, code, or any suitable combination thereof. For hardware implementation, the processor may be implemented in one or more of the following: application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, other electronic units designed to implement the functions described herein, or combinations thereof. For software implementation, some or all of the processes of the embodiments may be performed by a computer program instructing the associated hardware. During implementation, the program may be stored in a computer-readable storage medium or transmitted as one or more instructions or code on a computer-readable storage medium. Computer-readable storage media include computer storage media and communication media, wherein communication media include any medium that facilitates the transmission of a computer program from one place to another. Storage media may be any available medium accessible to a computer. Computer-readable storage media may include, but are not limited to, RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code having the form of instructions or data structures and accessible to a computer.
[0063] Finally, it should be noted that the above description is only a preferred embodiment of this application and is not intended to limit this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for a robot to continuously maintain an optimal path amidst multiple obstacles, characterized in that, The method includes the following steps: S1: Acquire environmental information in real time through at least one environmental perception sensor, identify and classify obstacles and target objects, calculate the threat level of each obstacle, and dynamically classify and mark obstacles as high-risk obstacles according to the threat level; S2: Taking the current position of the target object as the planning endpoint, and based on the information of the high-risk obstacle, a path search algorithm is used to plan a global reference path from the robot's current position to the planning endpoint; and in the robot's velocity space, guided by the global reference path, a local execution trajectory is generated by a controller based on the weighted summation of multiple evaluation functions, and the weight of at least one evaluation function is dynamically adjusted according to the threat level of the high-risk obstacle; S3: If the target object is a non-moving object, then execute S4; if the target object is a moving object, then predict its future position based on its motion state; if the deviation between the future position and the current position of the target object exceeds a preset threshold, then update the future position to a new planning endpoint and re-execute S2. S4: Control the robot to move according to the local execution trajectory, and after successfully executing the current task, return to S1 to process the next task to be executed.
2. The method for a robot to continuously maintain the optimal path under multiple obstacles according to claim 1, characterized in that, The threat level is calculated based on at least one of the following parameters: the distance between the obstacle and the robot, the approach speed of the obstacle relative to the robot, and the type of obstacle. The dynamic classification includes defining an obstacle as a high-risk obstacle when the threat level of an obstacle is greater than a preset high-risk threshold.
3. The method for a robot to continuously maintain the optimal path under multiple obstacles according to claim 1 or 2, characterized in that, The formula for calculating the threat level is: in, To calculate the threat level, The real-time distance between the obstacle and the robot. Let be the approach speed of the obstacle relative to the robot. The base threat level is set based on the type of obstacle. , and These are the preset normalized weights.
4. The method for a robot to continuously maintain the optimal path under multiple obstacles according to claim 1, characterized in that, The environmental perception sensor includes at least one of lidar, camera, millimeter-wave radar or ultrasonic sensor, and performs spatiotemporal correlation fusion processing on multi-source perception data to complete the identification and classification of obstacles and target objects.
5. The method for a robot to continuously maintain the optimal path under multiple obstacles according to claim 4, characterized in that, The fusion process is implemented using a deep learning detection model, and the classification results include at least static obstacles, dynamic obstacles, and target objects.
6. The method for a robot to continuously maintain the optimal path under multiple obstacles according to claim 1, characterized in that, The evaluation function that dynamically adjusts the weights based on the threat level of the high-risk obstacles is the obstacle avoidance evaluation function, and the corresponding dynamic adjustment formula for the obstacle avoidance evaluation weights is as follows: in, The obstacle avoidance evaluation weights are dynamically adjusted. For baseline weights, It represents the highest threat level among all current high-risk obstacles. This represents the threat level impact coefficient.
7. The method for a robot to continuously maintain the optimal path under multiple obstacles according to claim 5, characterized in that, The process of generating local execution trajectories based on the controller using a weighted summation of multiple evaluation functions includes: Based on the robot's current linear velocity, angular velocity, and acceleration limitations, within the time window Generate a set of candidate trajectories ; For each candidate trajectory Through a set of evaluation functions Calculate the obstacle avoidance costs for both the obstacle and the obstacle. The cost of aligning with the global reference path and the alignment cost toward the planned endpoint. ; Based on the dynamically adjusted obstacle avoidance evaluation weights Preset path fitting weight Alignment weights with preset targets We obtain the total cost by weighted summation of all costs: The candidate trajectory with the lowest total cost is selected as the local execution trajectory.
8. The method for a robot to continuously maintain the optimal path under multiple obstacles according to claim 7, characterized in that, The candidate trajectory The generation process includes: Sampling is performed in the velocity space, and each set of sampled velocities is processed within a time window. A forward kinematics simulation is performed to obtain a candidate trajectory, in which the robot's kinematic model is suitable for its driving mode.
9. The method for a robot to continuously maintain the optimal path under multiple obstacles according to claim 1, characterized in that, The process of predicting the future location of the target object includes: According to the current time Detected target location and speed The prediction is performed using a uniformly decelerated motion model, wherein the expression for the uniformly decelerated motion model is: , The coefficient of friction of the field. This is the acceleration due to gravity.
10. The method for a robot to continuously maintain the optimal path under multiple obstacles according to claim 1, characterized in that, The path search algorithm is an improved A* algorithm, and its cost function is: Furthermore, in this cost function, the time from the starting point to the node will be... The actual cost Revised to ,in, The path from the starting point to the node The sum of the threat levels of all obstacles in the grid that the device passes through. This represents the threat cost coefficient.