A dynamic obstacle prediction and avoidance method for robots
Patent Information
- Application Number
- CN202611189074.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-10-30
AI Technical Summary
[0006]本申请提供一种用于机器人的动态障碍物预测与规避及相关产品,旨在解决现有机器人控制技术中存在的动态障碍物预测能力差、避障响应滞后、运动控制可靠性不足的问题,以提高机器人在动态环境中的避障准确性、运动安全性和适应能力,使机器人能够更加可靠地完成复杂环境下的自主移动任务
[0012]上述用于机器人的动态障碍物预测与规避方法及相关产品所提供的一个方案中,通过实时获取机器人自身运动状态以及周围障碍物的运动状态,并根据不同时刻的障碍物状态变化识别动态障碍物,并利用动态障碍物的历史运动轨迹序列表征其运动趋势,使机器人能够从基于当前环境状态的被动避障转变为面向未来运动趋势的主动避障;在此基础上,通过结合动态障碍物历史运动信息与机器人自身运动状态构建时变控制屏障函数,对机器人与动态障碍物之间的时空安全余量进行动态量化,从而形成随环境变化调整的安全约束,提高机器人对动态碰撞风险的提前感知和约束能力;同时,基于机器人的非线性运动学模型构建轨迹优化函数,并将动态安全边界约束以及机器人自身物理执行极限共同作为优化求解条件,使得到的期望线速度和期望角速度既能够满足动态环境下的避障需求,又符合机器人的实际运动能力,避免生成无法执行的运动轨迹。由此,本方案能够提高机器人在动态复杂环境中的障碍物预测准确性、避障实时性以及规划轨迹可执行性,解决现有机器人面对动态障碍物时预测能力不足、避障响应滞后以及运动控制可靠性不足的问题。
Smart Images

