Robot obstacle avoidance method and device suitable for dynamic obstacles
By pre-storing the system delay time and reinforcement learning model during the robot charging process, the spatial position information of dynamic obstacles is compensated in real time, and the problem of prediction deviation of the robot's motion trajectory in complex environments is solved, reducing the risk of collision.
Patent Information
- Application Number
- CN202510792005.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-06-13
AI Technical Summary
The robot has deviations in predicting the motion trajectory of dynamic obstacles in complex dynamic environments, resulting in an increase in the risk of collision. The existing technology cannot effectively reduce the risk of collision.
By quantizing and pre-storing the system delay time during the robot charging process, combining pre-trained reinforcement learning models, the current spatial position information of dynamic obstacles is compensated in real time, and the motion trajectory prediction is optimized.
More accurate prediction of dynamic obstacle motion trajectory is achieved, reducing the risk of collision between robots and dynamic obstacles.
Smart Images

Figure CN120335458B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robotics technology, and in particular to a robot obstacle avoidance method and device suitable for dynamic obstacles. Background Art
[0002] When robots are used in complex dynamic environments (such as transportation hubs or public venues), they need to move safely and efficiently between high-speed moving objects (such as pedestrians, vehicles or cargo) while avoiding collisions with these dynamic obstacles.
[0003] In related technologies, the robot first obtains environmental perception information through sensors, then uses the environmental perception information to detect the spatial position information of dynamic obstacles, and finally predicts the motion trajectory of the dynamic obstacle based on the spatial position information, and avoids obstacles based on the motion trajectory.
[0004] However, the motion trajectory predicted in this method is only the actual result at the historical moment when the robot obtains environmental perception information. As the robot's service time increases, the processing performance decreases. At this time, it takes a certain amount of time to detect and predict actions. At this time, for high-speed moving dynamic obstacles, the result is not the result corresponding to the robot's spatial position information at the current moment. Therefore, motion prediction deviation occurs, which increases the risk of collision and reduces the safety of the robot. Summary of the Invention
[0005] The embodiments of this application provide a method and apparatus for robot obstacle avoidance in dynamic obstacles. To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is provided below. This summary is not intended to be a comprehensive review, identify key or important elements, or delineate the scope of protection for these embodiments. Its sole purpose is to present some concepts in a simplified form, serving as a prelude to the detailed description that follows.
[0006] In a first aspect, an embodiment of the present application provides a robot obstacle avoidance method applicable to dynamic obstacles, which is applied to a robot and includes:
[0007] Acquire environmental perception information in real time while traveling along the preset route;
[0008] When a dynamic obstacle is determined to exist within a preset range based on environmental perception information, the current spatial position information of the dynamic obstacle and the pre-stored system delay duration are obtained; the pre-stored system delay duration is obtained by quantifying and storing the processing performance of the robot during the charging process;
[0009] According to the pre-stored system delay time, the current spatial position information is compensated for the spatial position to obtain the actual spatial position information of the dynamic obstacle;
[0010] Predict the obstacle trajectory of dynamic obstacles based on the actual spatial position information;
[0011] Based on the obstacle trajectory, the robot is controlled to avoid obstacles.
[0012] In a second aspect, an embodiment of the present application provides a robot obstacle avoidance device suitable for dynamic obstacles, the device comprising:
[0013] An environmental perception information acquisition module is used to obtain environmental perception information in real time while traveling along a preset route;
[0014] The system delay duration acquisition module is used to obtain the current spatial position information of the dynamic obstacle and the pre-stored system delay duration when the presence of the dynamic obstacle is determined to exist within the preset range based on the environmental perception information. The pre-stored system delay duration is obtained by quantifying and storing the processing performance of the robot during the charging process.
[0015] The spatial position compensation module is used to perform spatial position compensation on the current spatial position information according to the pre-stored system delay time to obtain the actual spatial position information of the dynamic obstacle;
[0016] The obstacle trajectory prediction module is used to predict the obstacle trajectory of dynamic obstacles based on the actual spatial position information;
[0017] The obstacle avoidance control module is used to control the robot to avoid obstacles based on the obstacle trajectory.
[0018] The technical solutions provided by the embodiments of the present application may have the following beneficial effects:
[0019] In the embodiments of the present application, on the one hand, by quantifying the processing performance and pre-storing the system delay time during the robot charging process, the pre-stored system delay time is calculated and stored in advance, avoiding the time consumption caused by real-time calculation, so that the delay time can be quickly queried during the movement process to compensate for the current spatial position information of the dynamic obstacle, thereby obtaining actual spatial position information that is closer to the actual situation, based on which more accurate motion trajectory prediction can be made, which can effectively overcome motion prediction deviation. On the other hand, by loading a pre-trained reinforcement learning model, the spatial position calculation network in the model can take into account the impact of system delay and make more accurate calculations of the actual spatial position of the dynamic obstacle. The reinforcement learning network further optimizes the prediction results through feature enhancement, thereby outputting the predicted displacement delayed by the dynamic obstacle, allowing the robot to more accurately predict the motion trajectory of the dynamic obstacle, thereby reducing the risk of collision.
[0020] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0022] Figure 1 This is a flowchart of a method for robot obstacle avoidance applicable to dynamic obstacles provided by an embodiment of the present application;
[0023] Figure 2 This is a schematic diagram of an obstacle provided in an embodiment of the present application;
[0024] Figure 3 This is a schematic diagram of the trajectory of a dynamic obstacle provided in an embodiment of the present application;
[0025] Figure 4 This is a flow chart of a model training method for a reinforcement learning model provided in an embodiment of the present application;
[0026] Figure 5 This is a schematic diagram of the architecture of a spatial position calculation network provided in an embodiment of the present application;
[0027] Figure 6 This is a schematic structural diagram of a robot obstacle avoidance device suitable for dynamic obstacles provided in an embodiment of the present application;
[0028] Figure 7 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The following description and the drawings sufficiently illustrate specific embodiments of the application to enable those skilled in the art to practice them.
[0030] It should be clear that the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0031] When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are merely examples of devices and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0032] In the description of this application, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances. In addition, in the description of this application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship.
[0033] At present, the robot first obtains environmental perception information through sensors, then uses the environmental perception information to detect the spatial position information of dynamic obstacles, and finally predicts the motion trajectory of the dynamic obstacle based on the spatial position information, and avoids obstacles based on the motion trajectory.
[0034] The inventors realized that the motion trajectory predicted in this method is only the real result at the historical moment when the robot obtained environmental perception information. As the service time of the robot increases, the processing performance decreases. At this time, it takes a certain amount of time to complete the detection and prediction of actions. At this time, for high-speed moving dynamic obstacles, the result is not the result corresponding to the robot's spatial position information at the current moment. Therefore, motion prediction deviation occurs, which increases the risk of collision and reduces the safety of the robot.
[0035] In order to solve the above problems, the present application provides a robot obstacle avoidance method and device suitable for dynamic obstacles to solve the problems existing in the above-mentioned related technical problems. In the embodiment of the present application, on the one hand, by quantifying the processing performance and pre-storing the system delay time during the robot charging process, the pre-stored system delay time is calculated and stored in advance, avoiding the time consumption caused by real-time calculation, so that the delay time can be quickly queried during the movement process to compensate for the current spatial position information of the dynamic obstacle, thereby obtaining the actual spatial position information that is closer to the actual situation, based on which a more accurate motion trajectory prediction can be made, which can effectively overcome the motion prediction deviation. On the other hand, by loading a pre-trained reinforcement learning model, the spatial position calculation network in the model can take into account the influence of system delay and make more accurate calculations of the actual spatial position of the dynamic obstacle. The reinforcement learning network further optimizes the prediction results through feature enhancement, thereby outputting the predicted displacement delayed by the dynamic obstacle, so that the robot can more accurately predict the motion trajectory of the dynamic obstacle, thereby reducing the risk of collision. The following is a detailed description using an exemplary embodiment.
[0036] The following will be combined with the Figure 1 -Attached Figure 5This article details a method for avoiding dynamic obstacles in a robot, as provided in an embodiment of the present application. This method can be implemented using a computer program and run on a von Neumann-based robot obstacle avoidance device for dynamic obstacles. This computer program can be integrated into an application or run as a standalone tool.
[0037] See Figure 1 , provides a flow chart of a robot obstacle avoidance method applicable to dynamic obstacles in the embodiment of the present application, which is applied to the robot. Figure 1 As shown, the method of the embodiment of the present application includes the following steps:
[0038] S101, while the robot is moving along a preset route, it obtains environmental perception information in real time;
[0039] The preset route is the path that the robot has planned before performing a task. Environmental perception information is the information about the surrounding environment collected by the robot through sensors.
[0040] In some embodiments of the present application, before a task begins, the robot uses a path planning algorithm to generate a path from the starting point to the end point. This path takes into account static obstacles in the environment and ensures that the robot can complete the task efficiently. The robot is equipped with a lidar, camera, and ultrasonic sensor.
[0041] Specifically, the LiDAR system scans the surrounding environment at high frequency, detecting the distance to objects within a certain range around the robot. The camera identifies the shape and color of objects. When the robot approaches an obstacle, the ultrasonic sensor detects it and feeds this information back to the control system.
[0042] In some embodiments of the present application, after receiving data from the laser radar, camera, and ultrasonic sensor, the robot's control system filters the data collected by the sensors to remove noise and outliers. The data collected by different sensors are fused to obtain more comprehensive environmental perception information. Based on the comprehensive environmental perception information, it can be determined whether there are dynamic obstacles within the preset range. The final judgment result is, for example, Figure 2 As shown, there is a dynamic obstacle within the preset range. The dynamic obstacle can be identified using existing visual algorithms, which will not be described here.
[0043] S102: When the robot determines that a dynamic obstacle exists within a preset range based on environmental perception information, the robot obtains current spatial position information of the dynamic obstacle and a pre-stored system delay duration; the pre-stored system delay duration is obtained by quantifying and storing the processing performance of the robot during the charging process;
[0044] Dynamic obstacles, such as pedestrians and vehicles, are obstacles whose position and speed change during the robot's movement. Current spatial position information is the precise location of the dynamic obstacle at the current moment, including its coordinates in three-dimensional space. Pre-stored system delay is the system processing delay calculated and stored in advance during the robot's charging process. It reflects the time required for the robot to acquire environmental perception information and generate an obstacle trajectory.
[0045] In some embodiments of the present application, when it is determined based on environmental perception information that there are no dynamic obstacles within a preset range, the vehicle travels along a preset route.
[0046] In other embodiments of the present application, when it is determined that there is a dynamic obstacle within a preset range based on environmental perception information, the robot measures the current spatial position information of the dynamic obstacle through a lidar, and obtains the pre-stored system delay duration corresponding to the historical moment closest to the current moment.
[0047] In some embodiments of the present application, the specific process of generating the pre-stored system delay time includes: during the robot charging process, obtaining the current load of the processor and the task queue length as processor operating parameters; at the same time, extracting the detection function for detecting the spatial position information of dynamic obstacles and the prediction function for predicting dynamic obstacles; in the simulation platform, creating virtual spatial position information of dynamic virtual obstacles; performing simulation operation of the obstacle operation trajectory based on the virtual spatial position information, the detection function and the prediction function; counting the function execution time of the simulation operation process; determining the processor running time of the processor based on the current load and the task queue length; accumulating the function execution time and the processor running time, and storing the accumulated result to obtain the pre-stored system delay time.
[0048] The current load and task queue length are used to evaluate the processor's current performance and processing power. The detection function is an algorithm or function used to detect the spatial position of dynamic obstacles. For example, a detection function based on lidar data is used to determine the coordinates of an obstacle. The prediction function is an algorithm or function used to predict the future trajectory of a dynamic obstacle. The simulation platform is a virtual testing environment that simulates the obstacle detection and prediction process in real-world scenarios. Function execution time is the actual time consumed by the detection and prediction functions during the simulation. Processor runtime is used to evaluate the processor's processing power in its current state.
[0049] For example, while the robot is charging, run a performance test program to obtain the current load of the processor and the length of the task queue.
[0050] Extract the detection and prediction functions from the robot's software system. Create a virtual environment in a simulation platform (such as Gazebo) and set up a dynamic virtual obstacle.
[0051] Assume that a virtual obstacle moves in a straight line at a speed of 1 meter per second, with its initial position at (x=0, y=0, z=0). Detection and prediction functions are run on the simulation platform to simulate the obstacle's trajectory. The virtual obstacle's current spatial position is obtained from the simulation platform. The detection function is used to calculate the current spatial position, and the prediction function is used to predict the future position. During the simulation, a high-precision timer is used to record the execution time of the detection and prediction functions. The function execution time is added to the processor runtime to obtain the system latency. An example of system latency is shown in Table 1.
[0052] Table 1
[0053]
[0054] S103, the robot performs spatial position compensation on the current spatial position information according to the pre-stored system delay time to obtain the actual spatial position information of the dynamic obstacle;
[0055] Among them, spatial position compensation is to adjust the current spatial position information of the dynamic obstacle according to the pre-stored system delay duration to compensate for the position deviation caused by the system processing delay.
[0056] In some embodiments of the present application, the specific process of performing spatial position compensation on the current spatial position information based on the pre-stored system delay time to obtain the actual spatial position information of the dynamic obstacle includes: calculating the instantaneous linear velocity and instantaneous acceleration of the dynamic obstacle based on the current spatial position information and the historical spatial position information of the dynamic obstacle at the previous moment; determining the predicted displacement delayed by the dynamic obstacle based on the pre-stored system delay time, the instantaneous linear velocity and the instantaneous acceleration; performing displacement decomposition on the predicted displacement in the horizontal and vertical coordinates of the coordinate system to obtain the horizontal coordinate compensation component and the vertical coordinate compensation component; using the horizontal coordinate compensation component and the vertical coordinate compensation component to perform spatial position compensation on the current spatial position information to obtain the actual spatial position information of the dynamic obstacle.
[0057] The instantaneous linear velocity is the linear velocity of a dynamic obstacle at a given moment, representing the distance it travels along a straight line per unit time. The instantaneous acceleration is the acceleration of a dynamic obstacle at a given moment, representing the rate of change of its velocity. Displacement decomposition decomposes the predicted displacement into components along the abscissa (x-axis) and ordinate (y-axis). The abscissa compensation component is the component of the predicted displacement along the abscissa (x-axis). The ordinate compensation component is the component of the predicted displacement along the ordinate (y-axis). Spatial position compensation adjusts the dynamic obstacle's current spatial position based on the abscissa and ordinate compensation components.
[0058] In an embodiment of the present application, the specific process of determining the predicted displacement delayed by a dynamic obstacle based on the pre-stored system delay duration, instantaneous linear velocity, and instantaneous acceleration includes: calling a preset obstacle position compensation model; using the pre-stored system delay duration, instantaneous linear velocity, and instantaneous acceleration as model parameters of the preset obstacle position compensation model to obtain a parameter-supplemented model expression; executing the parameter-supplemented model expression to obtain the predicted displacement delayed by the dynamic obstacle; wherein the model expression of the preset obstacle position compensation model is:
[0059]
[0060] in, To predict displacement, is the instantaneous linear velocity of the dynamic obstacle, is the instantaneous acceleration of the dynamic obstacle, Processing delay time for the system;
[0061] The calculation formula for the actual spatial position information of the dynamic obstacle is:
[0062] ;
[0063] in, is the actual spatial location information, is the horizontal axis compensation component, is the ordinate compensation component, is the horizontal coordinate of the current spatial position information, It is the vertical coordinate of the current spatial position information.
[0064] For example, a robot detects a dynamic obstacle during operation. Its current spatial position is (x=3 meters, y=2 meters), and its previous historical spatial position is (x=2.8 meters, y=1.9 meters). The system delay is 0.2 seconds. The specific compensation process is as follows:
[0065] Calculate instantaneous linear velocity and instantaneous acceleration: Instantaneous linear velocity ;
[0066] Assume that the instantaneous acceleration at the current moment is , calculate the predicted displacement:
[0067] Predicted displacement, .
[0068] Displacement decomposition: abscissa compensation component (Assume that the angle between the motion direction and the x-axis is ), the vertical axis compensation component ;
[0069] Spatial position compensation: actual spatial position information after compensation:
[0070] , .
[0071] In an embodiment of the present application, the specific process of determining the predicted displacement delayed by a dynamic obstacle based on the pre-stored system delay duration, instantaneous linear velocity, and instantaneous acceleration includes: loading a pre-trained reinforcement learning model; inputting the pre-stored system delay duration, instantaneous linear velocity, and instantaneous acceleration into the pre-trained reinforcement learning model; the reinforcement learning model includes a spatial position calculation network for calculating the actual spatial position of the dynamic obstacle and a reinforcement learning network for feature reinforcement; and outputting the predicted displacement delayed by the dynamic obstacle.
[0072] S104, the robot predicts the obstacle trajectory of the dynamic obstacle based on the actual spatial position information;
[0073] In some embodiments of the present application, the specific process of predicting the obstacle trajectory of a dynamic obstacle based on the actual spatial position information includes: constructing a second-order kinematic model; wherein the model expression of the second-order kinematic model is:
[0074]
[0075] in, and Is a dynamic obstacle in the future The predicted position coordinates at the time, For the current moment, The time interval for future trajectory prediction, and is the actual spatial position information of the dynamic obstacle after system delay compensation, and Is a dynamic obstacle in Axis and The current velocity component in the axis direction, To pre-store the system delay time, and Is a dynamic obstacle in Axis and The acceleration component in the axial direction; based on the actual spatial position information and the current speed of the dynamic obstacle, the motion trend of the dynamic obstacle is calculated in combination with the second-order kinematic model; the position sequence of multiple time points under the motion trend is plotted to obtain discrete position points; the discrete position points are connected as line segments to obtain the obstacle trajectory of the dynamic obstacle. The obstacle trajectory of the dynamic obstacle is as follows: Figure 3 shown.
[0076] S105 , the robot is controlled to avoid obstacles based on the obstacle trajectory.
[0077] In some embodiments of the present application, the specific process of controlling the robot to avoid obstacles based on the obstacle trajectory includes: determining the obstacle avoidance path by referring to the obstacle trajectory; generating the optimal obstacle avoidance path instruction according to the obstacle avoidance path; and using the optimal obstacle avoidance path instruction in combination with the PID controller to drive the motor to perform steering / speed regulation operations to avoid obstacles.
[0078] In the embodiments of the present application, on the one hand, by quantifying the processing performance and pre-storing the system delay time during the robot charging process, the pre-stored system delay time is calculated and stored in advance, avoiding the time consumption caused by real-time calculation, so that the delay time can be quickly queried during the movement process to compensate for the current spatial position information of the dynamic obstacle, thereby obtaining actual spatial position information that is closer to the actual situation, based on which more accurate motion trajectory prediction can be made, which can effectively overcome motion prediction deviation. On the other hand, by loading a pre-trained reinforcement learning model, the spatial position calculation network in the model can take into account the impact of system delay and make more accurate calculations of the actual spatial position of the dynamic obstacle. The reinforcement learning network further optimizes the prediction results through feature enhancement, thereby outputting the predicted displacement delayed by the dynamic obstacle, allowing the robot to more accurately predict the motion trajectory of the dynamic obstacle, thereby reducing the risk of collision.
[0079] See Figure 4 , provides a flow chart of a model training method for a pre-trained reinforcement learning model in an embodiment of the present application. Figure 4 As shown, the method of the embodiment of the present application may include the following steps:
[0080] S201, building a robot obstacle avoidance simulation environment including dynamic obstacles;
[0081] S202, controlling the simulated robot to interact with the simulated obstacle in the robot obstacle avoidance simulation environment;
[0082] S203, during the interaction process, collecting a preset number of multiple quadruple data;
[0083] Each quadruple data set includes the simulation system delay duration, the current spatial position of the simulated obstacle, and the actual spatial position of the simulated obstacle. The simulation system delay duration is obtained by simulating the processing time of the simulated robot under different loads. The current spatial position of the simulated obstacle is the initial position of the simulated obstacle before trajectory prediction, and the actual spatial position of the simulated obstacle is the final position of the simulated obstacle after trajectory prediction is completed.
[0084] S204, using a neural network algorithm to create a spatial position calculation network for calculating the actual spatial position of the dynamic obstacle and a reinforcement learning network for feature enhancement;
[0085] S205, integrating network parameters of the spatial position calculation network and the reinforcement learning network to obtain a reinforcement learning model;
[0086] S206, inputting each quadruple data into the reinforcement learning model and outputting the model loss value;
[0087] In some embodiments of the present application, each quadruple data is input into the reinforcement learning model, and the specific process of outputting the model loss value includes: inputting the simulation system delay time and the current spatial position of the simulated obstacle into the spatial position calculation network, and outputting the simulation position result; calculating the position difference between the simulation position result and the actual spatial position of the simulated obstacle; when the position difference is greater than or equal to a preset threshold, adjusting the network parameters of the spatial position calculation network, and associating the simulation system delay time, the current spatial position of the simulated obstacle and the actual spatial position of the simulated obstacle to obtain an associated sample; inputting the associated sample into the spatial position calculation network and the reinforcement learning network at the same time for machine learning, and outputting a first network loss value and a second network loss value; summing the first network loss value and the second network loss value as the model loss value.
[0088] Among them, the spatial position calculation network includes a calculation layer, a displacement prediction layer, a displacement decomposition layer, and a spatial position compensation layer, such as Figure 5 shown.
[0089] Specifically, the calculation layer calculates the instantaneous linear velocity and instantaneous acceleration of the simulated obstacle based on the current spatial position of the simulated obstacle; the displacement prediction layer determines the predicted displacement delayed by the simulated obstacle based on the instantaneous linear velocity and instantaneous acceleration of the simulated obstacle; the displacement decomposition layer decomposes the predicted displacement delayed by the simulated obstacle in the horizontal and vertical coordinates of the coordinate system to obtain the horizontal simulation coordinate compensation component and the simulated vertical coordinate compensation component; the spatial position compensation layer uses the horizontal simulation coordinate compensation component and the simulated vertical coordinate compensation component to perform spatial position compensation on the current spatial position of the simulated obstacle to obtain the actual spatial position of the simulated obstacle as the simulation position result.
[0090] S207, when the model loss value reaches the minimum, a pre-trained reinforcement learning model is obtained.
[0091] In the embodiments of the present application, on the one hand, by quantifying the processing performance and pre-storing the system delay time during the robot charging process, the pre-stored system delay time is calculated and stored in advance, avoiding the time consumption caused by real-time calculation, so that the delay time can be quickly queried during the movement process to compensate for the current spatial position information of the dynamic obstacle, thereby obtaining actual spatial position information that is closer to the actual situation, based on which more accurate motion trajectory prediction can be made, which can effectively overcome motion prediction deviation. On the other hand, by loading a pre-trained reinforcement learning model, the spatial position calculation network in the model can take into account the impact of system delay and make more accurate calculations of the actual spatial position of the dynamic obstacle. The reinforcement learning network further optimizes the prediction results through feature enhancement, thereby outputting the predicted displacement delayed by the dynamic obstacle, allowing the robot to more accurately predict the motion trajectory of the dynamic obstacle, thereby reducing the risk of collision.
[0092] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0093] See Figure 6 , which shows a schematic diagram of the structure of a robot obstacle avoidance device for dynamic obstacles, provided by an exemplary embodiment of the present application. This robot obstacle avoidance device for dynamic obstacles can be implemented as all or part of an electronic device through software, hardware, or a combination of both. The device 1 includes an environmental perception information acquisition module 10, a system delay duration acquisition module 20, a spatial position compensation module 30, an obstacle trajectory prediction module 40, and an obstacle avoidance control module 50.
[0094] The environment perception information acquisition module 10 is used to obtain environment perception information in real time while traveling along a preset route;
[0095] The system delay duration acquisition module 20 is configured to obtain the current spatial position information of the dynamic obstacle and the pre-stored system delay duration when the presence of the dynamic obstacle is determined to exist within the preset range based on the environmental perception information. The pre-stored system delay duration is obtained by quantifying and storing the processing performance of the robot during the charging process.
[0096] The spatial position compensation module 30 is used to perform spatial position compensation on the current spatial position information according to the pre-stored system delay time to obtain the actual spatial position information of the dynamic obstacle;
[0097] The obstacle trajectory prediction module 40 is used to predict the obstacle trajectory of the dynamic obstacle based on the actual spatial position information;
[0098] The obstacle avoidance control module 50 is used to control the robot to avoid obstacles based on the obstacle trajectory.
[0099] It should be noted that the aforementioned embodiments of the robot obstacle avoidance device for dynamic obstacles, when implementing the robot obstacle avoidance method for dynamic obstacles, are merely exemplified by the division of the aforementioned functional modules. In actual applications, the aforementioned functions can be assigned to different functional modules as needed, i.e., the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the aforementioned embodiments of the robot obstacle avoidance device for dynamic obstacles and the embodiments of the robot obstacle avoidance method for dynamic obstacles are based on the same concept. The implementation process is detailed in the method embodiments and will not be further elaborated here.
[0100] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0101] In the embodiments of the present application, on the one hand, by quantifying the processing performance and pre-storing the system delay time during the robot charging process, the pre-stored system delay time is calculated and stored in advance, avoiding the time consumption caused by real-time calculation, so that the delay time can be quickly queried during the movement process to compensate for the current spatial position information of the dynamic obstacle, thereby obtaining actual spatial position information that is closer to the actual situation, based on which more accurate motion trajectory prediction can be made, which can effectively overcome motion prediction deviation. On the other hand, by loading a pre-trained reinforcement learning model, the spatial position calculation network in the model can take into account the impact of system delay and make more accurate calculations of the actual spatial position of the dynamic obstacle. The reinforcement learning network further optimizes the prediction results through feature enhancement, thereby outputting the predicted displacement delayed by the dynamic obstacle, allowing the robot to more accurately predict the motion trajectory of the dynamic obstacle, thereby reducing the risk of collision.
[0102] The present application also provides a computer-readable medium having program instructions stored thereon, which, when executed by a processor, implement the robot obstacle avoidance method applicable to dynamic obstacles provided by the above-mentioned various method embodiments.
[0103] The present application also provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the robot obstacle avoidance method applicable to dynamic obstacles of each of the above method embodiments.
[0104] See Figure 7 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7As shown, the electronic device 1000 may include: at least one processor 1001 , at least one network interface 1004 , a user interface 1003 , a memory 1005 , and at least one communication bus 1002 .
[0105] The communication bus 1002 is used to implement the connection and communication between these components.
[0106] The user interface 1003 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 1003 may also include a standard wired interface and a wireless interface.
[0107] The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0108] The processor 1001 may include one or more processing cores. The processor 1001 utilizes various interfaces and circuits to connect various components within the electronic device 1000. It executes instructions, programs, code sets, or instruction sets stored in the memory 1005, and accesses data stored in the memory 1005 to perform various functions and process data within the electronic device 1000. Optionally, the processor 1001 may be implemented in hardware using at least one of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 1001 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing content displayed on the display; and the modem handles wireless communications. It is understood that the modem may also be implemented independently of the processor 1001 and implemented on a separate chip.
[0109] Among them, the memory 1005 may include a random access memory (RAM) or a read-only memory (Read-Only Memory). Optionally, the memory 1005 includes a non-transitory computer-readable storage medium. The memory 1005 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1005 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 1005 may also be optionally at least one storage system located away from the aforementioned processor 1001. As Figure 7 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a robot obstacle avoidance application suitable for dynamic obstacles.
[0110] exist Figure 7 In the electronic device 1000 shown, the user interface 1003 is mainly used to provide an input interface for the user and obtain user input data; and the processor 1001 can be used to call the robot obstacle avoidance application suitable for dynamic obstacles stored in the memory 1005 and specifically perform the following operations:
[0111] Acquire environmental perception information in real time while traveling along the preset route;
[0112] When a dynamic obstacle is determined to exist within a preset range based on environmental perception information, the current spatial position information of the dynamic obstacle and the pre-stored system delay duration are obtained; the pre-stored system delay duration is obtained by quantifying and storing the processing performance of the robot during the charging process;
[0113] According to the pre-stored system delay time, the current spatial position information is compensated for the spatial position to obtain the actual spatial position information of the dynamic obstacle;
[0114] Predict the obstacle trajectory of dynamic obstacles based on the actual spatial position information;
[0115] Based on the obstacle trajectory, the robot is controlled to avoid obstacles.
[0116] In one embodiment, when the processor 1001 performs spatial position compensation on the current spatial position information according to the pre-stored system delay time to obtain the actual spatial position information of the dynamic obstacle, the processor 1001 specifically performs the following operations:
[0117] Calculate the instantaneous linear velocity and instantaneous acceleration of the dynamic obstacle based on the current spatial position information and the historical spatial position information of the dynamic obstacle at the previous moment;
[0118] Determine the predicted displacement delayed by the dynamic obstacle based on the pre-stored system delay time, instantaneous linear velocity, and instantaneous acceleration;
[0119] Decompose the predicted displacement in the abscissa and ordinate of the coordinate system to obtain abscissa compensation components and ordinate compensation components;
[0120] The horizontal coordinate compensation component and the vertical coordinate compensation component are used to perform spatial position compensation on the current spatial position information to obtain the actual spatial position information of the dynamic obstacle.
[0121] In one embodiment, when determining the predicted displacement delayed by a dynamic obstacle based on the pre-stored system delay duration, instantaneous linear velocity, and instantaneous acceleration, the processor 1001 specifically performs the following operations:
[0122] Call the preset obstacle position compensation model;
[0123] The pre-stored system delay time, instantaneous linear velocity and instantaneous acceleration are used as model parameters of the preset obstacle position compensation model to obtain a parameter-supplemented model expression;
[0124] Execute the parameter-supplemented model expression to obtain the predicted displacement delayed by the dynamic obstacle;
[0125] Among them, the model expression of the preset obstacle position compensation model is:
[0126]
[0127] in, To predict displacement, is the instantaneous linear velocity of the dynamic obstacle, is the instantaneous acceleration of the dynamic obstacle, Processing delay time for the system;
[0128] The calculation formula for the actual spatial position information of the dynamic obstacle is:
[0129] ;
[0130] in, is the actual spatial location information, is the horizontal axis compensation component, is the ordinate compensation component, is the horizontal coordinate of the current spatial position information, It is the vertical coordinate of the current spatial position information.
[0131] In one embodiment, when generating the pre-stored system delay duration, the processor 1001 specifically performs the following operations:
[0132] During the robot charging process, the current load of the processor and the length of the task queue are obtained as processor operating parameters;
[0133] At the same time, a detection function for detecting the spatial position information of dynamic obstacles and a prediction function for predicting dynamic obstacles are extracted;
[0134] In the simulation platform, virtual space position information of dynamic virtual obstacles is created;
[0135] Simulate the obstacle trajectory based on virtual space position information, detection function, and prediction function;
[0136] Statistics of function execution time during simulation running process;
[0137] Determine the processor runtime based on the current load and task queue length;
[0138] The function execution time and the processor running time are accumulated and the accumulated result is stored to obtain the pre-storage system delay time.
[0139] In one embodiment, when determining the predicted displacement delayed by a dynamic obstacle based on the pre-stored system delay duration, instantaneous linear velocity, and instantaneous acceleration, the processor 1001 specifically performs the following operations:
[0140] Load a pre-trained reinforcement learning model;
[0141] Inputting the pre-stored system delay, instantaneous linear velocity, and instantaneous acceleration into a pre-trained reinforcement learning model; the reinforcement learning model includes a spatial position calculation network for calculating the actual spatial position of the dynamic obstacle and a reinforcement learning network for feature enhancement;
[0142] Outputs the predicted displacement delayed by dynamic obstacles.
[0143] In one embodiment, when executing the generation of a pre-trained reinforcement learning model, the processor 1001 specifically performs the following operations:
[0144] Build a robot obstacle avoidance simulation environment that includes dynamic obstacles;
[0145] In the robot obstacle avoidance simulation environment, control the simulated robot to interact with simulated obstacles;
[0146] During the interaction, a preset number of quadruple data are collected; wherein,
[0147] Each quadruple data set includes the simulation system delay duration, the current spatial position of the simulated obstacle, and the actual spatial position of the simulated obstacle. The simulation system delay duration is obtained by simulating the processing time of the simulated robot under different loads. The current spatial position of the simulated obstacle is the initial position of the simulated obstacle before trajectory prediction, and the actual spatial position of the simulated obstacle is the final position of the simulated obstacle after trajectory prediction is completed.
[0148] A neural network algorithm is used to create a spatial position calculation network for calculating the actual spatial position of dynamic obstacles and a reinforcement learning network for feature enhancement;
[0149] Integrate the network parameters of the spatial position calculation network and the reinforcement learning network to obtain a reinforcement learning model;
[0150] Input each quadruple data into the reinforcement learning model and output the model loss value;
[0151] When the model loss value reaches the minimum, the pre-trained reinforcement learning model is obtained.
[0152] In one embodiment, when inputting each quadruple data into the reinforcement learning model and outputting the model loss value, the processor 1001 specifically performs the following operations:
[0153] Input the simulation system delay time and the current spatial position of the simulated obstacle into the spatial position calculation network, and output the simulation position result;
[0154] Calculate the position difference between the simulated position result and the actual spatial position of the simulated obstacle;
[0155] When the position difference is greater than or equal to a preset threshold, the network parameters of the spatial position calculation network are adjusted, and the simulation system delay time, the current spatial position of the simulated obstacle and the actual spatial position of the simulated obstacle are correlated to obtain a correlation sample;
[0156] The associated samples are simultaneously input into the spatial position calculation network and the reinforcement learning network for machine learning, and the first network loss value and the second network loss value are output;
[0157] The first network loss value and the second network loss value are summed to obtain the model loss value.
[0158] In one embodiment, the processor 1001 performs the following operations when inputting the simulation system delay time and the current spatial position of the simulated obstacle into the spatial position calculation network and outputting the simulation position result:
[0159] The calculation layer calculates the instantaneous linear velocity and instantaneous acceleration of the simulated obstacle based on its current spatial position;
[0160] The displacement prediction layer determines the predicted displacement delayed by the simulated obstacle based on the instantaneous linear velocity and instantaneous acceleration of the simulated obstacle;
[0161] The displacement decomposition layer decomposes the predicted displacement delayed by the simulated obstacle in the horizontal and vertical coordinates of the coordinate system to obtain the horizontal simulation coordinate compensation component and the simulation vertical coordinate compensation component;
[0162] The spatial position compensation layer uses the horizontal simulation coordinate compensation component and the simulation vertical coordinate compensation component to perform spatial position compensation on the current spatial position of the simulated obstacle, and obtains the actual spatial position of the simulated obstacle as the simulation position result.
[0163] In one embodiment, when the processor 1001 predicts the obstacle trajectory of a dynamic obstacle based on the actual spatial position information, the processor 1001 specifically performs the following operations:
[0164] Construct a second-order kinematic model; the model expression of the second-order kinematic model is:
[0165]
[0166] in, and Is a dynamic obstacle in the future The predicted position coordinates at the time, For the current moment, The time interval for future trajectory prediction, and is the actual spatial position information of the dynamic obstacle after system delay compensation, and Is a dynamic obstacle in Axis and The current velocity component in the axis direction, To pre-store the system delay time, and Is a dynamic obstacle in Axis and Acceleration component in the axial direction;
[0167] The motion trend of dynamic obstacles is calculated based on the actual spatial position information and the current speed of the dynamic obstacles combined with the second-order kinematic model;
[0168] Draw the position sequence of multiple time points under the motion trend to obtain discrete position points;
[0169] The discrete position points are connected as line segments to obtain the obstacle trajectory of the dynamic obstacle.
[0170] In the embodiments of the present application, on the one hand, by quantifying the processing performance and pre-storing the system delay time during the robot charging process, the pre-stored system delay time is calculated and stored in advance, avoiding the time consumption caused by real-time calculation, so that the delay time can be quickly queried during the movement process to compensate for the current spatial position information of the dynamic obstacle, thereby obtaining actual spatial position information that is closer to the actual situation, based on which more accurate motion trajectory prediction can be made, which can effectively overcome motion prediction deviation. On the other hand, by loading a pre-trained reinforcement learning model, the spatial position calculation network in the model can take into account the impact of system delay and make more accurate calculations of the actual spatial position of the dynamic obstacle. The reinforcement learning network further optimizes the prediction results through feature enhancement, thereby outputting the predicted displacement delayed by the dynamic obstacle, allowing the robot to more accurately predict the motion trajectory of the dynamic obstacle, thereby reducing the risk of collision.
[0171] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The program for robot obstacle avoidance in dynamic obstacles can be stored in a computer-readable storage medium. When executed, the program can include the processes in the above-described method embodiments. The storage medium for the program for robot obstacle avoidance in dynamic obstacles can be a magnetic disk, an optical disk, a read-only memory, or a random access memory.
[0172] The above disclosure is only a preferred embodiment of the present application, and certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
Claims
1. A robot obstacle avoidance method suitable for dynamic obstacles, characterized in that: Applied to a robot, the method comprises: Acquire environmental perception information in real time while traveling along the preset route; When it is determined based on the environmental perception information that a dynamic obstacle exists within a preset range, obtaining current spatial position information of the dynamic obstacle and a pre-stored system delay duration; the pre-stored system delay duration is obtained by quantifying and storing the processing performance of the robot during the charging process of the robot; Performing spatial position compensation on the current spatial position information according to the pre-stored system delay time to obtain the actual spatial position information of the dynamic obstacle; predicting an obstacle trajectory of the dynamic obstacle based on the actual spatial position information; Controlling the robot to avoid obstacles based on the obstacle trajectory; The following steps are used to generate the pre-stored system delay: During the charging process of the robot, the current load and task queue length of the processor are obtained as processor operation parameters; Simultaneously extracting a detection function for detecting spatial position information of the dynamic obstacle and a prediction function for predicting the dynamic obstacle; In the simulation platform, virtual space position information of dynamic virtual obstacles is created; Performing a simulation of the obstacle's trajectory based on the virtual space position information, the detection function, and the prediction function; Statistics of function execution time during simulation running process; determining a processor run time of the processor according to the current load and the task queue length; The function execution time and the processor running time are accumulated, and the accumulated result is stored to obtain the pre-stored system delay duration.
2. The method according to claim 1, characterized in that The performing spatial position compensation on the current spatial position information according to the pre-stored system delay time to obtain the actual spatial position information of the dynamic obstacle includes: Calculating the instantaneous linear velocity and instantaneous acceleration of the dynamic obstacle based on the current spatial position information and the historical spatial position information of the dynamic obstacle at a previous moment; Determining a predicted displacement delayed by the dynamic obstacle based on the pre-stored system delay duration, the instantaneous linear velocity, and the instantaneous acceleration; Decomposing the predicted displacement in the abscissa and ordinate of the coordinate system to obtain abscissa compensation components and ordinate compensation components; The abscissa compensation component and the ordinate compensation component are used to perform spatial position compensation on the current spatial position information to obtain the actual spatial position information of the dynamic obstacle.
3. The method according to claim 2, characterized in that The determining, based on the pre-stored system delay duration, the instantaneous linear velocity, and the instantaneous acceleration, of the predicted displacement delayed by the dynamic obstacle comprises: Call the preset obstacle position compensation model; Using the pre-stored system delay time, the instantaneous linear velocity, and the instantaneous acceleration as model parameters of the preset obstacle position compensation model to obtain a parameter-supplemented model expression; executing the parameter-supplemented model expression to obtain a predicted displacement delayed by the dynamic obstacle; The model expression of the preset obstacle position compensation model is: ; in, is the predicted displacement, is the instantaneous linear velocity of the dynamic obstacle, is the instantaneous acceleration of the dynamic obstacle, Processing delay time for the system; The calculation formula for the actual spatial position information of the dynamic obstacle is: ; in, is the actual spatial location information, is the horizontal axis compensation component, is the ordinate compensation component, is the horizontal coordinate of the current spatial position information, It is the vertical coordinate of the current spatial position information.
4. The method according to claim 2, characterized in that The determining, based on the pre-stored system delay duration, the instantaneous linear velocity, and the instantaneous acceleration, of the predicted displacement delayed by the dynamic obstacle comprises: Load a pre-trained reinforcement learning model; Inputting the pre-stored system delay duration, the instantaneous linear velocity, and the instantaneous acceleration into a pre-trained reinforcement learning model; the reinforcement learning model includes a spatial position calculation network for calculating the actual spatial position of the dynamic obstacle and a reinforcement learning network for feature enhancement; Output the predicted displacement delayed by the dynamic obstacle.
5. The method according to claim 4, characterized in that Generate a pre-trained reinforcement learning model as follows: Build a robot obstacle avoidance simulation environment that includes dynamic obstacles; In the robot obstacle avoidance simulation environment, controlling the simulated robot to interact with simulated obstacles; During the interaction, a preset number of quadruple data are collected; wherein, Each quaternion of data includes the simulation system delay duration, the current spatial position of the simulated obstacle, and the actual spatial position of the simulated obstacle; the simulation system delay duration is obtained by simulating the processing time of the simulated robot under different loads; the current spatial position of the simulated obstacle is the initial position of the simulated obstacle before trajectory prediction; and the actual spatial position of the simulated obstacle is the final position of the simulated obstacle after trajectory prediction is completed; A neural network algorithm is used to create a spatial position calculation network for calculating the actual spatial position of dynamic obstacles and a reinforcement learning network for feature enhancement; Integrating network parameters of the spatial position calculation network and the reinforcement learning network to obtain a reinforcement learning model; Input each quadruple data into the reinforcement learning model and output a model loss value; When the model loss value reaches a minimum, a pre-trained reinforcement learning model is obtained.
6. The method according to claim 5, characterized in that Inputting each quadruple data into the reinforcement learning model and outputting a model loss value includes: Inputting the simulation system delay time and the current spatial position of the simulated obstacle into the spatial position calculation network, and outputting the simulation position result; Calculating a position difference between the simulated position result and the actual spatial position of the simulated obstacle; When the position difference is greater than or equal to a preset threshold, adjusting the network parameters of the spatial position calculation network, and correlating the simulation system delay time, the current spatial position of the simulated obstacle, and the actual spatial position of the simulated obstacle to obtain a correlation sample; Inputting the associated samples into the spatial position calculation network and the reinforcement learning network simultaneously for machine learning, and outputting a first network loss value and a second network loss value; The first network loss value and the second network loss value are summed to obtain a model loss value.
7. The method according to claim 5, characterized in that The spatial position calculation network includes a calculation layer, a displacement prediction layer, a displacement decomposition layer and a spatial position compensation layer; The step of inputting the simulation system delay time and the current spatial position of the simulated obstacle into the spatial position calculation network and outputting the simulation position result comprises: The calculation layer calculates the instantaneous linear velocity and instantaneous acceleration of the simulated obstacle according to the current spatial position of the simulated obstacle; The displacement prediction layer determines the predicted displacement delayed by the simulated obstacle according to the instantaneous linear velocity and instantaneous acceleration of the simulated obstacle; The displacement decomposition layer decomposes the predicted displacement delayed by the simulated obstacle in the horizontal coordinate and the vertical coordinate of the coordinate system to obtain a horizontal simulation coordinate compensation component and a simulated vertical coordinate compensation component; The spatial position compensation layer uses the horizontal simulation coordinate compensation component and the simulation vertical coordinate compensation component to perform spatial position compensation on the current spatial position of the simulated obstacle, and obtains the actual spatial position of the simulated obstacle as the simulation position result.
8. The method according to claim 1, characterized in that The predicting, based on the actual spatial position information, the obstacle trajectory of the dynamic obstacle includes: Construct a second-order kinematic model; the model expression of the second-order kinematic model is: in, and Is a dynamic obstacle in the future The predicted position coordinates at the time, For the current moment, The time interval for future trajectory prediction, and The actual spatial position information of the dynamic obstacle after system delay compensation, and Is a dynamic obstacle in Axis and The current velocity component in the axis direction, To pre-store the system delay time, and Is a dynamic obstacle in Axis and Acceleration component in the axial direction; Calculating the motion trend of the dynamic obstacle based on the actual spatial position information and the current speed of the dynamic obstacle in combination with the second-order kinematic model; Plotting a position sequence of multiple time points under the motion trend to obtain discrete position points; The discrete position points are connected into line segments to obtain the obstacle movement trajectory of the dynamic obstacle.
9. A robot obstacle avoidance device suitable for dynamic obstacles implemented using the method according to any one of claims 1 to 8, characterized in that: The device comprises: An environmental perception information acquisition module is used to obtain environmental perception information in real time while traveling along a preset route; a system delay duration acquisition module, configured to, upon determining the presence of a dynamic obstacle within a preset range based on the environmental perception information, acquire current spatial position information of the dynamic obstacle and a pre-stored system delay duration; the pre-stored system delay duration being obtained by quantifying and storing the processing performance of the robot during charging; a spatial position compensation module, configured to perform spatial position compensation on the current spatial position information according to the pre-stored system delay time to obtain the actual spatial position information of the dynamic obstacle; An obstacle trajectory prediction module, configured to predict the obstacle trajectory of the dynamic obstacle based on the actual spatial position information; The obstacle avoidance control module is used to control the robot to avoid obstacles based on the obstacle trajectory.
Citation Information
Patent Citations
Dynamic obstacle avoidance system and method for animal house cleaning robot based on laser sensing
CN118760195A
Automatic driving vehicle control method, device and system and automatic driving vehicle
CN119428759A