Mobile control method, system and equipment for adaptively following target object and medium
By acquiring robot status and environmental information, risk areas and candidate velocity pairs are generated. Combined with DWA and PID algorithms for control, the problem of robot response lag and obstacle avoidance in dynamic environments is solved, achieving accurate and safe target following and interactive experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHIHAN XINGTU (SUZHOU) TECH CO LTD
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-21
AI Technical Summary
Existing technologies struggle to enable robots to follow moving targets naturally, adaptively, and closely in dynamic environments, resulting in issues such as delayed response, abrupt movements, or poor control over interaction distance.
By acquiring robot motion state, environmental obstacle information, and target location information, dynamic obstacle prediction trajectory and risk area are generated. A dynamic window algorithm is used to sample candidate velocity pairs, calculate trajectory risk assessment value, select the optimal velocity pair based on preset evaluation index, and generate control commands by combining DWA and PID algorithms to ensure that the robot accurately follows the target in complex environments.
It enables robots to accurately follow targets and avoid obstacles in real time in dynamic environments, improving the interactive experience and safety in escort scenarios, and ensuring that robots can intelligently and safely follow moving targets.
Smart Images

Figure CN121900407A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robot automatic control, and specifically to an adaptive motion control method, system, device, and medium for following a target object. Background Technology
[0002] With the increasing prevalence of robotics technology in everyday life scenarios such as cultural tourism, tour guiding, and companionship, robots capable of autonomously, naturally, and safely following users have become crucial for enhancing the interactive experience. These robots need to plan paths and avoid obstacles in real time in dynamic and uncertain environments, while maintaining an appropriate distance and speed from the user. Their following process must be adaptive, smooth, and safe, which places higher demands on the path planning and motion control methods of traditional robots.
[0003] Currently, there are solutions for robot following and obstacle avoidance. One solution is to achieve autonomous patrolling and static obstacle avoidance in fixed environments through multi-sensor fusion, improving inspection efficiency. Another solution is to perform robot path planning based on an improved RRTX fusion algorithm, enhancing navigation capabilities in specific scenarios by optimizing the path and dynamic obstacle avoidance.
[0004] However, the aforementioned existing technologies still have obvious limitations: the first solution focuses on fixed tasks in structured environments and is difficult to adapt to dynamic following scenarios where the target is constantly moving and the path changes in real time; although the second solution has a certain dynamic obstacle avoidance capability, its path planning is mainly geared towards fixed-point guidance. When it is necessary to closely, flexibly, and adaptively follow moving targets (such as following the owner in a companion scenario), there are still problems such as response lag, abrupt movement, or poor control of interaction distance. Summary of the Invention
[0005] In view of this, it is necessary to provide a method, system, device and medium for adaptively following the movement of a target object, so as to solve the technical problem in the prior art that it is difficult to achieve natural, adaptive and close following of a moving target in a dynamic environment.
[0006] To address the aforementioned technical problems, in a first aspect, the present invention provides an adaptive movement control method for following a target object, comprising: Acquire information about the robot's motion state, obstacles in the surrounding environment, and the location of the target object; Based on the dynamic obstacle information in the obstacle information, a predicted trajectory of the dynamic obstacle is generated, and a risk area is constructed based on the static obstacle information in the obstacle information and the predicted trajectory; Based on the location information, the motion state information, and the risk area, a dynamic window algorithm is used to sample and obtain multiple candidate velocity pairs; For each group of candidate velocity pairs, trajectory simulation is performed to generate multiple candidate trajectories; Based on the candidate trajectory, the risk area, and the predicted trajectory of the dynamic obstacle, the trajectory risk assessment value is calculated. The candidate trajectories are scored based on preset evaluation indicators, and the optimal speed pair is selected based on the scoring results. The preset evaluation indicators include at least the orientation angle evaluation value, trajectory risk evaluation value, speed evaluation value, and smoothness evaluation value. Based on the optimal speed and the robot's current actual speed, control commands are generated to drive the robot's movement.
[0007] In one possible implementation, constructing the risk region based on the static obstacle information in the obstacle information and the predicted trajectory includes: Morphological dilation is performed on the region corresponding to the static obstacle information to obtain a static obstacle region with connectivity. The predicted trajectory of the dynamic obstacle is spatially widened along its direction to form a dynamic obstacle zone. The expanded static obstacle area is merged with the dynamic obstacle area to generate the risk area.
[0008] In one possible implementation, the step of sampling multiple candidate velocity pairs using a dynamic window algorithm based on the location information, the motion state information, and the risk area includes: Based on the motion state information and the risk area, a dynamic window composed of the linear velocity range and the angular velocity range is determined; the boundaries of the linear velocity range and the angular velocity range are determined by at least one of the following constraints: kinematic constraints based on the motion state information, dynamic constraints based on the robot, and safe distance constraints based on the risk area. Within the dynamic window, linear velocity and angular velocity are discretely sampled to generate the multiple sets of candidate velocity pairs.
[0009] In one possible implementation, the calculation of the trajectory risk assessment value based on the predicted trajectory of the candidate trajectory, the risk area, and the dynamic obstacle includes: Based on the predicted trajectory, the first predicted position of the dynamic obstacle at multiple future moments is obtained; Determine the second predicted position of the candidate trajectory at the same future time; Based on the encounter angle and relative velocity vector, the instantaneous collision risk corresponding to the future moment is calculated according to the spatial distance between the first predicted position and the second predicted position; Based on the instantaneous collision risk of the candidate trajectory at all future moments, the dynamic interaction risk value between the candidate trajectory and the dynamic obstacle is calculated. Calculate the shortest distance between each trajectory point on the candidate trajectory and the static obstacle in the risk area; Based on the nearest distance of all trajectory points, the static distance risk value between the candidate trajectory and the static obstacle is calculated; The trajectory risk assessment value is calculated based on the static distance risk value and the dynamic interaction risk value.
[0010] One possible implementation also includes: For each candidate trajectory, based on the risk area, it is determined whether a collision will occur when the robot moves along the candidate trajectory; If a collision is determined to occur, the candidate trajectory is deemed to have a collision risk. If it is determined that no collision will occur, the candidate trajectory is deemed to have no collision risk, and a score is given for the candidate trajectory that has no collision risk.
[0011] In one possible implementation, scoring the candidate trajectories based on preset evaluation metrics and selecting the optimal speed pair based on the scoring results includes: Based on the motion state information and the trajectory risk evaluation value, the orientation angle evaluation value, the velocity evaluation value, and the smoothness evaluation value between each candidate trajectory and the target object are calculated. The scoring result is obtained by weighting and summing the trajectory risk evaluation value, the direction angle evaluation value, the velocity evaluation value, and the smoothness evaluation value according to the preset weight coefficients.
[0012] In one possible implementation, generating control commands to drive the robot's movement based on the optimal speed pair and the robot's current actual speed includes: Based on the optimal speed pair and the robot's current actual speed, the control quantity that minimizes the tracking error is calculated. Control commands to drive the robot's movement are generated based on the minimum control input.
[0013] Secondly, the present invention also provides an adaptive motion control system for following a target object, comprising: The acquisition module is used to acquire the robot's motion state information, obstacle information in the surrounding environment, and the position information of the target object; A construction module is used to generate a predicted trajectory of the dynamic obstacle based on the dynamic obstacle information in the obstacle information, and to construct a risk area based on the static obstacle information in the obstacle information and the predicted trajectory; The sampling module is used to sample multiple candidate velocity pairs based on the location information, the motion state information, and the risk area using a dynamic window algorithm. The generation module is used to perform trajectory simulation on each group of candidate velocity pairs to generate multiple candidate trajectories; The calculation module is used to calculate the trajectory risk assessment value based on the candidate trajectory, the risk area, and the predicted trajectory of the dynamic obstacle; The evaluation module is used to score the candidate trajectories based on preset evaluation indicators and select the optimal speed pair according to the scoring results. The preset evaluation indicators include at least the orientation angle evaluation value, trajectory risk evaluation value, speed evaluation value and smoothness evaluation value. The processing module is used to generate control commands to drive the robot to move based on the optimal speed and the robot's current actual speed.
[0014] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps in the adaptive following target object movement control method described in any of the above implementations.
[0015] Fourthly, the present invention also provides a computer-readable storage medium for storing a computer-readable program or instructions, which, when executed by a processor, can implement the steps of the adaptive following target object movement control method described in any of the above implementations.
[0016] The beneficial effects of this invention are as follows: The adaptive following target object movement control method provided by this invention first performs local trajectory planning through DWA, samples within the velocity space that satisfies the robot's dynamic constraints, simulates and generates multiple feasible short-term candidate trajectories, and selects the optimal velocity pair at the current moment as the target velocity command based on a scoring result that comprehensively considers the orientation angle evaluation value, trajectory risk evaluation value, velocity evaluation value, and smoothness evaluation value. The actual velocity of the robot (including the actual linear velocity and the actual angular velocity) is fed back in real time through the inertial measurement unit (IMU), the error between the optimal velocity pair and the actual velocity is calculated, and the error is input into two independent PID (proportional-integral-derivative) control loops for linear velocity and angular velocity, respectively. The PID algorithm calculates the optimal control quantity in real time based on the error, generates control commands, and drives the actuator (such as a motor) to adjust, enabling the robot's actual movement speed to accurately and smoothly track the optimal speed pair given by the planning layer, thereby achieving the expected movement trajectory and target following. This ensures that the robot does not lose sight of the target object in complex crowd environments. The DWA algorithm is used for real-time and safe local path decision-making, and PID control achieves precise motion tracking. Together, they complete the robot's adaptive following task of target points in dynamic environments, achieving precise tracking and real-time obstacle avoidance in dynamic environments, and realizing efficient and reliable following control. Furthermore, combining the DWA and PID algorithms can better handle complex outdoor environments, allowing the robot to effectively avoid obstacles while automatically moving with the target object even without supervision. This significantly improves the comfort of accompanying tours, enabling the robot to follow its owner more intelligently and safely in tour scenarios, providing a better interactive experience. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A schematic flowchart of an embodiment of the adaptive following target object movement control method provided by the present invention; Figure 2 For the present invention Figure 1 A schematic diagram of an embodiment of S102; Figure 3 For the present invention Figure 1 A schematic diagram of an embodiment of S103; Figure 4 For the present invention Figure 1 A schematic diagram of an embodiment of S105; Figure 5 A schematic flowchart of another embodiment of the adaptive following target object movement control method provided by the present invention; Figure 6 For the present invention Figure 1 A schematic diagram of an embodiment of S106; Figure 7 For the present invention Figure 1 A schematic diagram of an embodiment of S107; Figure 8 A schematic diagram of an embodiment of the adaptive tracking target object motion control system provided by the present invention; Figure 9 A schematic diagram of an embodiment of the electronic device provided by the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0020] In the description of the embodiments of the present invention, unless otherwise stated, "multiple" means two or more. "And / or" describes the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0021] The terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a technical feature defined with "first" or "second" may explicitly or implicitly include at least one of that feature.
[0022] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0023] This invention provides an adaptive motion control method, system, device, and medium for following a target object, which will be described below.
[0024] Figure 1 A schematic flowchart of an embodiment of the adaptive following target object movement control method provided by the present invention is shown below. Figure 1 As shown, the adaptive movement control method for following the target object includes: S101. Obtain the robot's motion state information, obstacle information in the surrounding environment, and the position information of the target object.
[0025] It should be noted that motion state information is acquired through the inertial measurement unit (IMU) and joint encoders mounted on the robot body. This motion state information includes the robot's current position (x, y) in the world coordinate system, heading angle θ, current linear velocity v, and angular velocity ω. Obstacle information is acquired through a 16-line LiDAR and an RGB-D depth camera mounted on the robot's head. The LiDAR provides long-range, high-precision horizontal point clouds for constructing a 2D obstacle map; the RGB-D camera provides short-range, color-rich, and stereoscopic point clouds for identifying and classifying obstacles (such as pedestrians, trees, and benches). A sensor fusion algorithm unifies the two types of data into the robot's base coordinate system, outputting a real-time list of static obstacles (such as walls and fixed structures) and real-time position, velocity, and bounding box information of dynamic obstacles (such as other visitors). Each visitor being followed wears a positioning tag. The robot can calculate the visitor's precise position (x_g, y_g) relative to the robot using the real-time received tag signals, which serves as the dynamically updated position information for the target object.
[0026] S102. Generate a predicted trajectory of the dynamic obstacle based on the dynamic obstacle information in the obstacle information, and construct a risk area based on the static obstacle information in the obstacle information and the predicted trajectory.
[0027] It should be noted that: First, the trajectory of a dynamic obstacle over a period of time is predicted based on its real-time status (such as speed and direction); then, the spatial distribution information of static obstacles is superimposed around the predicted trajectory to delineate safe zones where there may be collision risks or where avoidance is necessary.
[0028] S103. Based on the location information, the motion state information, and the risk area, a dynamic window algorithm is used to sample and obtain multiple candidate velocity pairs.
[0029] It should be noted that: First, based on the current position information of the target object and the current motion state information of the robot, combined with the constraints of the risk area, the velocity sampling range (dynamic window) is dynamically determined; then, a search is performed within this dynamic window, and multiple combinations of candidate linear velocities and candidate angular velocities representing different motion intentions are sampled to obtain candidate velocity pairs (v_i, ω_i).
[0030] S104. Perform trajectory simulation on each group of candidate velocity pairs to generate multiple candidate trajectories.
[0031] It should be noted that for each candidate velocity pair (v_i, ω_i), it is assumed that the velocity remains constant during the future simulation time (e.g., T=1.5 seconds). Based on the kinematic model of the differential wheeled robot, trajectory deduction is performed, and a series of discrete position points {(x1, y1), (x2, y2), ..., (xn, yn)} are calculated, forming a candidate trajectory. Simultaneously, the trajectory endpoint P_end_i and the robot's orientation are recorded.
[0032] S105. Based on the candidate trajectory, the risk area, and the predicted trajectory of the dynamic obstacle, the trajectory risk assessment value is calculated.
[0033] It should be noted that for each candidate trajectory, a quantitative trajectory risk assessment value is calculated by analyzing its spatial interaction with the risk area and the spatiotemporal probability of conflict with the predicted trajectory of dynamic obstacles.
[0034] S106. The candidate trajectories are scored based on preset evaluation indicators, and the optimal speed pair is selected according to the scoring results. The preset evaluation indicators include at least the direction angle evaluation value, trajectory risk evaluation value, speed evaluation value and smoothness evaluation value.
[0035] It should be noted that: First, based on preset indicators such as orientation angle evaluation value, trajectory risk evaluation value, velocity evaluation value, and smoothness evaluation value, a quantitative evaluation score is obtained for all candidate trajectories. Then, the optimal velocity pair is selected based on the evaluation results of all candidate trajectories.
[0036] S107. Based on the optimal speed and the robot's current actual speed, generate control commands to drive the robot to move.
[0037] It should be noted that the optimal speed pair obtained from the decision, combined with the robot's current actual motion state, is converted into specific low-level control commands (such as wheel speed or torque commands) by the controller, driving the robot to execute the planned motion accurately and stably.
[0038] In summary, the mineral resource exploration method provided by this invention first performs local trajectory planning using DWA, sampling within the velocity space that satisfies robot dynamics constraints, simulating and generating multiple feasible short-term candidate trajectories, and selecting the optimal velocity pair at the current moment as the target velocity command based on a scoring result that comprehensively considers the orientation angle evaluation value, trajectory risk evaluation value, velocity evaluation value, and smoothness evaluation value. The actual velocity of the robot (including actual linear velocity and actual angular velocity) is fed back in real time through the inertial measurement unit (IMU), the error between the optimal velocity pair and the actual velocity is calculated, and the error is input into two independent PID (proportional-integral-derivative) control loops for linear velocity and angular velocity, respectively. The PID algorithm calculates the optimal control quantity in real time based on the error, generates control commands, and drives the actuator (such as a motor) to adjust, enabling the robot's actual movement speed to accurately and smoothly track the optimal speed pair given by the planning layer, thereby achieving the expected movement trajectory and target following. This ensures that the robot does not lose sight of the target object in complex crowd environments. The DWA algorithm is used for real-time and safe local path decision-making, and PID control achieves precise motion tracking. Together, they complete the robot's adaptive following task of target points in dynamic environments, achieving precise tracking and real-time obstacle avoidance in dynamic environments, and realizing efficient and reliable following control. Furthermore, combining the DWA and PID algorithms can better handle complex outdoor environments, allowing the robot to effectively avoid obstacles while automatically moving with the target object even without supervision. This significantly improves the comfort of accompanying tours, enabling the robot to follow its owner more intelligently and safely in tour scenarios, providing a better interactive experience.
[0039] In dynamic environments, how can discrete and heterogeneous static and dynamic obstacle threats be uniformly and quantitatively integrated into a machine-understandable "risk area" map that can be directly used for real-time obstacle avoidance decisions? In some embodiments of this invention, such as... Figure 2 As shown, step S102 includes: S201. Perform morphological dilation on the region corresponding to the static obstacle information to obtain a static obstacle region with connectivity.
[0040] It should be noted that the following example, using a service robot equipped with LiDAR and vision sensors following customers in a shopping mall environment, illustrates the specific implementation of step S102. Real-time point cloud data acquired from the LiDAR is filtered and clustered to generate a binary initial static obstacle grid map, Map_obs_init. The map resolution is 0.05 meters per pixel, where 1 (white) represents an obstacle-occupied area and 0 (black) represents an empty area. Morphological dilation is performed on the initial static obstacle grid map Map_obs_init to expand the geometric boundaries of the areas corresponding to static obstacles outwards, establishing an absolutely safe buffer distance for the robot body (or outermost contour). This dilated map connects the originally narrow and separated areas corresponding to static obstacles (such as table and chair legs) into larger, more coherent static obstacle areas, resulting in the dilated static obstacle area map Map_static_dilated. The white areas in Map_static_dilated represent the static obstacle areas.
[0041] S202. The predicted trajectory of the dynamic obstacle is spatially widened along its direction to form a dynamic obstacle zone.
[0042] It should be noted that for each tracked dynamic obstacle (such as a pedestrian walking), its predicted position sequence within a future timeframe (e.g., T=3 seconds) at preset intervals (e.g., Δt=0.1 seconds) can be obtained: Traj_pred={P0, P1, ..., P30}. Adjacent points in the predicted position sequence Traj_pred are connected sequentially with line segments to form a polygonal path. Using this polygonal path as the central axis, a preset width (e.g., W=0.8 meters) is added to both sides of the path, forming a continuous, corridor-like polygonal region covering a future time period and space. This polygonal region is rasterized to generate a binary map Map_corridor_dynamic (i.e., a dynamic obstacle region map). This binary map represents the spatial range that the dynamic obstacle may occupy in the future, i.e., the dynamic obstacle zone. The dynamic obstacle zones corresponding to all dynamic obstacles are generated and updated in real time. The setting of the preset width W takes into account the physical size of the dynamic obstacle (such as a pedestrian), the uncertainty of the dynamic obstacle's motion prediction (position error), and the possible random swaying or path fine-tuning of the dynamic obstacle.
[0043] S203. Merge the expanded static obstacle area with the dynamic obstacle area to generate the risk area.
[0044] It should be noted that: based on the static obstacle area map Map_static_dilated obtained in S201 and the dynamic obstacle area map Map_corridor_dynamic corresponding to all dynamic obstacles at the current moment obtained in S202, a unified, binary final map Map_risk is generated by fusion processing. The final map marks risk areas, which include both static and dynamic obstacle areas.
[0045] In this embodiment, by morphologically expanding static obstacles, a physically safe boundary is established for the robot, eliminating the risk of scraping caused by sensor noise, positioning errors, or control delays. By constructing a dynamic obstacle zone, the future uncertainty of dynamic obstacles is transformed into a definite, avoidable spatiotemporal region, enabling the robot to perform preventative avoidance rather than reacting only when very close, fundamentally preventing collisions. Furthermore, merging the expanded static obstacle zone with the dynamic obstacle zone to generate a risk region greatly simplifies the complexity of collision detection in subsequent path planning (DWA). The planner does not need to distinguish obstacle types; it only needs to query the Map_risk corresponding to the risk region, improving the algorithm's efficiency and reliability. Furthermore, the dynamic obstacle zone provides the robot with spatiotemporal threat information for the next few seconds, enabling the robot to plan a path in advance that not only avoids obstacles at the current location but also avoids pedestrians that are about to move. The planned candidate trajectory is therefore more forward-looking, avoiding the "hesitation" or "sudden braking" caused by traditional reactive obstacle avoidance, which is not smooth and uncomfortable. It can effectively improve the robot's following performance in dynamic environments, enhance the user experience, and broaden the application scope of robots in life, entertainment and other scenarios.
[0046] In real-time path planning, how can we systematically transform the physical performance limits of a robot and environmental safety requirements into a feasible and finite velocity search space to avoid ineffective calculations, ensure motion safety, and improve planning efficiency? In some embodiments of this invention, such as... Figure 3 As shown, step S103 includes: S301. Based on the motion state information and the risk area, determine a dynamic window composed of the linear velocity range and the angular velocity range; the boundary of the linear velocity range and the angular velocity range is determined by at least one of the following constraints: kinematic constraints based on the motion state information, dynamic constraints based on the robot, and safe distance constraints based on the risk area.
[0047] It should be noted that the following detailed implementation of step S103 is based on a robot platform that moves autonomously in an indoor office environment. The robot platform is a differential drive chassis with a maximum linear velocity of 1.0 m / s, a maximum angular velocity of 1.5 rad / s, and a control cycle of 100 ms. At the current moment, the allowable range of linear velocity and allowable range of angular velocity that the robot can actually use in the next control cycle are calculated. The allowable range of linear velocity and allowable range of angular velocity are formed by the combined effect of three types of constraints, forming a dynamic window DW(v, ω).
[0048] The kinematic constraints based on motion state information are determined by the robot's physical structure and are hard limits. Specifically, a first linear velocity search range V_m = {v ∈ [v_min, v_max] = [-0.3, 1.0] m / s (negative values indicate backward movement) is constructed based on these kinematic constraints. A first angular velocity search range Ω_m = {ω ∈ [ω_min, ω_max] = [-1.5, 1.5] rad / s} is also constructed based on these kinematic constraints, thus obtaining the first search set.
[0049] The robot's dynamic constraints take into account the acceleration / deceleration capabilities of its motors, limiting the actual velocity variation range within a single control cycle Δt = 0.1 s, ensuring that the planned speed commands are smoothly executed by the motors. Let the current velocity be (v_current, ω_current), the maximum linear acceleration be Av_max = 0.8 m / s², and the maximum angular acceleration be Aω_max = 2.0 rad / s². Based on the dynamic constraints, a second linear velocity search range V_s = {v ∈ [v_current - Av_max × Δt, v_current + Av_max × Δt]} is constructed. A second angular velocity search range Ω_s = {ω ∈ [ω_current - Aω_max × Δt, ω_current + Aω_max × Δt]} is also constructed, thus obtaining the second search set.
[0050] The safety distance constraint based on the risk region is the core constraint for ensuring safety. For any candidate velocity (v, ω), the distance the robot travels before stopping during emergency braking must be less than the distance from the current point to the nearest risk region. For a set of velocities to be evaluated (v_s, ω_s), the braking trajectory is simulated based on the kinematic model over a very short period in the future (e.g., until the velocity decreases to 0). On this braking trajectory, the minimum distance from each point to the nearest obstacle in the final map Map_risk corresponding to the risk region is taken as dist(v, ω). A third linear velocity search range V_a=={v|v≤sqrt(2×dist(v, ω)×Av_max)} is constructed based on the safety distance constraint. Similarly, a third angular velocity search range Ω_a={ω|ω≤sqrt(2×dist(v, ω)×Aω_max)} is constructed based on the safety distance constraint, thus obtaining the third search set.
[0051] The final dynamic window DW is the intersection of the three sets mentioned above (including the first to third search sets), i.e., the dynamic window DW. {(v, ω)|v∈(V_m∩V_a∩V_s)and ω∈(Ω_m∩Ω_a∩Ω_s)}. This dynamic window is a polygonal region in the two-dimensional velocity space (v, ω), ensuring that the command is physically feasible, the motor can execute it, and that it can brake safely under any circumstances.
[0052] S302. Discretely sample the linear velocity and angular velocity within the dynamic window to generate the multiple sets of candidate velocity pairs.
[0053] It should be noted that within the rectangular dynamic window corresponding to the two-dimensional velocity space (v, ω) determined by S201, a set of discrete candidate velocities (vi, ωi) is generated using a uniform sampling or adaptive sampling strategy. The sampling density of the candidate velocities can be configured according to computational resources. For example, each sampled v_i is combined with each sampled ω_j to form a candidate velocity pair (v_i, ω_j). Theoretically, a maximum of 15 × 20 = 300 pairs can be generated, but since the DW is an irregular region, combinations actually located outside the DW will be discarded. Finally, a set of candidate velocities containing dozens to hundreds of pairs (v, ω) is generated.
[0054] In this embodiment, by pre-embedding and directly embedding three types of hard constraints—kinematics, dynamics, and safety distance—into the generation stage of the sampling space, it is ensured that all subsequent candidate trajectories are generated from a safe and feasible set of candidate velocities. This eliminates dangerous commands that the controller outputs that the robot cannot execute or that may lead to collisions, fundamentally guaranteeing the physical feasibility and safety of the candidate trajectories. Furthermore, by introducing safety distance constraints based on risk regions and using them as a prerequisite for velocity sampling, it ensures that only velocities that will not collide with any risk regions even with immediate emergency braking are considered as candidate velocity pairs, eliminating collisions at the source and providing higher safety and robustness. Furthermore, through kinematic and dynamic constraints, a large number of physically unrealizable or uncontrollably executable velocity combinations are excluded from the search space in advance. This avoids blind and inefficient searching and simulation in a vast global velocity space, instead concentrating computational resources within a small and feasible dynamic window (DW), significantly improving the planning efficiency and real-time performance of the robot's target following. Furthermore, the Dynamic Window (DW) is the true feasible region under physical constraints. Any candidate velocity pair sampled from it naturally satisfies the robot's acceleration and deceleration limitations, ensuring that the output control commands are seamlessly trackable and smoothly executed by the underlying controller. This avoids command conflicts or infeasibility issues between planning and control, guaranteeing the smoothness of the robot's overall motion control. Moreover, since the safe distance constraint directly depends on real-time perceived obstacle information, the Dynamic Window can instantly shrink or expand according to environmental changes. For example, when approaching an obstacle, the window automatically shrinks to limit high-speed, dangerous sampling; when in an open area, the window expands to allow for more efficient motion options, making the robot's motion planning environmentally adaptable and improving the robot's tracking accuracy and obstacle avoidance capabilities.
[0055] In dynamic and dense environments, the challenge lies in how to conduct a refined and multi-dimensional quantitative assessment of the safety of candidate trajectories. This invention addresses this by integrating dynamic interaction risks and static proximity risks to calculate a unified trajectory risk evaluation value, providing an accurate and reliable basis for selecting the optimal safe trajectory. In some embodiments of this invention, such as... Figure 4 As shown, step S105 includes: S401. Based on the predicted trajectory, obtain the first predicted position of the dynamic obstacle at multiple future moments; S402. Determine the second predicted position of the candidate trajectory at the same future time.
[0056] It should be noted that the specific implementation of step S105 is explained in detail using a scenario where a robot follows a target object in an indoor corridor, avoiding dynamic obstacles (such as pedestrians other than the target object) and static obstacles (such as walls). Assuming the dynamic window algorithm has generated N candidate trajectories, based on the predicted trajectory of each dynamic obstacle (such as a pedestrian) obtained in step S102, the first predicted position P_obs_j(t_k) of each dynamic obstacle j at each future time t_k is obtained. The first predicted position P_obs_j(t_k) represents the spatial point that the obstacle may occupy in the future. Since each candidate trajectory i itself consists of a series of time-ordered position points with a time interval of 0.1 seconds, for each candidate trajectory i, its coordinates at the future time t_k are directly read as the second predicted position P_robot_i(t_k). The second predicted position P_robot_i(t_k) represents the position the robot will reach in the future if it executes the speed command.
[0057] S403. Based on the encounter angle and relative velocity vector, calculate the instantaneous collision risk corresponding to the future moment according to the spatial distance between the first predicted position and the second predicted position.
[0058] It should be noted that at the same future time t_k, for a specific obstacle j and candidate trajectory i, the spatial distance d = ||P_robot_i(t_k)-P_obs_j(t_k)|| is calculated between the first predicted position calculated by S401 and the second predicted position calculated by S402. Additionally, the relative velocity vector v_rel = v_robot_i-v_obs_j(t_k) is calculated. Here, v_robot_i is the preset velocity of trajectory i, and v_obs_j(t_k) is the velocity interpolated from the predicted trajectory of the obstacle. The angle between the relative velocity vector v_rel and the position vector (P_obs_j-P_robot_i) pointing from the robot to the obstacle is calculated as the encounter angle φ. Based on the spatial distance, relative velocity vector, and encounter angle, the instantaneous collision risk between the specific obstacle j and candidate trajectory i is calculated. R_instant(i,j,t_k)=w1×d+w2×||v_rel||×cosφ; Among them, w1 and w2 are preset weights. When φ≈0° (relative velocity direction is directly pointing to each other), cosφ≈1, indicating a head-on collision with extremely high risk; when φ≈90°, cosφ≈0, indicating that the two are crossing each other with low risk; when φ≈180°, cosφ≈-1, indicating that the two are moving away from each other, which can reduce the overall risk.
[0059] S404. Based on the instantaneous collision risk of the candidate trajectory at all future moments, calculate the dynamic interaction risk value between the candidate trajectory and the dynamic obstacle.
[0060] It should be noted that for a candidate trajectory i and an obstacle j, their instantaneous collision risks at all future moments constitute a sequence, and the maximum value of this sequence can be taken as the dynamic interaction risk value R_interaction(i, j) between the two. Of course, since a candidate trajectory may have interaction risks with multiple dynamic obstacles, the maximum dynamic interaction risk value R_interaction(i, j) among all obstacles is taken as the final dynamic interaction risk value of the candidate trajectory.
[0061] S405. Calculate the shortest distance between each trajectory point on the candidate trajectory and the static obstacle in the risk area.
[0062] It should be noted that: all discrete location points {P_1, P_2, ..., P_M} on the candidate trajectory i are obtained. For each discrete location point P_m on the candidate trajectory i, the Euclidean distance transformation (EDT) is used to quickly query the Euclidean distance between it and the nearest obstacle in the risk area obtained by S102 to obtain the nearest distance dist_m.
[0063] S406. Based on the nearest distance of all trajectory points, calculate the static distance risk value between the candidate trajectory and the static obstacle.
[0064] It should be noted that after obtaining the nearest distance sequence {dist_1, dist_2, ..., dist_M} for all trajectory points on candidate trajectory i, the minimum nearest distance value is taken as d_min_i = min(dist_1, dist_2, ..., dist_M). Based on the minimum nearest distance value d_min_i, the static distance risk value R_static_i = K / (d_min_i + ε) between this candidate trajectory i and the static obstacle is calculated. Here, K is a scaling factor. When d_min_i is very small (the trajectory is very close to the risk area), the static distance risk value R_static_i will increase sharply. Similarly, the static distance risk values corresponding to other candidate trajectories can be calculated.
[0065] S407. Based on the static distance risk value and the dynamic interaction risk value, the trajectory risk evaluation value is calculated.
[0066] It should be noted that the trajectory risk assessment value R_i corresponding to candidate trajectory i is obtained by adaptive weighted fusion calculation based on the static distance risk value and the dynamic interaction risk value: R_i = λ × R_dynamic_i + (1-λ) × R_static_i. Here, λ is the adaptive weighting factor, and R_i is the trajectory risk assessment value corresponding to candidate trajectory i. Similarly, the trajectory risk assessment value corresponding to each candidate trajectory can be calculated by referring to the above process. λ can be adjusted in real time according to the dynamic level of the environment. For example, λ is larger (e.g., 0.7) in highly dynamic environments (multiple fast-moving obstacles detected), and smaller (e.g., 0.3) in highly statically complex environments (narrow spaces, many static obstacles).
[0067] In this embodiment, by introducing relative velocity vectors and encounter angles, combined with spatial distance, dynamic interaction risks are calculated. This allows the robot to anticipate potential conflicts (such as a pedestrian suddenly crossing) and choose a safer trajectory to go around behind the pedestrian rather than in front, improving the safety of the robot's target following. Furthermore, a trajectory risk evaluation value is calculated based on the static distance risk value and the dynamic interaction risk value. This ensures that the evaluation result reflects both the probability of conflict with moving objects and maintains an absolute safe distance from the static environment, making the safety assessment more comprehensive and reliable, and significantly improving the robot's overall adaptability and robustness in complex and changing environments. Furthermore, the trajectory risk evaluation value, calculated based on the static distance risk value and the dynamic interaction risk value, serves as the core input for scoring in the subsequent step S105. This guides the robot to choose trajectories that are both far from static obstacles and have the least conflict with the dynamic movement trend of pedestrians when following targets. This allows the robot to politely follow the target, such as moving around at a constant speed rather than stopping abruptly, significantly improving the smoothness of movement and the comfort of accompanying the target.
[0068] In the trajectory planning process, to eliminate all invalid candidate trajectories that inevitably lead to collisions, limited computational resources are concentrated on a refined multi-objective optimization evaluation of safe and feasible trajectories, thereby improving the efficiency, real-time performance, and decision reliability of the planning algorithm. In some embodiments of the present invention, such as... Figure 5 As shown, it also includes: S501. For each candidate trajectory, determine whether a collision will occur when the robot moves along the candidate trajectory based on the risk area.
[0069] It should be noted that for static obstacles, in the static obstacle area map Map_static_dilated generated by S201, white areas represent areas where the robot's center point (point mass) will inevitably collide with the static obstacle if it enters that area. This essentially simplifies the robot to a single point, greatly simplifying collision detection. For each trajectory point on the candidate trajectory, the value of the grid cell containing the robot's center point coordinates in the static obstacle area map Map_static_dilated is queried. If the grid cell value is white or equal to 1, it is determined that the robot will collide with the static obstacle while moving along the candidate trajectory, and the entire candidate trajectory is judged to have a static collision risk.
[0070] For dynamic obstacles, the outline radius of the dynamic obstacle is queried from the dynamic obstacle region map Map_corridor_dynamic generated in S202. For each trajectory point on the candidate trajectory, the Euclidean distance between the robot and the outline of the dynamic obstacle is calculated at the same future time. If the Euclidean distance is less than the sum of the outline radius of the dynamic obstacle and the outline radius of the robot (R_robot + R_obs), it is considered that the robot will collide with the dynamic obstacle when moving along the candidate trajectory at that future time. Similarly, if a collision occurs at any future time, the entire candidate trajectory is judged to have a dynamic collision risk.
[0071] S502. If it is determined that a collision will occur, it is determined that the candidate trajectory has a collision risk. S503. If it is determined that no collision will occur, the candidate trajectory is determined to have no collision risk, and the candidate trajectory with no collision risk is scored.
[0072] It should be noted that, based on the judgment result of S501, candidate trajectories are classified and labeled using a binary classification method. Candidate trajectories with collision risks (including static and dynamic collision risks) are marked as high-risk or invalid, while candidate trajectories without collision risks are marked as safe. All candidate trajectories marked as having collision risks will be directly excluded from the subsequent complex scoring process (S105 to S106). Alternatively, a very large fixed cost value (such as infinity) can be assigned to candidate trajectories with collision risks to ensure that they will never be selected in subsequent comparisons. Only those candidate trajectories marked as having no collision risks will enter the subsequent scoring process. The system will fully calculate the preset evaluation indicators of multiple dimensions such as orientation angle evaluation value, trajectory risk evaluation value, velocity evaluation value, and smoothness evaluation value for these candidate trajectories without collision risks, and perform weighted fusion to finally obtain a meaningful scoring result that reflects their comprehensive performance.
[0073] In this embodiment, since scoring candidate trajectories based on preset evaluation indicators involves a large amount of mathematical calculation, a large number of obviously infeasible candidate trajectories are pre-screened through rapid collision detection (with relatively low computational cost). This reduces the number of candidate trajectories requiring detailed evaluation, lowers the computation time of a single planning cycle, and enables the system to meet shorter control cycle requirements. Consequently, it can react and replan more promptly in the face of rapidly changing dynamic environments, significantly improving the computational efficiency and real-time performance of robot movement planning. Furthermore, freeing up limited computational resources (CPU time) from candidate trajectories with collision risks allows for the evaluation of remaining safe candidate trajectories without collision risks. This optimizes the allocation of decision-making resources, allowing for the exploration of more possibilities or more precise comparisons within the same time budget, thereby improving the overall superiority of the final optimal trajectory selection and making the robot's movement smoother and more efficient. Furthermore, any candidate trajectory that poses a geometric risk of collision with an obstacle, regardless of how well it performs in other performance metrics (such as how close it is to the target or how smooth it is), will be excluded. This prevents the extreme danger of the algorithm accidentally selecting a high-performing but potentially dangerous trajectory due to improper weight configuration in the multi-objective cost function, sensor noise, or other evaluation errors. This greatly enhances the inherent safety and decision reliability of the entire control system.
[0074] When faced with multiple feasible candidate trajectories, how can a unified, quantifiable, multi-objective trade-off evaluation function be used to comprehensively consider safety, efficiency, goal orientation, and motion comfort, thereby objectively and stably selecting the globally optimal motion command? In some embodiments of this invention, such as... Figure 6 As shown, step S106 includes: S601. Based on the motion state information and the trajectory risk evaluation value, calculate the orientation angle evaluation value, the velocity evaluation value, and the smoothness evaluation value between each candidate trajectory and the target object.
[0075] It should be noted that, combining the aforementioned steps, assuming there are already 10 candidate trajectories that have passed collision detection, each trajectory has its calculated trajectory risk assessment value (R_i), and has a corresponding candidate velocity pair (v_i, ω_i) and endpoint pose (x_end_i, y_end_i, θ_end_i). The target object's position is (x_g, y_g). The actual velocity output in the previous control cycle is (v_prev, ω_prev). Quantitative assessment values are calculated for each candidate trajectory in at least four key dimensions. These at least four key dimensions include: The orientation angle evaluation value H_i is used to evaluate whether the robot's orientation is aligned with the target object at the end of the candidate trajectory, ensuring the target guidance of the motion. The target orientation vector vec1 = (x_g - x_end_i, y_g - y_end_i) is calculated from the end of the candidate trajectory towards the target object. Then, the robot's end-point orientation vector is calculated: vec2 = (cos(θ_end_i), sin(θ_end_i)). Based on the end-point orientation vector and the target orientation vector, the cosine of the angle Δθ_i between the two vectors is calculated as the orientation angle evaluation value. Where H_i = cos(Δθ_i) = (vec1 × vec2) / (|vec1| × |vec2|).
[0076] The velocity evaluation value V_i is used to encourage efficient robot movement while ensuring safety, avoiding unnecessary pauses or slowdowns, and improving task efficiency. The normalized linear velocity of the candidate trajectory is obtained as normalized linear velocity = v_i / v_max, where v_i is the candidate linear velocity corresponding to the i-th candidate trajectory, and v_max is the robot's maximum linear velocity. The velocity evaluation value is calculated based on the normalized linear velocity, where a larger v_i results in a higher velocity evaluation value V_i.
[0077] The smoothness evaluation value S_i is used to encourage smooth and continuous robot motion, avoid sudden speed changes, and improve motion comfort and motor lifespan. First, the difference between the current candidate speed pair and the actual speed at the previous moment is calculated: Δv = v_i - v_prev, Δω = ω_i - ω_prev. Then, S_i is calculated as 1.0 / (1.0 + c_v × |Δv| + c_ω × |Δω|), where c_v and c_ω are scaling factors.
[0078] S602. Based on the trajectory risk evaluation value, the direction angle evaluation value, the speed evaluation value, and the smoothness evaluation value, the score result is obtained by weighted summation according to the preset weight coefficients.
[0079] It should be noted that the system pre-sets and maintains a set of weighting coefficients, including at least a first coefficient α for the orientation angle evaluation value H_i, a second coefficient β for the velocity evaluation value V_i, a third coefficient γ for the smoothness evaluation value S_i, and a fourth coefficient δ for the trajectory risk evaluation value. Based on the principle of safety first, δ is set to > α, δ > β, and δ > γ, ensuring that obstacle avoidance safety has a dominant and decisive influence in the evaluation. The score for a candidate trajectory is calculated using the following formula: Score_i=α×H_i+β×(1.0 / (R_i+ε))+γ×V_i+δ×S_i+…(Formula 1); Where Score_i is the score result, and ε is a positive number. The “…” in Equation 1 represents other possible evaluation indicators, such as the lateral error evaluation value. The weighting coefficients are not completely fixed and can be fine-tuned based on the prior characteristics of the current inspected section. For example, in narrow passages, δ can be further increased. This dynamic adjustment further optimizes the system's behavior in different scenarios. For the trajectory risk evaluation value R_i, its reciprocal 1 / (R_i+ε) is taken in Equation 1.
[0080] In this embodiment, the robot's following behavior is decomposed into four quantifiable and measurable sub-objectives: target orientation (H_i), safety (1 / R_i), efficiency (V_i), and comfort (S_i). A weighted summation formula is used to calculate the optimal speed pair for target following by weighting these potentially conflicting sub-objectives (e.g., deceleration may be necessary for safety, but acceleration is desired for efficiency). This significantly improves the stability and reliability of decision-making. Furthermore, by explicitly setting δ>α, δ>β, and δ>γ, obstacle avoidance safety is given the highest priority when evaluating any candidate trajectory. This means that a candidate trajectory that can efficiently approach the target but is slightly closer to obstacles will score higher than a trajectory that may be slightly slower but is further away from all obstacles. This ensures that the robot prioritizes collision avoidance in all situations, greatly reducing the risk of accidents in complex dynamic environments and enhancing the robot's operational safety. Furthermore, by modularizing the evaluation dimensions and assigning configurable weights, the robot can exhibit the most suitable behavioral emphasis in different scenarios simply by adjusting the weight coefficients (e.g., dynamically adapting based on road segment type). This allows for greater conservatism in hazardous areas and higher efficiency in high-performance areas, endowing the system with high flexibility and environmental adaptability. Diverse inspection scenarios can be adapted through fine-tuning of the weights. Moreover, the weight coefficients (α, β, γ, δ) are key parameters for adjusting the robot's "personality" or "task mode." Flexible behavioral strategy configurations are achieved through these weight coefficients. For example, a safety patrol mode can significantly increase β (e.g., 0.6), resulting in extremely conservative robot behavior. A rapid arrival mode can increase γ (e.g., 0.4), causing the robot to follow at a faster speed within a safe range. A comfortable companion mode can increase δ (e.g., 0.3), resulting in exceptionally smooth start-stop and turning. By adjusting the weight parameters, different application scenarios and user preferences can be easily adapted, improving the robot's versatility and flexibility in target following.
[0081] How to achieve high-precision and robust dynamic tracking of velocity commands at the planning layer under conditions where the robot dynamics model is inaccurate or changes, thereby bridging the gap between "ideal planning" and "actual execution"? In some embodiments of this invention, such as... Figure 7 As shown, step S107 includes: S701. Based on the optimal speed pair and the robot's current actual speed, calculate the control quantity that minimizes the tracking error.
[0082] S702. Generate control commands to drive the robot to move based on the minimum control quantity.
[0083] It should be noted that, taking a quadruped robot with potentially varying loads as an example, the specific implementation of step S107 is explained in detail. The robot's underlying mechanism is torque control, with a control cycle of T_c = 10ms. The acquired optimal velocity pair (v_ref, ω_ref) is used as the target velocity command that the Adaptive Model Predictive Controller (A-MPC) needs to track in each control cycle. Through the robot's encoder and IMU, the actual linear velocity v_act(k) and actual angular velocity ω_act(k) of the robot at the current time k are measured and fused in real time, and used as feedback input to the A-MPC.
[0084] A-MPC employs a simplified discrete-time linear state-space model as its internal dynamics model. For example, for the differential drive model, the state can be chosen as x(k) = [v(k); ω(k)], and the control input is u(k) = [τ_left(k); τ_right(k)] (torque of the left and right wheel motors). The model can be represented as: x(k+1) = A(θ) × x(k) + B(θ) × u(k), where A and B are system matrices, and their parameter θ contains the robot's key dynamic parameters, such as mass, moment of inertia, motor coefficients, and damping coefficients. Historical control commands u and actual speed responses x_act within a recent time window (e.g., the past 0.5 seconds) are collected, and the parameter vector θ_hat(k) is estimated and updated online in real time. For example, when the robot carries a load, the equivalent mass and moment of inertia increase; this change is automatically identified, and A(θ_hat) and B(θ_hat) are updated to match the predicted model with the current actual dynamics. At each control time k, A-MPC solves an optimization problem within a finite prediction time domain (e.g., N=10 steps, corresponding to 0.1 seconds). The cost function used to minimize the tracking error and control variable variation within the prediction time domain is calculated as follows: ; in, k At the current moment, U = [u( k || k ), u( k +1|| k ), ..., u( k + N 1|| k [)] is the control input sequence to be optimized. N It refers to the prediction time domain length (prediction steps).x ( k + i | k ) is at the current moment k Predicted future moments k + i The system state, x_ref(k+i) is the future time. k + i The reference state (target state), Δu( k + i || k ) represents the change in control input (control increment), Q and R are weight matrices, penalizing tracking error and control input change (representing smoothness), respectively. 2 The weighted quadratic norm is used. Physical constraints such as upper and lower limits of motor torque and rate of change of speed are added to the optimization problem. The above optimization problem is solved in real time, and only the first element u×(k|k) of the optimal control sequence obtained by optimization is taken as the control quantity that should be applied to the robot at the current time k to minimize the tracking error. Based on the minimum control quantity u×(k|k), according to the actuator interface protocol, it is converted into control commands (such as motor current commands or joint position commands) to drive the robot's motion. The control commands are sent to the motor drivers of each joint of the robot through a real-time bus (such as CAN, EtherCAT). In the next control cycle k+1, the entire process is repeated: new state feedback is collected, new parameter identification is performed, and a new optimization problem is solved, thereby achieving rolling optimization.
[0085] In this embodiment, the optimal control quantity can be calculated under various operating conditions, significantly improving the robot's tracking accuracy and enhancing the system's robustness to internal parameter disturbances and minor external disturbances. Furthermore, the planning layer (DWA) performs multi-objective optimization at the kinematic level, while the control layer (A-MPC) performs high-precision tracking optimization at the dynamic level, improving the robot's intelligence, safety, and comfort when following targets.
[0086] To better implement the adaptive target object following motion control method in this embodiment of the invention, based on the adaptive target object following motion control method, correspondingly, as follows: Figure 8 As shown, this embodiment of the invention also provides an adaptive motion control system 800 for following a target object. The adaptive motion control system 800 for following a target object includes: The acquisition module 801 is used to acquire the robot's motion state information, obstacle information in the surrounding environment, and the position information of the target object; The construction module 802 is used to generate a predicted trajectory of the dynamic obstacle based on the dynamic obstacle information in the obstacle information, and to construct a risk area based on the static obstacle information in the obstacle information and the predicted trajectory; The sampling module 803 is used to sample multiple candidate velocity pairs based on the location information, the motion state information, and the risk area using a dynamic window algorithm. The generation module 804 is used to perform trajectory simulation on each group of candidate velocity pairs to generate multiple candidate trajectories; The calculation module 805 is used to calculate the trajectory risk assessment value based on the candidate trajectory, the risk area, and the predicted trajectory of the dynamic obstacle. Evaluation module 806 is used to score the candidate trajectory based on preset evaluation indicators and select the optimal speed pair according to the scoring results. The preset evaluation indicators include at least the direction angle evaluation value, trajectory risk evaluation value, speed evaluation value and smoothness evaluation value. The processing module 807 is used to generate control commands to drive the robot to move based on the optimal speed and the robot's current actual speed.
[0087] The adaptive following target object motion control system 800 provided in the above embodiments can realize the technical solutions described in the above adaptive following target object motion control method embodiments. The specific implementation principles of each module or unit can be found in the corresponding content in the above adaptive following target object motion control method embodiments, and will not be repeated here.
[0088] like Figure 9 As shown, the present invention also provides an electronic device 900. The electronic device 900 includes a processor 901, a memory 902, and a display 903. Figure 9 Only some components of the electronic device 900 are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0089] In some embodiments, processor 901 may be a central processing unit (CPU), microprocessor, or other data processing chip, used to run program code stored in memory 902 or process data, such as the adaptive following target object movement control method of the present invention.
[0090] In some embodiments, processor 901 may be a single server or a group of servers. The server group may be centralized or distributed. In some embodiments, processor 901 may be local or remote. In some embodiments, processor 901 may be implemented on a cloud platform. In one embodiment, the cloud platform may include a private cloud, public cloud, hybrid cloud, community cloud, distributed cloud, intranet, multi-cloud, etc., or any combination thereof.
[0091] In some embodiments, memory 902 may be an internal storage unit of electronic device 900, such as a hard disk or memory of electronic device 900. In other embodiments, memory 902 may also be an external storage device of electronic device 900, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. equipped on electronic device 900.
[0092] Furthermore, the memory 902 may include both internal storage units of the electronic device 900 and external storage devices. The memory 902 is used to store application software and various types of data installed on the electronic device 900.
[0093] In some embodiments, display 903 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. Display 903 is used to display information from electronic device 900 and to display a visual user interface. Components 901-903 of electronic device 900 communicate with each other via a system bus.
[0094] In one embodiment, when processor 901 executes the adaptive following target object movement control program in memory 902, the following steps can be implemented: Acquire information about the robot's motion state, obstacles in the surrounding environment, and the location of the target object; Based on the dynamic obstacle information in the obstacle information, a predicted trajectory of the dynamic obstacle is generated, and a risk area is constructed based on the static obstacle information in the obstacle information and the predicted trajectory; Based on the location information, the motion state information, and the risk area, a dynamic window algorithm is used to sample and obtain multiple candidate velocity pairs; For each group of candidate velocity pairs, trajectory simulation is performed to generate multiple candidate trajectories; Based on the candidate trajectory, the risk area, and the predicted trajectory of the dynamic obstacle, the trajectory risk assessment value is calculated. The candidate trajectories are scored based on preset evaluation indicators, and the optimal speed pair is selected based on the scoring results. The preset evaluation indicators include at least the orientation angle evaluation value, trajectory risk evaluation value, speed evaluation value, and smoothness evaluation value. Based on the optimal speed and the robot's current actual speed, control commands are generated to drive the robot's movement.
[0095] It should be understood that when the processor 901 executes the adaptive following target object movement control program in the memory 902, in addition to the functions mentioned above, it can also implement other functions, as can be found in the description of the corresponding method embodiments above.
[0096] Furthermore, this embodiment of the invention does not specifically limit the type of electronic device 900 mentioned. Electronic device 900 can be a mobile phone, tablet computer, personal digital assistant (PDA), wearable device, laptop computer, or other portable electronic device. Exemplary embodiments of portable electronic devices include, but are not limited to, portable electronic devices running iOS, Android, Microsoft, or other operating systems. The aforementioned portable electronic device can also be other portable electronic devices, such as a laptop computer with a touch-sensitive surface (e.g., a touch panel). It should also be understood that in some other embodiments of the invention, electronic device 900 may not be a portable electronic device, but rather a desktop computer with a touch-sensitive surface (e.g., a touch panel).
[0097] Accordingly, this application also provides a computer-readable storage medium for storing a computer-readable program or instruction. When the program or instruction is executed by a processor, it can implement the steps or functions of the adaptive following target object movement control method provided in the above-described method embodiments.
[0098] Those skilled in the art will understand that all or part of the processes of the methods described in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.), and the computer program can be stored in a computer-readable storage medium. The computer-readable storage medium may be a disk, optical disk, read-only memory, or random access memory, etc.
[0099] The above provides a detailed description of the adaptive tracking target object movement control method, system, device, and medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for adaptively following the movement of a target object, characterized in that, include: Acquire information about the robot's motion state, obstacles in the surrounding environment, and the location of the target object; Based on the dynamic obstacle information in the obstacle information, a predicted trajectory of the dynamic obstacle is generated, and a risk area is constructed based on the static obstacle information in the obstacle information and the predicted trajectory; Based on the location information, the motion state information, and the risk area, a dynamic window algorithm is used to sample and obtain multiple candidate velocity pairs; For each group of candidate velocity pairs, trajectory simulation is performed to generate multiple candidate trajectories; Based on the candidate trajectory, the risk area, and the predicted trajectory of the dynamic obstacle, the trajectory risk assessment value is calculated. The candidate trajectories are scored based on preset evaluation indicators, and the optimal speed pair is selected based on the scoring results. The preset evaluation indicators include at least the orientation angle evaluation value, trajectory risk evaluation value, speed evaluation value, and smoothness evaluation value. Based on the optimal speed and the robot's current actual speed, control commands are generated to drive the robot's movement.
2. The adaptive following target object movement control method according to claim 1, characterized in that, The step of constructing a risk region based on the static obstacle information in the obstacle information and the predicted trajectory includes: Morphological dilation is performed on the region corresponding to the static obstacle information to obtain a static obstacle region with connectivity. The predicted trajectory of the dynamic obstacle is spatially widened along its direction to form a dynamic obstacle zone. The expanded static obstacle area is merged with the dynamic obstacle area to generate the risk area.
3. The adaptive following target object movement control method according to claim 1, characterized in that, Based on the location information, the motion state information, and the risk area, a dynamic window algorithm is used to sample and obtain multiple candidate velocity pairs, including: Based on the motion state information and the risk area, a dynamic window composed of the linear velocity range and the angular velocity range is determined; the boundaries of the linear velocity range and the angular velocity range are determined by at least one of the following constraints: kinematic constraints based on the motion state information, dynamic constraints based on the robot, and safe distance constraints based on the risk area. Within the dynamic window, linear velocity and angular velocity are discretely sampled to generate the multiple sets of candidate velocity pairs.
4. The adaptive following target object movement control method according to claim 1, characterized in that, The predicted trajectory based on the candidate trajectory, the risk area, and the dynamic obstacle calculates a trajectory risk assessment value, including: Based on the predicted trajectory, the first predicted position of the dynamic obstacle at multiple future moments is obtained; Determine the second predicted position of the candidate trajectory at the same future time; Based on the encounter angle and relative velocity vector, the instantaneous collision risk corresponding to the future moment is calculated according to the spatial distance between the first predicted position and the second predicted position; Based on the instantaneous collision risk of the candidate trajectory at all future moments, the dynamic interaction risk value between the candidate trajectory and the dynamic obstacle is calculated. Calculate the shortest distance between each trajectory point on the candidate trajectory and the static obstacle in the risk area; Based on the nearest distance of all trajectory points, the static distance risk value between the candidate trajectory and the static obstacle is calculated; The trajectory risk assessment value is calculated based on the static distance risk value and the dynamic interaction risk value.
5. The adaptive following target object movement control method according to claim 1, characterized in that, Also includes: For each candidate trajectory, based on the risk area, it is determined whether a collision will occur when the robot moves along the candidate trajectory; If a collision is determined to occur, the candidate trajectory is deemed to have a collision risk. If it is determined that no collision will occur, the candidate trajectory is deemed to have no collision risk, and a score is given for the candidate trajectory that has no collision risk.
6. The adaptive following target object movement control method according to claim 1, characterized in that, The step of scoring the candidate trajectories based on preset evaluation indicators and selecting the optimal speed pair based on the scoring results includes: Based on the motion state information and the trajectory risk evaluation value, the orientation angle evaluation value, the velocity evaluation value, and the smoothness evaluation value between each candidate trajectory and the target object are calculated. The scoring result is obtained by weighting and summing the trajectory risk evaluation value, the direction angle evaluation value, the velocity evaluation value, and the smoothness evaluation value according to the preset weight coefficients.
7. The adaptive following target object movement control method according to claim 1, characterized in that, The step of generating control commands to drive the robot's movement based on the optimal speed and the robot's current actual speed includes: Based on the optimal speed pair and the robot's current actual speed, the control quantity that minimizes the tracking error is calculated. Control commands to drive the robot's movement are generated based on the minimum control input.
8. An adaptive motion control system for following a target object, characterized in that, include: The acquisition module is used to acquire the robot's motion state information, obstacle information in the surrounding environment, and the position information of the target object; A construction module is used to generate a predicted trajectory of the dynamic obstacle based on the dynamic obstacle information in the obstacle information, and to construct a risk area based on the static obstacle information in the obstacle information and the predicted trajectory; The sampling module is used to sample multiple candidate velocity pairs based on the location information, the motion state information, and the risk area using a dynamic window algorithm. The generation module is used to perform trajectory simulation on each group of candidate velocity pairs to generate multiple candidate trajectories; The calculation module is used to calculate the trajectory risk assessment value based on the candidate trajectory, the risk area, and the predicted trajectory of the dynamic obstacle; The evaluation module is used to score the candidate trajectories based on preset evaluation indicators and select the optimal speed pair according to the scoring results. The preset evaluation indicators include at least the orientation angle evaluation value, trajectory risk evaluation value, speed evaluation value and smoothness evaluation value. The processing module is used to generate control commands to drive the robot to move based on the optimal speed and the robot's current actual speed.
9. An electronic device, characterized in that, Including memory and processor, among which, The memory is used to store programs; The processor, coupled to the memory, is used to execute the program stored in the memory to implement the steps of the adaptive following target object movement control method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store computer-readable programs or instructions, which, when executed by a processor, can implement the steps of the adaptive following target object movement control method according to any one of claims 1 to 7.
Citation Information
Cited By
Obstacle avoidance control method and device, equipment, storage medium and program product
CN122086078A
Loading vehicle following control method and equipment based on computer vision and medium
CN122111033A