Figure CN123010814A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robot control technology, and in particular to a method for dynamic obstacle prediction and avoidance for robots and related products. Background Technology
[0002] With the development of intelligent robot technology, robots are gradually being applied to various scenarios such as industrial manufacturing, logistics and transportation, and service interaction. In actual operation, robots usually need to complete movement tasks in complex environments that include people, equipment, and other moving objects. Therefore, they need to have environmental perception and autonomous movement capabilities to ensure safety and task completion efficiency during operation.
[0003] Existing robot motion control technologies typically rely on path planning based on environmental perception, enabling robots to avoid obstacles within their operating area. However, in real-world applications, obstacles are not always stationary. For example, moving personnel, transport equipment, and other autonomous mobile robots may exhibit continuously changing motion states, making the environment highly uncertain and dynamic.
[0004] Currently, some robot obstacle avoidance solutions primarily focus on path planning for known environments or static obstacles, exhibiting problems such as poor prediction capabilities for dynamic obstacles, delayed obstacle avoidance response, and insufficient reliability of motion control. When objects with changing motion states appear in the environment, the robot often needs to readjust its motion strategy after the obstacle's position changes, making it difficult to adapt to environmental changes caused by obstacle movement in a timely manner. Furthermore, due to the inherent limitations of robot motion in terms of speed, turning ability, and mechanical structure, if the motion planning process does not fully consider actual execution capabilities, the planned results may be difficult for the robot to execute accurately, affecting the stability and reliability of the motion process.
[0005] Therefore, improving the obstacle avoidance accuracy, motion safety, and adaptability of robots in dynamic environments, enabling them to more reliably complete autonomous movement tasks in complex environments, has become a pressing technical problem in the field of robot motion control. Summary of the Invention
[0006] This application provides a dynamic obstacle prediction and avoidance system for robots and related products, aiming to solve the problems of poor dynamic obstacle prediction capability, delayed obstacle avoidance response, and insufficient motion control reliability in existing robot control technologies, so as to improve the obstacle avoidance accuracy, motion safety and adaptability of robots in dynamic environments, and enable robots to more reliably complete autonomous movement tasks in complex environments.
[0007] In a first aspect, embodiments of this application provide a method for dynamic obstacle prediction and avoidance for robots, including: Real-time monitoring of the robot's own motion state, as well as the motion state of obstacles within a preset range around the robot relative to the robot; Based on the motion state of all obstacles at different times, dynamic obstacles are identified, and the historical motion trajectory sequence of dynamic obstacles within a preset historical time period is determined. Based on the historical motion trajectory sequence and the robot's own motion state, a time-varying control barrier function is constructed to determine the dynamic safety boundary constraint of the robot within the future prediction time. The time-varying control barrier function is used to quantify the spatiotemporal safety margin between the robot's motion state and dynamic obstacles. Based on the nonlinear kinematic model of the robot, a robot trajectory optimization function is constructed with the goal of minimizing the deviation between the robot's future predicted trajectory and the global target reference trajectory corresponding to the robot's target position. Using dynamic safety boundary constraints and the robot's physical execution limits as constraints, the robot trajectory optimization function is solved in real time online to calculate the robot's expected linear velocity and expected angular velocity in the current control cycle. The robot's motion is controlled based on the desired linear velocity and desired angular velocity to avoid dynamic obstacles.
[0008] Secondly, embodiments of this application provide a dynamic obstacle prediction and avoidance system for a robot, including a robot and a control device, wherein the control device is used to execute the above-described method; wherein the control device includes: The monitoring module is used to monitor the robot's own motion state and the motion state of obstacles within a preset range around the robot in real time. The identification module is used to identify dynamic obstacles based on the motion state of all obstacles at different times, and to determine the historical motion trajectory sequence of the dynamic obstacles within a preset historical time period. The determination module is used to construct the time-varying control barrier function of the robot based on the historical motion trajectory sequence and the robot's own motion state, so as to determine the dynamic safety boundary constraint of the robot in the future prediction time; the time-varying control barrier function is used to quantify the spatiotemporal safety margin between the robot's motion state and dynamic obstacles; The module is used to construct a robot trajectory optimization function based on the nonlinear kinematic model of the robot, with the goal of minimizing the deviation between the robot's future predicted trajectory and the global target reference trajectory corresponding to the robot's target position. The solver module is used to solve the robot trajectory optimization function in real time online with dynamic safety boundary constraints and the robot's physical execution limits as constraints, and calculate the robot's expected linear velocity and expected angular velocity in the current control cycle; The control module is used to control the robot's motion based on the desired linear velocity and desired angular velocity in order to avoid dynamic obstacles.
[0009] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described above.
[0010] Fourthly, embodiments of this application provide a readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0011] Fifthly, embodiments of this application provide a computer program product, which includes a computer program that implements the above-described method when executed by a processor.
[0012] In one solution provided by the aforementioned dynamic obstacle prediction and avoidance method and related products for robots, the robot's own motion state and the motion state of surrounding obstacles are acquired in real time. Dynamic obstacles are identified based on the changes in obstacle state at different times, and their motion trends are represented by the historical motion trajectory sequences of dynamic obstacles. This enables the robot to shift from passive obstacle avoidance based on the current environmental state to active obstacle avoidance based on future motion trends. On this basis, a time-varying control barrier function is constructed by combining the historical motion information of dynamic obstacles with the robot's own motion state. This dynamically quantifies the spatiotemporal safety margin between the robot and dynamic obstacles, thereby forming a safety constraint that adjusts with environmental changes and improving the robot's ability to perceive and constrain dynamic collision risks in advance. Simultaneously, a trajectory optimization function is constructed based on the robot's nonlinear kinematic model. The dynamic safety boundary constraints and the robot's own physical execution limits are used as optimization solution conditions. This ensures that the obtained desired linear velocity and desired angular velocity can meet the obstacle avoidance requirements in dynamic environments and conform to the robot's actual motion capabilities, avoiding the generation of unexecutable motion trajectories. Therefore, this solution can improve the accuracy of obstacle prediction, real-time obstacle avoidance, and executability of planned trajectories for robots in dynamic and complex environments, and solve the problems of insufficient prediction ability, delayed obstacle avoidance response, and insufficient motion control reliability of existing robots when facing dynamic obstacles. Attached Figure Description
[0013] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments of this application 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.
[0014] Figure 1 This is a schematic diagram of a dynamic obstacle prediction and avoidance system for robots according to one embodiment of this application; Figure 2 This is a flowchart illustrating a dynamic obstacle prediction and avoidance method for robots in one embodiment of this application; Figure 3 yes Figure 2 A schematic diagram of the implementation process of step S20; Figure 4 yes Figure 2 A schematic diagram of the implementation process of step S30; Figure 5 yes Figure 1 A schematic diagram of the structure of the central control device; Figure 6 This is a schematic diagram of the structure of an electronic device in one embodiment of this application. Detailed Implementation
[0015] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0016] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of a described feature, integral, step, operation, element, and / or component, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof. It should also be understood that, as used in this specification and the appended claims, the term "and / or" refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0017] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0018] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0019] To illustrate the technical solution of this application, specific embodiments are described below.
[0020] The dynamic obstacle prediction and avoidance method for robots provided in this application embodiment can be applied to, for example, Figure 1 The dynamic obstacle prediction and avoidance system for robots (hereinafter referred to as the system) shown includes a robot and a control device. The control device communicates with the robot through various sensors and drive systems via a bus to realize the robot's motion control.
[0021] In practical applications, the control device monitors the robot's own motion state and the motion state of obstacles within a preset range around the robot in real time via a bus or various sensors. Simultaneously, based on the motion states of all obstacles at different times, it identifies dynamic obstacles and determines their historical trajectory sequences within a preset historical time period. Then, based on the historical trajectory sequences and the robot's own motion state, the control device constructs a time-varying control barrier function to determine the robot's dynamic safety boundary constraints within a predicted future timeframe. This time-varying control barrier function quantifies the spatiotemporal safety margin between the robot's motion state and the dynamic obstacles. Based on the robot's nonlinear kinematic model, and with the objective of minimizing the deviation between the robot's predicted future trajectory and the global target reference trajectory corresponding to the robot's target position, a robot trajectory optimization function is constructed. Using the dynamic safety boundary constraints and the robot's physical execution limits as constraints, the control device solves the robot trajectory optimization function online in real time, calculating the robot's desired linear velocity and angular velocity within the current control cycle. Finally, based on these desired linear velocity and angular velocity, the robot's motion is controlled to avoid dynamic obstacles.
[0022] In this embodiment, by acquiring the robot's own motion state and the motion state of surrounding obstacles in real time, and identifying dynamic obstacles based on the changes in obstacle motion at different times, the robot further analyzes the future motion trend of the dynamic obstacles using their historical motion trajectory sequences. This avoids making obstacle avoidance decisions solely based on the current obstacle position, improving the robot's ability to perceive changes in the dynamic environment. Then, by combining the historical motion trajectories of the dynamic obstacles with the robot's own motion state to construct a time-varying control barrier function, the robot can adjust safety constraints in real time according to the future motion trend of the dynamic obstacles. This quantifies the spatiotemporal safety margin between the robot and the dynamic obstacles, enabling early constraint of potential collision risks. Simultaneously, a trajectory optimization function is constructed based on the robot's nonlinear kinematic model, and dynamic safety boundary constraints and the robot's own physical execution capabilities are jointly introduced into the online optimization process. This ensures that the calculated motion control parameters not only meet obstacle avoidance safety requirements but also conform to the robot's actual motion capabilities, improving the executability and stability of the trajectory planning results. Therefore, this solution can achieve early prediction and safe avoidance of obstacle motion trends in dynamic and complex environments, improving the real-time performance, safety, and trajectory execution reliability of robot motion control.
[0023] In one embodiment, such as Figure 2 As shown, a method for dynamic obstacle prediction and avoidance in robots is provided, which is then applied to... Figure 1 Taking the control device in the middle as an example, the following steps are included: S10: Real-time monitoring of the robot's own motion state and the motion state of obstacles within a preset range around the robot relative to the robot.
[0024] The control device utilizes multiple sensors mounted on the robot to simultaneously collect real-time data on the robot's own state and the external environment.
[0025] The robot monitors its own motion state using an integrated inertial measurement unit (IMU) and an odometry system (e.g., encoders mounted on the left and right drive motors). The IMU measures the robot's three-axis acceleration and angular velocity, while the encoder calculates wheel rotation speed by counting pulses and integrates the distance traveled. Combining these two data points, a state estimation algorithm (such as an extended Kalman filter) is used to calculate the robot's current two-dimensional coordinate position, heading angle (the robot's orientation in the plane), linear velocity vector, and angular velocity in real time.
[0026] The robot utilizes its onboard LiDAR and depth camera (such as an RGB-D camera) to perceive the motion of surrounding obstacles. The LiDAR emits laser beams and receives reflected signals, generating two-dimensional or three-dimensional point cloud data of the surrounding environment, providing distance and contour information of objects. The depth camera, using structured light or time-of-flight principles, simultaneously acquires color images of the environment and depth information for each pixel, providing texture and distance information of objects. Next, the control unit fuses and processes the acquired point cloud and image data, employing a multi-object tracking algorithm (e.g., based on Kalman filtering or Hungarian matching) to detect, correlate, and track obstacles appearing in consecutive frames within the same timeframe. This allows for real-time calculation of the distance and azimuth of each obstacle relative to the robot within a preset range (e.g., within a 10-meter radius), as well as the relative velocity and relative acceleration vectors calculated through position difference, ultimately monitoring the motion state of the obstacles relative to the robot.
[0027] S20: Based on the motion state of all obstacles at different times, identify dynamic obstacles and determine the historical motion trajectory sequence of dynamic obstacles within a preset historical time period.
[0028] After receiving the motion state data of all obstacles at different times continuously transmitted in step S10, the control device first cleans and preprocesses the data to remove obviously abnormal noise points. Then, the control device calculates the magnitude of the relative velocity vector of each obstacle within consecutive time frames (e.g., every 0.1 seconds). Next, it compares this relative velocity magnitude with a pre-set dynamic judgment threshold (e.g., 0.2 m / s). If the relative velocity magnitude of an obstacle is consistently greater than this threshold, the obstacle is determined not to be a stationary or slowly drifting object (e.g., a wall, a trash can), but rather a "dynamic obstacle" with significant motion capabilities, such as a pedestrian, other mobile robot, or vehicle. Otherwise, it is classified as a static obstacle.
[0029] For each identified dynamic obstacle, the control device traces back and extracts all location data (two-dimensional coordinates) recorded within a "preset historical time period" (e.g., the past 2 seconds) starting from the moment it was identified as a dynamic obstacle. The control device removes any jump points caused by sensor obstruction and arranges these location points into a continuous series of coordinate points in chronological order (from the furthest historical moment to the current moment), thereby constructing a "historical motion trajectory sequence" of the dynamic obstacle within the preset historical time period.
[0030] S30: Based on the historical motion trajectory sequence and the robot's own motion state, construct the robot's time-varying control barrier function to determine the robot's dynamic safety boundary constraints within the predicted future time.
[0031] The control device first acquires the historical motion trajectory sequence of the dynamic obstacle and the robot's current motion state (including current position, velocity, and angular velocity). Then, using a motion prediction model (e.g., a trajectory prediction model based on social force fields or long short-term memory networks), combined with the velocity and acceleration trends in the trajectory sequence, historical motion patterns, and environmental topology information around the robot (such as walls, road boundaries, etc.), it predicts the possible position and motion uncertainty of the dynamic obstacle within a future time period (e.g., the next 3 seconds). This uncertainty is quantified into a time-varying probability distribution, describing the spatial range that the obstacle may occupy at each future time point.
[0032] Next, the control device defines a time-varying control barrier function based on this probability distribution. This time-varying control barrier function is used to quantify the spatiotemporal safety margin between the robot's motion state and dynamic obstacles. Specifically, this time-varying control barrier function appears as a modified potential field function or a probability-based constraint function. It takes the robot's current state (such as position coordinates) and the possible probability distribution region of obstacles at a future time point as inputs and outputs a scalar value. This scalar value represents the safety margin between the robot and dynamic obstacles in the spatiotemporal dimension: the larger the value, the farther the robot is from the potential dynamic hazard area (the area where obstacles have a high probability of appearing) at the current or future time, and the safer it is. Finally, the control device sets a constraint condition that must be satisfied, ensuring that the value of this time-varying control barrier function is always greater than or equal to a preset safety threshold at each time step within the future prediction time domain (such as from the current time to 2 seconds in the future). This constraint condition is the dynamic safety boundary constraint, which forms a continuously evolving dynamic restricted area boundary in the robot's motion planning space that is related to the predicted position and probability density of obstacles.
[0033] S40: Based on the nonlinear kinematic model of the robot, a robot trajectory optimization function is constructed with the goal of minimizing the deviation between the robot's future predicted trajectory and the global target reference trajectory corresponding to the robot's target position.
[0034] The control unit stores the robot's nonlinear kinematic model. This nonlinear kinematic model is typically built based on differential drive or Ackerman steering models and is used to describe the nonlinear relationship between the robot's control inputs (such as linear velocity v and angular velocity ω) and the robot's state changes (such as position and heading angle) at the next moment.
[0035] Then, the control device acquires a global target reference trajectory consisting of a series of path points required for the robot to reach its destination (i.e., the target location). This reference trajectory is a series of expected positions and timestamps planned in a global coordinate system, indicating the location the robot should arrive at within a certain period of time in the future.
[0036] The optimization objective is set as follows: to find a time-series control input (linear velocity and angular velocity) such that, driven by these control inputs, the deviation between the robot's future predicted trajectory calculated by the kinematic model and the global target reference trajectory (e.g., calculating the weighted sum of the squared errors of position and velocity at corresponding time points) is minimized. Based on this, the control device constructs a robot trajectory optimization function, which is a typical nonlinear model predictive control problem, and its objective function is to minimize the aforementioned trajectory tracking deviation.
[0037] S50: Using dynamic safety boundary constraints and the robot's physical execution limits as constraints, the robot trajectory optimization function is solved online in real time to calculate the robot's desired linear velocity and desired angular velocity in the current control cycle.
[0038] Specifically, the control device incorporates dynamic safety boundary constraints (i.e., the inequality ensuring the robot's position maintains a safe distance from the predicted probability region of obstacles at every future time step) and the robot's physical execution limits as constraints into the robot trajectory optimization function. These physical execution limits include, but are not limited to: maximum and minimum linear velocities (e.g., 0.5 m / s to 1.5 m / s), maximum and minimum angular velocities (e.g., ±0.8 radians / s), and maximum linear and angular accelerations (reflecting motor response capabilities). This constitutes a complete finite-time constrained optimization problem. Subsequently, the control device uses an efficient online numerical optimization solver (e.g., a solver based on sequential quadratic programming or interior-point methods, or a fast solver designed for model predictive control) to solve this optimization problem within real-time control cycles (e.g., every 50 milliseconds). The solver searches for the optimal input sequence while satisfying all constraints. After solving, the control device extracts the control command within the first control step of this input sequence (i.e., the command to be executed within the current control cycle), which includes a desired linear velocity and a desired angular velocity.
[0039] S60: Controls the robot's motion based on the desired linear velocity and desired angular velocity to avoid dynamic obstacles.
[0040] The control unit sends the calculated desired linear velocity and desired angular velocity as target values to the robot's underlying motion controller. This underlying controller (such as a PID controller or a model-based control law) calculates the torque or PWM duty cycle required to drive the left and right wheel motors based on the difference between the target values and the robot's current actual speed, and outputs these control signals to the motors via drivers. The motors rotate, driving the wheels and thus changing the robot's actual speed and direction. Because the entire optimization process is performed while satisfying dynamic safety boundary constraints, the calculated desired velocity command guides the robot to automatically avoid the predicted path of dynamic obstacles, achieving smooth and safe avoidance maneuvers while moving towards the global target.
[0041] In this embodiment, by introducing a time-varying control barrier function, the motion uncertainty of dynamic obstacles is transformed into a dynamic safety boundary for the robot in the spatiotemporal dimension, and this boundary is incorporated as a constraint into the model-based trajectory optimization solution. This method provides a dynamic obstacle avoidance strategy that is both forward-looking and robust. Compared with reactive obstacle avoidance that relies solely on current-moment perception, it predicts the future trajectory of obstacles and plans a safe path in advance, avoiding sudden turns or braking caused by reacting only to the current state. At the same time, through real-time model predictive control optimization, it can track the global target path with minimal trajectory deviation while ensuring safety hard constraints and physical limit constraints. This achieves the technical effect of efficiently moving towards the target and actively, smoothly, and safely avoiding moving obstacles in complex dynamic environments.
[0042] In one embodiment, step S10, which involves real-time monitoring of the robot's own motion state and the motion state of obstacles within a preset range around the robot relative to the robot, specifically includes the following steps: S11: Using an inertial measurement unit and encoder installed on the robot, the robot's two-dimensional position, heading angle, linear velocity, and angular velocity are collected in real time to monitor the robot's motion state.
[0043] The robot integrates an inertial measurement unit (IMU) and an encoder. An IMU is an electronic device that integrates a three-axis accelerometer and a three-axis gyroscope, used to measure the three-axis linear acceleration and rotational angular velocity of an object. An encoder is a position sensor mounted on a motor shaft or wheel axle, typically a photoelectric encoder or a magnetic encoder, which converts the mechanical rotation angle or speed of the shaft into pulse signals.
[0044] The control device reads the acceleration and angular velocity data output by the inertial measurement unit (IMU) and the pulse count data output by the encoder in real time at a fixed sampling frequency. First, based on the encoder pulse count and wheel circumference, the distance the wheel travels in each control cycle is calculated. Then, using a differential speed model (for a two-wheeled differential robot), the displacement (i.e., the change in two-dimensional position) and the change in heading angle of the robot body are calculated. Simultaneously, by integrating the acceleration data and fusing the IMU's integration result with the encoder's odometry result using a Kalman filter or particle filter to compensate for their respective noise, the robot's highly accurate two-dimensional position, heading angle, linear velocity (velocity along the forward direction), and angular velocity (velocity around the vertical axis) in the global coordinate system at the current moment are obtained.
[0045] S12: Use the lidar and depth camera installed on the robot to collect raw point cloud and image data of the surrounding environment, and use a multi-target tracking algorithm to obtain the relative position, relative velocity and relative acceleration of obstacles within a preset range relative to the robot, so as to monitor the motion state of the obstacles relative to the robot.
[0046] The robot is equipped with a lidar system and a depth camera. A lidar system is a radar system that uses a laser beam to detect characteristics such as the position and velocity of a target, acquiring distance and direction information of the surrounding environment to form point cloud data. A depth camera is a camera capable of simultaneously acquiring RGB color images and depth information for each pixel, such as cameras using time-of-flight or structured light technologies.
[0047] Specifically, the control device simultaneously receives point cloud frame data from the LiDAR and RGB-D (red, green, blue - depth) image frame data from the depth camera. First, the data from the two sensors is spatiotemporally aligned, and the depth information from the depth camera is mapped to the point cloud format, or the two are fused (e.g., through target bounding box matching) to obtain a richer 3D environment representation containing redundant information. Next, a target detection algorithm is used to identify individual obstacle targets from the fused data and extract their spatial positions (distance and orientation angle) in the robot coordinate system. Then, a multi-target tracking algorithm (typically a tracking framework based on Kalman filtering and the Hungarian algorithm) is used to assign IDs (assigning a unique identifier to the same obstacle) and update the state of each obstacle identified in consecutive frames of data. This target tracking algorithm uses the obstacle state (position, velocity) of the previous frame to predict the state of the current frame and associates it with the targets detected in the current frame. In this way, the control device can calculate the position of each obstacle relative to the robot in real time, the relative velocity (the change in displacement per unit time, including magnitude and direction) calculated by the position difference between consecutive frames, and the relative acceleration calculated by the velocity difference, thus achieving stable and real-time monitoring of the relative motion state of the obstacles.
[0048] This embodiment achieves complementary and enhanced robot self-localization and environmental perception by integrating an inertial measurement unit / encoder odometry system with a lidar / depth camera multi-sensor solution. The inertial measurement unit and encoder provide high-speed, stable, short-term body state estimation, while the lidar and depth camera solve the long-term drift problem of odometry and provide rich environmental information. Simultaneously, the introduction of a multi-target tracking algorithm enables the system not only to detect obstacles but also to stably acquire their motion trends in real time, providing highly reliable, low-latency input data for subsequent more accurate dynamic obstacle recognition and trajectory prediction.
[0049] In one embodiment, such as Figure 3 As shown, step S20, which involves identifying dynamic obstacles based on the motion states of all obstacles at different times and determining the historical motion trajectory sequence of the dynamic obstacles within a preset historical time period, specifically includes the following steps: S21: Based on the motion state of all obstacles at different times, calculate the relative velocity magnitude of each obstacle in a continuous time frame, and identify obstacles with a relative velocity magnitude greater than a preset velocity threshold as dynamic obstacles.
[0050] The control device continuously acquires motion state data of obstacles, which includes information such as the identifier ID, relative position, and relative velocity vector of each obstacle at each sampling time (e.g., every 0.1 seconds).
[0051] For each obstacle with a unique ID, the control device calculates its relative velocity magnitude over two or more consecutive time frames. This relative velocity magnitude is the magnitude of the relative velocity vector, representing how fast the obstacle moves relative to the robot. The calculation formula is to take the square root of the sum of the squares of the two components of the velocity vector to obtain a velocity scalar. The control device internally has a preset velocity threshold, which is a constant value determined through experimental or theoretical analysis, used to distinguish between static obstacles (such as walls, fixed tables and chairs) and dynamic obstacles (such as pedestrians and vehicles). For example, this threshold is set to 0.15 m / s.
[0052] For each obstacle, if its relative velocity magnitude is greater than a threshold for multiple consecutive frames (e.g., 5 consecutive frames), or if the obstacle moves intermittently, it is also classified as a dynamic obstacle. Conversely, if its relative velocity magnitude is consistently less than or equal to the threshold, it is classified as a static obstacle or ambient background. Ultimately, the system marks all obstacles whose relative velocity magnitude is consistently or frequently greater than the threshold as dynamic obstacles and assigns them a new dynamic label for subsequent processing.
[0053] S22: Based on the motion state of dynamic obstacles at different times, extract the continuous position points of dynamic obstacles in a preset historical time period in chronological order to obtain a historical motion trajectory sequence.
[0054] After identifying a dynamic obstacle, the control device executes a trajectory extraction process. Specifically, the control device creates and maintains a historical trajectory buffer for each dynamic obstacle. Once an obstacle is confirmed as a dynamic obstacle, the control device uses the current moment as a base point to trace back all state records within a preset historical time period. The length of this historical time period is preset, for example, 3 seconds. From the historical data buffer of the dynamic obstacle, the control device extracts the two-dimensional position information (x, y coordinates) of the obstacle relative to the global coordinate system (obtained from relative coordinates through the robot's own pose) at each sampling moment, in the order from the earliest to the current timestamp.
[0055] During the extraction process, the control device performs data cleaning steps, such as removing outliers that significantly deviate from the reasonable spatial range due to sensor obstruction or frame drops (e.g., position point jumps exceeding preset physical limits, such as 2.0 meters). Simultaneously, if there are a few transient data gaps, linear interpolation can be used to fill in the missing points. Finally, these cleaned and filled continuous position data points are arranged strictly in chronological order from oldest to newest, forming an ordered list of coordinate points containing time information. This list represents the historical motion trajectory sequence of the dynamic obstacle.
[0056] In this embodiment, a simple, efficient, and easy-to-implement dynamic obstacle recognition method is provided based on a threshold determination of velocity modulus. By setting a threshold, stationary and moving objects are effectively separated from the perception data, avoiding the inclusion of environmental background in subsequent complex trajectory prediction and optimization problems, thus reducing computational complexity. Simultaneously, by systematically extracting, cleaning, and completing the location points of the identified dynamic obstacles, high-quality, continuous historical trajectory data is obtained. This provides crucial, time-informed motion pattern data for subsequent accurate trajectory prediction, thereby improving the accuracy of predicting complex behaviors such as human walking and vehicle movement.
[0057] In one embodiment, such as Figure 4 As shown, step S30, which involves constructing the time-varying control barrier function for the robot to determine the dynamic safety boundary constraints of the robot within the predicted future time, specifically includes the following steps: S31: Based on the historical motion trajectory sequence of dynamic obstacles and the environmental information around the robot, predict the occupancy of the surrounding environmental space by dynamic obstacles in a future preset time period, and obtain the location of the occupied space and the probability density distribution of the occupancy by dynamic obstacles in the future preset time period.
[0058] Among them, the occupied space location refers to the range of physical space that the obstacle may occupy at some point in the future; the occupancy probability density distribution refers to the probability density function of the possibility that each point in the space is occupied by the obstacle, rather than a simple yes / no binary value.
[0059] Specifically, the control device first uses a deep learning model or a physics-based motion model, such as a long short-term memory network or a constant velocity model, combined with the historical motion trajectory sequence of the dynamic obstacle (including position and velocity information), as model input. Simultaneously, the control device also encodes environmental information surrounding the robot (such as a static map extracted from LiDAR data, including walls, table and chair edges, road boundaries, etc.) as scene semantic constraints. Based on these historical motion patterns and environmental constraints, the model outputs multiple candidate predicted trajectories for the obstacle at a series of time points within a preset future time period. Each candidate trajectory represents a possible intended motion path and carries a prior probability, which indicates the model's belief that the path is likely to occur; the value is between 0 and 1, and the sum is 1.
[0060] Next, the control device processes these candidate predicted trajectories into a smooth spatiotemporal probability distribution: it uses the position coordinates of each candidate trajectory at a certain time point as the mean of a Gaussian distribution at that time point. Simultaneously, considering environmental disturbances, model uncertainties, and errors arising from the gradual blurring of the intended path as the prediction time increases, the model calculates a displacement variance related to that time point (the longer the prediction time, the larger the variance) and the degree of trajectory deviation. Thus, each future time point will correspond to multiple Gaussian distributions centered at different candidate predicted positions.
[0061] The control device uses the prior probability of each candidate trajectory as a weight, and then performs a weighted summation of all these Gaussian distributions to construct a Gaussian mixture model describing the location at that time point. The output of this Gaussian mixture model is the location of the occupied space and the corresponding continuous occupancy probability density distribution at that time point. For example, at a certain time point, the probability density is high in the central region (indicating that the obstacle is most likely nearby), gradually decreasing towards the periphery.
[0062] S32: Based on the robot's own motion state, occupied space location, and occupancy probability density distribution, predict the spatiotemporal collision probability distribution of dynamic obstacles colliding with the robot in the future time period.
[0063] The spatiotemporal collision probability distribution describes the set of probabilities that the robot will be in the same spatial position as a dynamic obstacle at different times and points in the future.
[0064] The control device first acquires the robot's current motion state (such as position, velocity, and heading) and its described physical dimensions (such as a circle with a radius of 0.3 meters). Then, based on the current motion state, using its simplified kinematic model, it can calculate the geometric envelope region that the robot may reach at various points in time within a preset future time period. This geometric envelope region describes the physical shape and volume range occupied by the robot in space at that point in time, for example, a series of rotating circular or rectangular regions.
[0065] Next, at the same time point, the control device acquires the occupancy probability density distribution of dynamic obstacles (presented as a continuous function). Then, to calculate the probability of the robot colliding with the obstacle, the control device performs the following operation at each discrete time point within a preset future time period: taking the geometric envelope region of the robot at that moment as an integration interval, it performs a spatial double integral (or overlapping integral) on the obstacle occupancy probability density distribution function at that moment within this interval. The mathematical result of this integral is the cumulative probability that the robot is exactly in a spatial position occupied by the obstacle, i.e., the collision probability at that time point.
[0066] Finally, the control device calculates the collision probability of all these discrete time points and uses techniques such as spline interpolation or linear interpolation to construct a continuously evolving mapping function on time and space coordinates. This function is the spatiotemporal collision probability distribution, whose input is a specific time and space coordinate point in the future, and whose output is the collision probability value at that point.
[0067] S33: Based on the spatiotemporal collision probability distribution, construct a time-varying control barrier function for the robot to determine the dynamic safety boundary constraints of the robot within the predicted future time.
[0068] After obtaining the spatiotemporal collision probability distribution, the control device defines a time-varying control barrier function that can describe the relationship between the robot's state and the collision risk.
[0069] First, the spatiotemporal collision probability distribution is extracted as an equiprobable surface along the time-space dimension, or spatial locations are sorted and processed according to their probability. For example, at a specific time point, an acceptable collision probability threshold, such as 0.1, is set. The robot cannot occupy any position in space where the collision probability is greater than 0.1. In practice, the control device will find all consecutive points on the two-dimensional map at that time point where the collision probability equals the threshold. These points will delineate the next closed dynamic safety perimeter (dynamic ellipsoid or convex hull shape) at that time point. Then, this dynamically changing perimeter is mathematically transformed into a function expression related to the robot's state (especially its position). For example, a barrier function h(x(t),t) = dmaneuver(x(t),t)-dsafe is defined, where dmaneuver(x(t),t) is the shortest distance from the robot's position at time t to the aforementioned dynamic perimeter, and dsafe is a preset safety margin. By ensuring that h(x(t),t)>=0, the robot's spatial position x(t) is forcibly constrained outside the dynamic perimeter. The constraint on the function h must be satisfied at every time point within the future prediction time (e.g., 2 seconds in the future), which constitutes the entirety of the dynamic safety boundary constraint.
[0070] In this embodiment, by transforming the uncertainty of dynamic obstacle trajectory prediction into a quantitative occupancy probability distribution, and further calculating the spatiotemporal probability distribution of robot collisions, a fine quantification of safety constraints is achieved. The solution also abandons the traditional rigid approach of predicting absolute position + safety buffer circle, replacing it with a probabilistic framework. This allows the robot to approach obstacles more flexibly in areas with low probability density while ensuring a lower collision risk, thereby expanding the passable space, especially suitable for congested environments. Furthermore, by using a Gaussian mixture model or similar methods, the increasing uncertainty of long-term predictions is modeled, making the long-term safety boundary more flexible and avoiding overly conservative or unsolvable problems due to inaccurate long-term predictions. By incorporating the robot's actual size and shape into the collision risk calculation through the spatial integration of the envelope region and occupancy probability, the obstacle avoidance model becomes more accurate, improving the robot's decision-making balance between safety and efficiency.
[0071] In one embodiment, step S31, which involves predicting the occupancy of the surrounding environment by the dynamic obstacle within a preset time period based on the historical motion trajectory sequence of the dynamic obstacle and the environmental information around the robot, specifically includes the following steps: S311: Based on historical motion trajectory sequences and environmental information around the robot, extract the spatial interaction features between dynamic obstacles and the surrounding environment.
[0072] Spatial interaction features refer to feature vectors describing how dynamic obstacles are constrained or otherwise influenced by the environment in their movement paths. The control device can take the obtained historical motion trajectory sequence of the dynamic obstacle (a set of two-dimensional positions that change over time) and the information of the robot's surrounding environment (e.g., an occupancy map, passable areas, and inaccessible areas constructed by real-time scanning by LiDAR) as input, and calculate the interaction relationship between the obstacle and its surrounding environment at each point of the historical trajectory by designing a feature extraction module (e.g., a pre-trained convolutional neural network).
[0073] For example, feature vectors can include: the distance vector between the obstacle and the nearest static obstacle (wall, tree); whether the obstacle is within the road boundary; the angle between the obstacle's direction of movement and the road direction; the obstacle's historical velocity change pattern (whether it accelerates, decelerates, or turns); and social interaction features based on social force models, such as the distance and relative velocity between the obstacle and other dynamic obstacles. These features are extracted from historical data within a time window through a series of mathematical calculations to form one or a set of vectors as spatial interaction features.
[0074] S312: Based on spatial interaction features, predict the trajectory of obstacles to obtain multiple candidate predicted trajectories of dynamic obstacles within a preset time period in the future, as well as the prior probability of each candidate predicted trajectory.
[0075] The control device inputs the extracted spatial interaction features into a trajectory prediction model, which is typically a multimodal prediction model, such as a neural network model based on a conditional variational autoencoder (FDE) or a hybrid density network. The model's role is not to generate a single, definitive path, but rather to generate multiple distinct candidate predicted trajectories. Each candidate trajectory represents a possible motion mode or intent.
[0076] For example, at an intersection, a trajectory prediction model might output three candidate trajectories: one representing going straight forward (probability 0.6), one representing turning left (probability 0.3), and one representing turning right (probability 0.1). These probabilities are called prior probabilities, representing the initial likelihood that an obstacle will choose that trajectory pattern under specific scenario and historical trajectory conditions. Each candidate trajectory is a list of predicted locations within a preset future time period, with these locations bearing timestamps.
[0077] S313: Using the position points of each candidate predicted trajectory as the mean of the Gaussian distribution, and combining the displacement variance generated by the intentional perturbation, a Gaussian mixture model is constructed. The Gaussian mixture model is then solved by weighting according to each prior probability to obtain the occupied spatial position and the corresponding occupancy probability density distribution at each time node.
[0078] The control device creates a Gaussian distribution for each future time point (e.g., the first second in the future) on each candidate predicted trajectory. The mean of this Gaussian distribution is the predicted position coordinate of the candidate trajectory at that time point. The standard deviation of the distribution reflects the uncertainty of the prediction. This uncertainty mainly comes from two parts: one part comes from the time variance of the model's long-distance predictions, which increases in unreliability and variance over time; the other part comes from intentional perturbations, i.e., the actual behavior of obstacles may deviate from their typical intentional trend. This perturbation variance can be set as a constant or related to the specific intention mode.
[0079] Then, at the same future time point, the control device will obtain multiple Gaussian distributions, each originating from a candidate trajectory and carrying its own prior probability. The control device will weight these Gaussian distributions according to their respective prior probabilities, perform a weighted summation, and construct a Gaussian mixture model. This Gaussian mixture model outputs a complex probability distribution, its shape formed by the superposition of multiple Gaussian peaks. By numerically evaluating or sampling this Gaussian mixture model, the continuous occupancy probability density distribution at that future time point can be obtained, i.e., the probability density value of any point (x, y) in space being occupied by the dynamic obstacle. For certain regions (such as at the intersection of multiple high-probability candidate trajectories), the probability density will be very high, forming a high-probability occupancy region (i.e., the core occupied space location). Repeating this process at various future time points yields a series of time-varying occupied space locations and occupancy probability density distributions.
[0080] This embodiment incorporates environmental constraints (such as walls and roads) and interactions between obstacles into the prediction, more accurately determining the possible choices of obstacles and avoiding the prediction failure of pure physical motion models in complex social scenarios. It generates multiple candidate trajectories with prior probabilities, accurately capturing the various possibilities of dynamic obstacle behavior, allowing the robot to consider all possible scenarios simultaneously, rather than making decisions based solely on the most probable single path. Furthermore, by using a weighted Gaussian mixture model, it combines intention uncertainty with motion uncertainty, resulting in a non-Gaussian, multi-peaked time-varying occupancy probability distribution. This distribution is more representative of the real world than a simple Gaussian distribution, making the probability-based collision risk assessment more accurate, thereby effectively reducing false alarms and decision-making errors.
[0081] In one embodiment, step S32, which involves predicting the spatiotemporal collision probability distribution of a dynamic obstacle colliding with the robot in the future time period based on the robot's own motion state, occupied space position, and occupancy probability density distribution, specifically includes the following steps: S321: Based on the robot's own motion state and physical dimensions, predict the geometric envelope region of the robot at each time point within a preset time period in the future.
[0082] The geometric envelope region represents the physical shape and volume range occupied by the robot in space at a given time point; this geometric envelope region refers to the range that the robot occupies in space based on its actual physical shape (such as a circular outline with radius R).
[0083] Specifically, the control device first acquires the robot's current motion state (two-dimensional position, heading angle, linear velocity, angular velocity) and physical dimensions. Then, using a simplified motion prediction model (such as a constant velocity model or the kinematic model in step S40), the control device extrapolates the robot's predicted pose (including predicted position and orientation angle) at each discrete time point within a preset future time period, based on the current state and assumed future control inputs (or preliminary estimates based on optimization solutions). Next, based on the predicted pose and the robot's physical dimensions at each time point, a geometric envelope region is constructed for that moment. In one implementation, the robot can be abstracted as a oriented (orientation angle) rectangular region relative to its center point, or more simply, covered by a combination of multiple disks. This region is the continuous set of points actually occupied by the robot in space at that moment.
[0084] S322: Determine the occupancy probability density distribution of dynamic obstacles at the corresponding time point. The occupancy probability density distribution is used to characterize the probability of a dynamic obstacle appearing at a specific location in space.
[0085] The control device directly acquires the occupancy probability density distribution of dynamic obstacles at the corresponding time points. For each future discrete time point, the control device extracts the previously calculated occupancy probability density distribution of the dynamic obstacle.
[0086] For example, consider a continuous function f(x, y, t) defined on a two-dimensional plane. This function already reflects the probability density of an obstacle appearing at the spatial point (x, y) at time t. This distribution is typically approximated using a raster map or a radial basis function network to facilitate rapid subsequent integration.
[0087] S323: At each point in time within a preset future time period, the probability density distribution of the occupancy of dynamic obstacles is spatially overlapped and integrated within the geometric envelope region of the robot to obtain the collision probability value of the robot colliding with the dynamic obstacle at each point in time.
[0088] The control unit operates on a loop unit based on each future time point t. For the current time point tk, the control unit performs the following calculations: It obtains the predicted geometric envelope region of the robot at time point tk (e.g., a rectangle centered at (xe, ye), facing θe, with dimensions of 0.6 x 0.4 meters); it obtains the occupancy probability density distribution of obstacles at time point tk, denoted as ; and it calculates the collision probability mathematically, which is equivalent to performing a double integral over the probability density function of the obstacles within the robot's geometric envelope region. The result of this double integral is a scalar (a probability value between 0 and 1), physically representing the sum of probabilities that an obstacle occupies any point within the robot's geometric envelope region at the predicted time point tk (approximately the probability of the obstacle overlapping with the robot).
[0089] In other embodiments, this integral can be calculated rapidly using numerical methods. For example, the geometric envelope region can be divided into several small grids, the FOBS value can be calculated for the center point of each grid, and a weighted sum can be obtained to obtain an approximate integral value. By performing this operation for each future time point, a set of collision probability values related to time t can be obtained. S324: Summarize the collision probability values at each time point and map them to generate a spatiotemporal collision probability distribution that evolves continuously with time and spatial coordinates.
[0090] The control device combines the calculated discrete-time collision probability sequence with the robot's geometric envelope region at each time point to define a spatiotemporal mapping function. This function maps a future time t and a spatial point (x, y) to the probability of collision at that point. Since continuous construction in both time and space dimensions is required, it can be reconstructed based on the integration result of step S323.
[0091] Instead of using the robot's position as a variable, the goal is to obtain the probability of a collision at any spatial point. This spatial point can be treated as "the case where the robot happens to move there." The control device uses interpolation methods (such as spline interpolation or Kriging interpolation) to map the collision probability at each time point to all possible geometric envelopes covered by the robot at that time point; alternatively, the contribution of each spatial point to the collision probability can be recorded simultaneously during the discrete integration step and finally normalized to a distribution. The final output is a function (or a continuous interpolation version of the discrete grid) that describes the probability density of a collision between the dynamic obstacle and the robot at each point in space at every future time step. This is the spatiotemporal collision probability distribution that evolves continuously with time and spatial coordinates.
[0092] Compared to the common method of using the distance from the robot's center point to the obstacle as a safety indicator while ignoring the robot's size and shape, this scheme employs a spatial overlap integral method. This method combines the abstract probability distribution of obstacles with the specific physical shape of the robot to precisely calculate the collision probability at every future moment. Even if the robot's center point is far from the obstacle, if the robot's tail happens to be within the probability fluctuation range, it will still be detected, more realistically reflecting the physical probability of a collision. Furthermore, this scheme outputs not only a qualitative conclusion of danger / safety, but also a specific collision probability value (e.g., 0.03). This allows relevant personnel to set a uniform risk tolerance for the robot (e.g., a maximum permissible collision probability of 0.05) and use it directly as a constraint, facilitating systematic safety verification.
[0093] In one embodiment, step S33, which involves constructing a time-varying control barrier function for the robot based on the spatiotemporal collision probability distribution to determine the dynamic safety boundary constraints of the robot within a future predicted time, specifically includes the following steps: S331: Obtain the pre-calibrated collision probability threshold and determine the collision probability corresponding to each time point in the spatiotemporal collision probability distribution.
[0094] The pre-calibrated collision probability threshold is a constant set according to the safety requirement level, representing the maximum collision risk allowed by the system, such as 0.05 (meaning there is a 5% probability that a collision may occur).
[0095] The control device reads the pre-calibrated collision probability threshold from the system configuration file. Then, for each discrete future time point in the obtained spatiotemporal collision probability distribution (e.g., one point every 0.1 seconds), the control device extracts the collision probability value at that time point. Since the spatiotemporal collision probability distribution is a continuous spatiotemporal domain function, the control device slices this function at that time point to obtain a two-dimensional collision probability field map, i.e., the collision probability slice at that time point.
[0096] For example, at time t=1.5 seconds, the slices extracted from the spatiotemporal distribution show that the collision probability is 0.1 in one elliptical region in front of the robot and 0.02 in another region.
[0097] S332: Extract the contour of the continuous spatial region in the spatiotemporal collision probability distribution where the collision probability is greater than or equal to the collision probability threshold, and fit it on a two-dimensional plane to generate an elliptical boundary centered on the predicted obstacle position and expanding with uncertainty.
[0098] For each obtained two-dimensional collision probability field slice at each time point, the control device first applies threshold segmentation, that is, marks all grid cells with probability values greater than or equal to a preset threshold (e.g., 0.05), forming a binarized high-risk region mask. Since the probability values change continuously around the predicted obstacle location, this high-risk region is usually a continuous closed region. Next, the control device uses a contour extraction algorithm in image processing (such as the Marching Squares algorithm) to extract the smooth boundary point set of this high-risk region.
[0099] Then, the control device performs ellipse fitting on this set of boundary points (e.g., using least squares or a moment-of-inertia-based fitting method) to calculate an ellipse that best encloses the risk region. The center point of this ellipse is defined as the predicted center of the dynamic obstacle at that time point (which can be obtained through the weighted centroid of the probability distribution), and the major and minor axes of the ellipse reflect the expansion range of the collision risk region in different directions, respectively. Since the uncertainty represented by the Gaussian mixture model in step S31 increases with time, this ellipse will also gradually expand outward over time. The final elliptical boundary is the dynamic safety boundary based on the probability threshold at that time point.
[0100] S333: The position prediction function is constructed using the robot's running state at different time points as variables, and the spatial margin function is constructed using the elliptical boundary as the geometric reference of the position prediction function, thus obtaining the time-varying control barrier function.
[0101] The control device defines a position prediction function p(t), which takes the robot's current state (position, velocity, angular velocity) and a future time t as input, and predicts the robot's theoretical position at time t using a kinematic model. This position prediction function provides the computational basis for subsequent constraints.
[0102] Then, the control device constructs a spatial margin function based on the elliptical boundary obtained in step S332 at each future time point. The purpose of this spatial margin function is to calculate the distance from the robot's predicted position p(t) to the dynamic elliptical boundary. It is constructed as follows: let c(t) be the center of the ellipse at time t, and its shape be defined by its major and minor axes a(t) and b(t) and its orientation angle φ(t). A distance metric function d(p(t),t) based on elliptical geometry is defined to measure the shortest Euclidean distance between point p(t) and the elliptical boundary. When p(t) is inside the ellipse, d(p(t),t) is negative; when it is outside the ellipse, it is positive; and when it is on the boundary, it is zero.
[0103] Finally, this distance function is defined as a scalar output function h(x(t),t)=d(p(t),t)-dsafe, where x(t) is the robot's state at time t (including position information), and dsafe is a preset additional safety margin constant (such as 0 or 0.1 meters). This h(x(t),t) is the time-varying control barrier function. The larger its value, the farther the robot is from the risk area, and the higher the level of safety.
[0104] S334: Use the output of the time-varying control barrier function being greater than or equal to a preset safety threshold as a constraint condition to determine the dynamic safety boundary constraint of the robot within the future prediction time.
[0105] The control device transforms the constructed time-varying control barrier function into a strict constraint for subsequent trajectory optimization. Specifically, for the entire future prediction time domain (e.g., from the current time to 2 seconds in the future), the control device requires that at each planning time step (e.g., every 0.1 seconds), the output value of the time-varying control barrier function must be greater than or equal to a preset safety threshold.
[0106] Typically, safety means that the robot's predicted position must be outside the elliptical boundary with a safety margin; therefore, the safety threshold is set to 0. That is, the constraint is: h(x(tk),tk)>= 0, where tk belongs to all discrete time points within the future prediction time domain. The physical meaning of this constraint is very clear: it ensures that in every step of the future planning, the robot's predicted position is outside the danger probability region (ellipse) with at least one dsafe safety gap. Ultimately, this series of time-continuous constraints relating to the robot's state constitutes the dynamic safety boundary constraint. This constraint is added to the robot trajectory optimization function as a hard constraint or a soft constraint (corresponding to the penalty function method), forcing the optimization solver to find a control sequence that satisfies the safety requirements for all future time points.
[0107] In this embodiment, a clever method is provided to transform probabilistic safety constraints into deterministic geometric constraints by converting the complex spatiotemporal collision probability distribution into a series of geometrically intuitive elliptical boundaries and constructing a time-varying control barrier function accordingly. The elliptical boundaries provide a more compact and numerically optimized representation than the original probability field. Subsequent optimization solvers can perform rapid analytical derivations or algebraic calculations based on the elliptical equations when calculating gradients or handling constraints, avoiding expensive convolution or integration operations on the entire probability field in each iteration step, significantly improving the real-time performance of online solutions. Furthermore, the elliptical boundaries and their expansion over time intuitively visualize the risk areas that obstacles may occupy, facilitating engineers' debugging, understanding, and verification of system behavior. The concept of safety margin is directly reflected in the geometric distance from the elliptical boundaries, making the setting of safety hard constraints clear and explicit; the size and shape of the ellipse itself dynamically adjust according to the prediction uncertainty, providing conservative adaptive capabilities. When obstacle motion prediction is relatively certain (small variance, narrow ellipse), the safety boundary is close and the planned passage is wider; when the prediction is ambiguous or at a distant time point (large variance, wide ellipse), the boundary expands and the robot leaves more conservative avoidance space, thus realizing a dynamic safety strategy based on information quality.
[0108] In one embodiment, step S333 involves constructing a spatial margin function using the elliptical boundary as the geometric reference for the position prediction function to obtain the time-varying control barrier function. This specifically includes the following steps: S3331: Obtain the relative distance vector and relative velocity direction angle between the robot and the dynamic obstacle at each time point within a preset time period in the future, and determine the variance of the spatiotemporal collision probability of the dynamic obstacle at the corresponding time point.
[0109] Among them, the relative distance vector refers to the position vector from the robot to the dynamic obstacle; the relative velocity direction angle refers to the angle between the robot's velocity direction relative to the obstacle (or the opposite direction of the obstacle's velocity relative to the robot) and the relative distance vector; the spatiotemporal collision probability variance quantifies the approximate degree of uncertainty of the predicted position of the obstacle at that point in time.
[0110] The control device first calculates the difference vector between the robot's position at time t and the predicted center point of the obstacle, which is the relative distance vector. Then, it calculates the inverse vector between the robot's current velocity vector and this relative distance vector. Next, the control device extracts the overall dispersion of the obstacle occupancy probability distribution (Gaussian mixture model) at time t across the entire mixture model.
[0111] For example, the obstacle position variance matrix can be calculated, and its trace or eigenvalue can be regarded as a scalar index to measure the uncertainty at that point in time. Alternatively, the largest eigenvalue of the covariance matrix can be used directly as a simplified index to represent the degree of diffusion in the main directions of the spatiotemporal collision probability variance.
[0112] S3332: Calculate the major axis stretching increment of the elliptical boundary based on the magnitude of the relative distance vector, the angle between the relative velocity directions, and the variance of the spatiotemporal collision probability of the dynamic obstacle.
[0113] The control device defines and calculates a major axis stretching increment δa(t), which is used to adjust the length of the major axis of the ellipse so that the ellipse is extended longer in the direction of the robot's movement relative to the obstacle.
[0114] Specifically, a weighting factor related to the relative velocity direction angle θ(t) can be calculated, with the weighting factor between 0 and 1. For example, typically when the robot's movement direction is towards an obstacle, i.e., the angle between the relative distance vector and the robot's velocity direction is small, or the obstacle is directly in front of the robot and the relative movement trend is towards the robot, θ(t) is close to 0 degrees, requiring increased safety attention. Then, combining the magnitude of the relative distance vector ddist(t) (i.e., representing the straight-line distance from the robot to the predicted position) and the eigenvalue (or trace) of the spatiotemporal collision probability variance as a basic uncertainty measure σ²(t), the formula for calculating this major axis stretch increment can be: δa(t) = k * wangle(t) * (vrelative_max / ddist(t)) * σ(t), where k is an adjustable gain constant, vrelative_max is an estimated value of the relative velocity magnitude or a preset upper limit, and wangle(t) is the weighting factor, which is the absolute value of cosθ(t).
[0115] The above formula reflects that when the robot approaches the obstacle quickly (relative distance is small or relative speed is high), faces the obstacle in a relative direction (small angle leading to large wangle), and has high prediction uncertainty (large σ(t)), the ellipse should be stretched by the length δa to form a longer safety buffer.
[0116] S3333: Based on the major axis stretching increment, the major axis length of the elliptical boundary is adaptively stretched in the direction of motion of the dynamic obstacle to obtain the target elliptical boundary.
[0117] The control device acquires the parameters and definitions of the original elliptical boundary: the center point cobs(t), the original major axis length aorig(t), the minor axis length borig(t), and the orientation angle φ(t). Then, a major axis stretch increment δa(t) is applied in the original major axis direction, and the new major axis length is calculated: anew(t) = aorig(t) + δa(t). Here, the stretching direction should be limited to the direction of the obstacle's motion relative to the robot (i.e., the direction of the relative velocity vector or its projected component).
[0118] To maintain the orientation of the ellipse, the control device needs to rotate and adjust the elliptical matrix according to the relative motion direction. Assume the major axis of the original ellipse is φ(t), and the main relative velocity direction of the robot relative to the obstacle (or the direction of increased collision risk) is denoted as ψ(t). To achieve adaptive stretching, the control device first transforms the ellipse's coordinates to a direction referenced by ψ(t), stretches the major axis along this direction (i.e., increases the variance component in this direction), and then transforms it back to the original coordinate system. A more general and intuitive approach is to directly superimpose a matrix increment defined by δa(t) and the direction ψ(t) onto the ellipse shape matrix, and then perform eigenvalue decomposition to obtain the updated major and minor axes and direction. The ellipse obtained after this adaptive stretching is the target ellipse boundary; it appears longer or wider in the direction of greater relative motion tendency and relatively narrower in the lateral direction (the direction of slower relative motion), forming a streamlined structure.
[0119] S3334: Using the target elliptical boundary as the geometric reference of the position prediction function, a spatial margin function is constructed to obtain the time-varying control barrier function, so that the safety boundary formed by the time-varying control barrier function presents a streamlined structure in the spatiotemporal dimension.
[0120] The control device replaces the original elliptical boundary in step S332 with the target elliptical boundary generated in step S3333, and constructs a new spatial margin function based on this. The specific steps are consistent with step S333: using the target ellipse as the new geometric reference, the shortest distance from the robot's predicted position to the boundary of the target ellipse is calculated, and then a time-varying control barrier function is defined. Since the major axis of the target ellipse dynamically stretches according to the relative motion trend (i.e., the safety zone is stretched longer in the direction where the obstacle is rapidly approaching the robot, expanding the protection range), the safety boundary defined by this new time-varying control barrier function exhibits a streamlined structure in the spatiotemporal dimensions. That is, when facing an oncoming obstacle, the safety boundary appears more prominent and longer; while in the lateral direction of the obstacle or in the direction away from the robot, the boundary is relatively contracted. The physical meaning of this structure is that the robot will have more extra space to react in the potential direction of impact, while allowing for closer passage in other directions.
[0121] Compared to solutions that typically use circular or fixed ellipsoidal safety boundaries, resulting in excessive restrictions on robot movement, this solution introduces an elliptical adaptive stretching mechanism based on relative motion relationships. This allows for more pre-emptive space, making safety constraints more conservative in critical collision directions and more lenient in other directions. This streamlined boundary closely resembles the psychological safety model of human drivers; when faced with a high-speed approaching object, we maintain a greater distance earlier and over a wider area. Using this boundary for model predictive control, the robot naturally tends to bypass obstacles from behind (due to less lateral constraint) rather than directly cutting across obstacles from the front (because the front constraint is stretched), thus generating a more predictable and human-like obstacle avoidance trajectory. Furthermore, the major and minor axes adapt online based on real-time sensor data (such as relative velocity and collision direction), enabling the safety boundary to respond instantly to environmental changes, achieving highly effective behavioral adaptation with extremely low computational cost.
[0122] In one embodiment, step S60, which involves controlling the robot's motion based on the desired linear velocity and desired angular velocity, specifically includes the following steps: S61: Obtain the system's real-time estimate of the robot's wheel-to-ground slip ratio and external resistance torque in the current environment.
[0123] Wheel slip ratio refers to the percentage difference between the actual speed and the theoretically predicted speed of a robot's drive wheels when they contact the ground, due to friction or looseness of the ground. In wheeled robots, slippage causes the robot's actual walking distance to be less than the theoretical walking distance calculated from motor rotation. External resistance torque refers to the resistance torque acting on the robot's chassis caused by external factors such as uneven road surfaces, inclination, collisions with obstacles, or changes in load. This torque is a disturbance torque that interferes with the robot's precise speed control.
[0124] The control unit acquires these two parameters through a combination of sensing and dynamic estimation. For the wheel-to-ground slip ratio, the control unit compares the actual acceleration and angular velocity measured by the inertial measurement unit with the expected velocity calculated by the encoder, and estimates the real-time slip ratio of the drive wheel online through a sliding mode observer or Kalman filter.
[0125] For example, when a robot travels on sand or slippery ground, the encoder may report a high wheel rotation rate, but the inertial measurement unit may measure a low actual forward speed. The slip ratio estimator will then calculate a large slip ratio (e.g., 20%). For external resistance torque, the control device can indirectly estimate it by recording the difference between the real-time output torque (or current) of the motor and the expected driving torque calculated based on the kinematic model. When the robot begins to climb an incline, the controller naturally increases the current to maintain a constant speed. The system compares this increased torque with the component predicted by the model for flat ground; the difference is the external resistance torque caused by the incline.
[0126] S62: Input the desired linear velocity and desired angular velocity into the robot's underlying dynamic control model to calculate the theoretical target torque.
[0127] The underlying dynamics control model describes the physical characteristics of the robot, such as the relationship between drive motor torque, mass, moment of inertia, wheel radius, and the robot's linear velocity and angular velocity.
[0128] The control device receives the desired linear velocity and desired angular velocity calculated in step S50. Then, it performs inverse dynamics calculations using a pre-defined robot dynamics model. For example, for differential drive wheels, this model is typically based on the physical formulas of the Newton-Euler method: the overall linear velocity of the robot can be obtained from the average of the velocities of the left and right wheels, and the angular velocity is obtained by dividing the velocity difference by the wheelbase; conversely, the target rotational speeds of the left and right wheels can be calculated from the desired linear velocity and desired angular velocity through inverse kinematics. Then, using the wheel load model and the motor armature model, the target wheel rotational speed is converted into the theoretical target torque of the motor.
[0129] S63: Based on the current wheel-to-ground slip ratio and external resistance torque, inverse dynamics feedforward compensation is performed on the theoretical target torque to calculate the target driving torque in the robot.
[0130] The control device uses the estimated wheel slip ratio and external resistance torque as feedforward compensation quantities to perform slip compensation and external resistance torque compensation on the obtained ideal driving torque in order to obtain the target driving torque.
[0131] Regarding slip compensation, if the slip ratio is s (its value is between 0 and 1), it means that the wheel actually slips against the ground, wasting some rotational energy. To achieve the same desired ground speed under slipping conditions, a higher motor speed (and thus a higher torque) is required to overcome the efficiency loss caused by slipping. The specific compensation value can be obtained by interpolation from a pre-calibrated slip-torque curve. For external resistance torque compensation, its estimated value is directly added as a feedforward term to the theoretical torque. Through this feedforward compensation, the dynamic control model can proactively and in advance compensate for additional demands caused by road surface changes or system non-ideals, rather than passively adjusting after the feedback control detects an error.
[0132] S64: Convert the target driving torque into motor driving signals and output them to the drive motor to control the robot to perform smooth obstacle avoidance.
[0133] The target drive torque calculated by the control unit (usually two torque values for the left and right drive wheels respectively) is converted into a drive signal that the motor driver can receive. The most common conversion is achieved through current control: motor torque is proportional to the current flowing through the motor armature. Therefore, the control unit converts the target torque into a target current value based on the motor torque constant, and then inputs this target current value to the motor's current loop PID controller to calculate the corresponding PWM (Pulse Width Modulation) duty cycle signal. This PWM signal is sent to the motor driver (such as an H-bridge circuit), which adjusts the average voltage across the motor according to the duty cycle, thereby controlling the current flowing through the motor to generate the desired torque.
[0134] Since the calculated target driving torque already includes slippage and drag compensation, the driving torque is precisely adjusted to just overcome external disturbances and smoothly drive the wheels to rotate, allowing the robot's actual linear and angular velocities to closely follow the expected value. The entire obstacle avoidance control therefore exhibits smooth and compliant characteristics, without violent shaking or abrupt speed changes caused by sudden changes in ground friction or collisions with small obstacles.
[0135] Traditional pure feedback control (such as PID) often requires waiting for speed errors to occur before adjusting when encountering slippage or uphill conditions, resulting in response delays and a tendency for overshoot and oscillations. In this embodiment, by introducing inverse dynamics feedforward compensation based on wheel-ground slip ratio and external resistance torque, additional force can be applied immediately and predictively, thereby completely eliminating motion trajectory fluctuations caused by environmental disturbances. This ensures that the robot runs accurately and smoothly along the path planned by model predictive control, thus improving the robot's underlying motion control adaptability to complex unstructured environments.
[0136] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0137] In one embodiment, a control device is provided, which corresponds one-to-one with the dynamic obstacle prediction and avoidance method for robots described in the above embodiments. For example... Figure 5 As shown, the functional modules in this control device are described in detail below: The monitoring module 501 is used to monitor the robot's own motion state and the motion state of obstacles within a preset range around the robot in real time. The identification module 502 is used to identify dynamic obstacles based on the motion state of all obstacles at different times, and to determine the historical motion trajectory sequence of the dynamic obstacles within a preset historical time period. The determination module 503 is used to construct a time-varying control barrier function for the robot based on the historical motion trajectory sequence and the robot's own motion state, so as to determine the dynamic safety boundary constraint of the robot in the future prediction time; the time-varying control barrier function is used to quantify the spatiotemporal safety margin between the robot's motion state and dynamic obstacles; Module 504 is used to construct a robot trajectory optimization function based on the nonlinear kinematic model of the robot, with the goal of minimizing the deviation between the robot's future predicted trajectory and the global target reference trajectory corresponding to the robot's target position. The solver module 505 is used to solve the robot trajectory optimization function in real time online with dynamic safety boundary constraints and the robot's physical execution limits as constraints, and calculate the robot's expected linear velocity and expected angular velocity in the current control cycle. The control module 506 is used to control the robot's motion based on the desired linear velocity and desired angular velocity to avoid dynamic obstacles.
[0138] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0139] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0140] This application also provides an electronic device, such as... Figure 6 As shown, the electronic device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor. When the processor executes the computer program, it implements the steps in any of the above method embodiments, or when the processor executes the computer program, it implements the functions of each module / unit in the above device embodiments.
[0141] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.
[0142] Those skilled in the art will understand that Figure 6 The electronic device described is merely an example and does not constitute a limitation on the electronic device. It may include more or fewer components than shown, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0143] The aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), or field-programmable gate arrays (FPGAs). Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0144] The memory can be an internal storage unit of the electronic device, such as a hard drive or RAM. The memory can also be an external storage device of the electronic device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory can include both internal and external storage units of the electronic device.
[0145] This application also provides a readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.
[0146] This application provides a computer program product that, when run on an electronic device, enables the electronic device to perform the steps described in the various method embodiments above.
[0147] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0148] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0149] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0150] In the embodiments provided in this application, it should be understood that the disclosed apparatus / devices and methods can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0151] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0152] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for dynamic obstacle prediction and avoidance in robots, characterized in that, include: The robot's own motion state, as well as the motion state of obstacles within a preset range around the robot, are monitored in real time. Based on the motion state of all the obstacles at different times, dynamic obstacles are identified, and the historical motion trajectory sequence of the dynamic obstacles within a preset historical time period is determined. Based on the historical motion trajectory sequence and the robot's own motion state, a time-varying control barrier function is constructed for the robot to determine the dynamic safety boundary constraints of the robot within a future predicted time. The time-varying control barrier function is used to quantify the spatiotemporal safety margin between the robot's motion state and the dynamic obstacle. Based on the nonlinear kinematic model of the robot, a robot trajectory optimization function is constructed with the objective of minimizing the deviation between the robot's future predicted trajectory and the global target reference trajectory corresponding to the robot's target position. Using the dynamic safety boundary constraints and the physical execution limit of the robot as constraints, the robot trajectory optimization function is solved in real time online to calculate the robot's expected linear velocity and expected angular velocity in the current control cycle. The robot's motion is controlled based on the desired linear velocity and desired angular velocity to avoid dynamic obstacles.
2. The method as described in claim 1, characterized in that, The control of the robot's motion based on the desired linear velocity and desired angular velocity includes: The system obtains the robot's wheel-to-ground slip ratio and external drag torque in real time under the current environment; The desired linear velocity and the desired angular velocity are input into the robot's underlying dynamic control model to calculate the theoretical target torque; Based on the current wheel-to-ground slip ratio and external resistance torque, inverse dynamics feedforward compensation is performed on the theoretical target torque to calculate the target driving torque in the robot; The target driving torque is converted into motor driving signals and output to the drive motor to control the robot to perform smooth obstacle avoidance.
3. The method as described in claim 1, characterized in that, The step of constructing a time-varying control barrier function for the robot based on the historical motion trajectory sequence and the robot's own motion state to determine the dynamic safety boundary constraints of the robot within the predicted future time period includes: Based on the historical motion trajectory sequence of the dynamic obstacle and the environmental information around the robot, the occupancy of the dynamic obstacle in the surrounding environmental space within a future preset time period is predicted, and the occupancy space location and occupancy probability density distribution of the dynamic obstacle within the future preset time period are obtained. Based on the robot's own motion state, the occupied space location, and the occupancy probability density distribution, the spatiotemporal collision probability distribution of the dynamic obstacle colliding with the robot in the future time period is predicted. Based on the spatiotemporal collision probability distribution, a time-varying control barrier function for the robot is constructed to determine the dynamic safety boundary constraints of the robot within the predicted future time.
4. The method as described in claim 3, characterized in that, The step of constructing a time-varying control barrier function for the robot based on the spatiotemporal collision probability distribution to determine the dynamic safety boundary constraints of the robot within the predicted future time period includes: Determine the collision probability corresponding to each time point in the spatiotemporal collision probability distribution; Contour extraction is performed on the continuous spatial region in the spatiotemporal collision probability distribution where the collision probability is greater than or equal to the collision probability threshold, and an elliptical boundary is fitted on a two-dimensional plane with the predicted obstacle position as the center and expanding with uncertainty. A position prediction function is constructed using the robot's running state at different time points as variables, and a spatial margin function is constructed using the elliptical boundary as the geometric reference of the position prediction function, thus obtaining the time-varying control barrier function; The dynamic safety boundary constraint of the robot within the predicted future time is determined by using the output of the time-varying control barrier function being greater than or equal to a preset safety threshold as a constraint condition.
5. The method as described in claim 1, characterized in that, The real-time monitoring of the robot's own motion state and the motion state of obstacles within a preset range around the robot relative to the robot includes: Using an inertial measurement unit and encoder installed on the robot, the robot's two-dimensional position, heading angle, linear velocity, and angular velocity are collected in real time to monitor the robot's motion state. The robot uses a lidar and depth camera mounted on it to collect raw point cloud and image data of the surrounding environment. A multi-target tracking algorithm is used to obtain the relative position, relative velocity, and relative acceleration of obstacles within a preset range relative to the robot, so as to monitor the motion state of the obstacles relative to the robot.
6. The method according to any one of claims 1-5, characterized in that, The process of identifying dynamic obstacles based on the motion states of all obstacles at different times and determining the historical motion trajectory sequence of the dynamic obstacles within a preset historical time period includes: Based on the motion state of all the obstacles at different times, the relative velocity modulus of each obstacle in a continuous time frame is calculated, and obstacles with relative velocity modulus greater than a preset velocity threshold are identified as dynamic obstacles. Based on the motion state of the dynamic obstacle at different times, the continuous position points of the dynamic obstacle within a preset historical time period are extracted in chronological order to obtain the historical motion trajectory sequence.
7. A dynamic obstacle prediction and avoidance system for robots, characterized in that, The system includes a robot and a control device, the control device being used to perform the dynamic obstacle prediction and avoidance method for a robot according to any one of claims 1-6; the control device includes: The monitoring module is used to monitor the robot's own motion state and the motion state of obstacles within a preset range around the robot relative to the robot in real time. The identification module is used to identify dynamic obstacles based on the motion states of all the obstacles at different times, and to determine the historical motion trajectory sequence of the dynamic obstacles within a preset historical time period. The determination module is used to construct a time-varying control barrier function for the robot based on the historical motion trajectory sequence and the robot's own motion state, so as to determine the dynamic safety boundary constraint of the robot within a future prediction time; the time-varying control barrier function is used to quantify the spatiotemporal safety margin between the robot's motion state and the dynamic obstacle; A construction module is used to construct a robot trajectory optimization function based on the nonlinear kinematic model of the robot, with the objective of minimizing the deviation between the robot's future predicted trajectory and the global target reference trajectory corresponding to the robot's target position; The solution module is used to solve the robot trajectory optimization function in real time online, using the dynamic safety boundary constraints and the robot's physical execution limit as constraints, and to calculate the robot's expected linear velocity and expected angular velocity in the current control cycle. The control module is used to control the robot's motion based on the desired linear velocity and desired angular velocity to avoid dynamic obstacles.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the dynamic obstacle prediction and avoidance method for a robot as described in any one of claims 1 to 6.
9. A readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the dynamic obstacle prediction and avoidance method for robots as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the dynamic obstacle prediction and avoidance method for a robot as described in any one of claims 1 to 6.
