Robot motion control method, device, robot and storage medium

By calculating the position and speed of the robot and dynamic obstacles, determining the starting position of the collision and controlling the obstacle avoidance speed, the problem of robot movement safety under the influence of dynamic obstacles in the existing technology is solved, and higher collision detection accuracy is achieved. and obstacle avoidance safety.

CN118226860BActive Publication Date: 2024-09-20SHENZHEN PUDU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410613739.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-17
Publication Date
2024-09-20
Estimated Expiration
2044-05-17

AI Technical Summary

Technical Problem

The existing technology fails to effectively consider dynamic obstacles when planning robot motion trajectories, resulting in low safety of robot motion and prone to collisions due to excessive speed of dynamic obstacles.

Method used

By obtaining the position and speed of the robot and the dynamic obstacle, the relative position distance in the preset detection time period is calculated, the collision starting position is determined, and the robot movement is controlled according to the obstacle avoidance speed to avoid the dynamic obstacle.

Benefits of technology

It improves the accuracy of collision detection and obstacle avoidance safety between robots and dynamic obstacles, ensuring that the robot can promptly identify and avoid dynamic obstacles, and improves overall movement safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118226860B
    Figure CN118226860B
Patent Text Reader

Abstract

The present application relates to a robot motion control method, device, and computer equipment. The method includes: calculating the position distance based on the current robot position, the current dynamic obstacle position, the robot relative speed, and the preset detection time period, and obtaining the relative position distance corresponding to each detection time point in the preset detection time period; obtaining a preset static obstacle avoidance path, determining the target relative position distance that meets the preset collision start distance condition from the relative position distance corresponding to each detection time point, and determining the collision start position in each static obstacle avoidance position of the static obstacle avoidance path based on the detection time point corresponding to the target relative position distance; calculating the obstacle avoidance speed based on the current robot position, the collision start position, and the detection time point corresponding to the target relative position distance, and obtaining the obstacle avoidance speed, and moving at the obstacle avoidance speed according to the preset static obstacle avoidance path. The use of this method can improve the safety of robot motion control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of robot control technology, and in particular to a robot motion control method, device, robot, storage medium and computer program product. Background Art

[0002] With the popularization of robots, robots are being used more and more widely, such as cleaning robots that perform cleaning tasks, robots that perform delivery tasks, robots that perform guidance tasks, etc. In the actual work of robots, in order to ensure that the robots reach the designated destination safely and quickly, the robots need to safely avoid obstacles in the driving path.

[0003] However, currently, when planning the robot's moving trajectory, static obstacles are usually considered, and the impact of dynamic obstacles on the robot's moving trajectory is not considered. In the prior art, dynamic obstacle avoidance is performed when the robot's sensor senses a dynamic obstacle. However, when the dynamic obstacle moves too fast, the robot may collide with it because it has no time to react, resulting in low robot movement safety. Summary of the invention

[0004] Based on this, it is necessary to provide a robot motion control method, device, robot, computer-readable storage medium and computer program product that can improve the robot's motion safety in response to the above-mentioned technical problems.

[0005] In a first aspect, the present application provides a robot motion control method, comprising:

[0006] Obtaining the current robot position, the current dynamic obstacle position and the robot relative speed, wherein the robot relative speed is obtained according to the robot speed and the obstacle speed;

[0007] Performing position distance calculation based on the current robot position, the current dynamic obstacle position, the robot relative speed and a preset detection time period to obtain a relative position distance corresponding to each detection time point in the preset detection time period;

[0008] Obtaining a preset static obstacle avoidance path, determining a target relative position distance that meets a preset collision start distance condition from the relative position distances corresponding to each detection time point, and determining a collision start position from each static obstacle avoidance position of the preset static obstacle avoidance path based on the detection time point corresponding to the target relative position distance;

[0009] The obstacle avoidance speed is calculated based on the detection time point corresponding to the current robot position, the collision starting position, and the target relative position distance to obtain the obstacle avoidance speed, and the robot moves at the obstacle avoidance speed according to the preset static obstacle avoidance path.

[0010] In a second aspect, the present application also provides a robot operation control device, comprising:

[0011] An acquisition module is used to acquire the current robot position, the current dynamic obstacle position and the robot relative speed, wherein the robot relative speed is obtained according to the robot speed and the obstacle speed;

[0012] A distance calculation module is used to perform position distance calculation based on the current robot position, the current dynamic obstacle position, the robot relative speed and a preset detection time period, and obtain the relative position distance corresponding to each detection time point in the preset detection time period;

[0013] A collision position determination module, used to obtain a preset static obstacle avoidance path, determine a target relative position distance that meets a preset collision start distance condition from the relative position distances corresponding to each detection time point, and determine a collision start position in each static obstacle avoidance position of the preset static obstacle avoidance path based on the detection time point corresponding to the target relative position distance;

[0014] The obstacle avoidance module is used to calculate the obstacle avoidance speed based on the detection time point corresponding to the current robot position, the collision starting position, and the target relative position distance, obtain the obstacle avoidance speed, and move at the obstacle avoidance speed according to the preset static obstacle avoidance path.

[0015] In a third aspect, the present application further provides a robot, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0016] Obtaining the current robot position, the current dynamic obstacle position and the robot relative speed, wherein the robot relative speed is obtained according to the robot speed and the obstacle speed;

[0017] Performing position distance calculation based on the current robot position, the current dynamic obstacle position, the robot relative speed and a preset detection time period to obtain a relative position distance corresponding to each detection time point in the preset detection time period;

[0018] Obtaining a preset static obstacle avoidance path, determining a target relative position distance that meets a preset collision start distance condition from the relative position distances corresponding to each detection time point, and determining a collision start position from each static obstacle avoidance position of the preset static obstacle avoidance path based on the detection time point corresponding to the target relative position distance;

[0019] The obstacle avoidance speed is calculated based on the detection time point corresponding to the current robot position, the collision starting position, and the target relative position distance to obtain the obstacle avoidance speed, and the robot moves at the obstacle avoidance speed according to the preset static obstacle avoidance path.

[0020] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0021] Obtaining the current robot position, the current dynamic obstacle position and the robot relative speed, wherein the robot relative speed is obtained according to the robot speed and the obstacle speed;

[0022] Performing position distance calculation based on the current robot position, the current dynamic obstacle position, the robot relative speed and a preset detection time period to obtain a relative position distance corresponding to each detection time point in the preset detection time period;

[0023] Obtaining a preset static obstacle avoidance path, determining a target relative position distance that meets a preset collision start distance condition from the relative position distances corresponding to each detection time point, and determining a collision start position from each static obstacle avoidance position of the preset static obstacle avoidance path based on the detection time point corresponding to the target relative position distance;

[0024] The obstacle avoidance speed is calculated based on the detection time point corresponding to the current robot position, the collision starting position, and the target relative position distance to obtain the obstacle avoidance speed, and the robot moves at the obstacle avoidance speed according to the preset static obstacle avoidance path.

[0025] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0026] Obtaining the current robot position, the current dynamic obstacle position and the robot relative speed, wherein the robot relative speed is obtained according to the robot speed and the obstacle speed;

[0027] Performing position distance calculation based on the current robot position, the current dynamic obstacle position, the robot relative speed and a preset detection time period to obtain a relative position distance corresponding to each detection time point in the preset detection time period;

[0028] Obtaining a preset static obstacle avoidance path, determining a target relative position distance that meets a preset collision start distance condition from the relative position distances corresponding to each detection time point, and determining a collision start position from each static obstacle avoidance position of the preset static obstacle avoidance path based on the detection time point corresponding to the target relative position distance;

[0029] The obstacle avoidance speed is calculated based on the detection time point corresponding to the current robot position, the collision starting position, and the target relative position distance to obtain the obstacle avoidance speed, and the robot moves at the obstacle avoidance speed according to the preset static obstacle avoidance path.

[0030] The robot motion control method, device, robot, storage medium and computer program product can obtain the robot relative speed according to the robot speed and the obstacle speed, and then calculate the relative position distance corresponding to each detection time point in the preset detection time period according to the current robot position, the current dynamic obstacle position and the robot relative speed, so as to determine the distance change between the robot and the dynamic obstacle according to the relative position distance, and timely judge whether the robot and the dynamic obstacle will collide, thereby ensuring the accuracy of the collision detection between the robot and the dynamic obstacle. Then, the relative position distance of the target where the collision occurs is determined according to the relative position distance corresponding to each detection time point, and the collision start position is determined in the preset static obstacle avoidance path according to the detection time point corresponding to the target relative position distance, so as to achieve the recognition accuracy of the collision start position. Then, the obstacle avoidance speed is calculated according to the detection time point corresponding to the current robot position, the collision start position and the target relative position distance, and the obstacle avoidance speed is obtained. By controlling the robot to move according to the static obstacle avoidance path at the obstacle avoidance speed, the dynamic obstacles can be safely avoided, thereby improving the safety of the robot movement. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0032] FIG1 is a diagram showing an application environment of a robot motion control method according to an embodiment;

[0033] FIG2 is a schematic diagram of a flow chart of a robot motion control method in one embodiment;

[0034] FIG3 is a schematic diagram of a robot collision trajectory in one embodiment;

[0035] FIG4 is a schematic diagram of a speed curve in one embodiment;

[0036] FIG5 is a schematic diagram of speed curve planning in one embodiment;

[0037] FIG6 is a schematic diagram of an initial planned path in one embodiment;

[0038] FIG7 is a schematic diagram of intercepting a path segment in one embodiment;

[0039] FIG8 is a schematic diagram of a search path in one embodiment;

[0040] FIG9 is a schematic diagram of trajectory points in one embodiment;

[0041] FIG10 is a schematic diagram of discrete trajectory points in one embodiment;

[0042] FIG11 is a schematic diagram of a static obstacle avoidance path in one embodiment;

[0043] FIG12 is a schematic diagram of a static obstacle in one embodiment;

[0044] FIG13 is a schematic diagram of a dynamic obstacle in one embodiment;

[0045] FIG14 is a schematic diagram of obstacle point clustering in one embodiment;

[0046] FIG15 is a schematic diagram of enclosing obstacle points in one embodiment;

[0047] FIG16 is a schematic diagram of an obstacle search box in one embodiment;

[0048] FIG17 is a schematic diagram of the direction of movement of an obstacle in one embodiment;

[0049] FIG18 is a schematic diagram of a collision detection range in one embodiment;

[0050] FIG19 is a schematic diagram of trajectory points in one embodiment;

[0051] FIG20 is a schematic diagram of a flow chart of robot obstacle avoidance control in one embodiment;

[0052] FIG21 is a block diagram of a robot operation control device in one embodiment;

[0053] FIG. 22 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0055] The robot motion control method provided in the embodiment of the present application can be applied to the application environment as shown in Figure 1, including a robot 102, a server 104, and a terminal (not shown). The robot 102 can be connected to the server 104 and the terminal through a communication connection method such as Bluetooth, USB (Universal Serial Bus) or a network, and the present application is not limited here. In one embodiment, the robot 102 can receive a movement instruction sent by the server 104 or the terminal through a communication connection, such as an indoor cleaning instruction sent by the server 104 to the robot 102, and the robot 102 moves and cleans the floor in response to the indoor cleaning instruction. For another example, the terminal sends a map collection instruction to the robot 102, and the robot 102 moves and creates a map in the target area in response to the map collection instruction, and sends the created map to the server 104 for storage. In one embodiment, the robot 102 is also deployed with a control screen, and the robot 102 responds to the user's click operation on the control screen through the control screen to perform the corresponding movement operation, and the control is such as an automatic cleaning control.

[0056] In one embodiment, the robot 102 obtains the current robot position, the current dynamic obstacle position and the robot relative speed in the process of performing a moving task in response to a moving instruction sent by the server 104 or the terminal, and the robot relative speed is obtained based on the robot speed and the obstacle speed; the robot 102 calculates the position distance based on the current robot position, the current dynamic obstacle position, the robot relative speed and the preset detection time period, and obtains the relative position distance corresponding to each detection time point in the preset detection time period; the robot 102 obtains a preset static obstacle avoidance path, determines the target relative position distance that meets the preset collision starting distance condition from the relative position distance corresponding to each detection time point, and determines the collision starting position in each static obstacle avoidance position of the static obstacle avoidance path based on the detection time point corresponding to the target relative position distance; the robot 102 calculates the obstacle avoidance speed based on the current robot position, the collision starting position, and the detection time point corresponding to the target relative position distance, obtains the obstacle avoidance speed, and moves at the obstacle avoidance speed according to the preset static obstacle avoidance path. Among them, the server 104 can be an independent physical server or a service node in the blockchain system. The service nodes in the blockchain system form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on the Transmission Control Protocol (TCP) protocol. In addition, the server 104 can also be a server cluster composed of multiple physical servers, which can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc.

[0057] In one embodiment, as shown in FIG2 , a robot motion control method is provided, and the method is applied to the robot in FIG1 as an example for explanation. The method includes the following steps:

[0058] Step 202, obtaining the current robot position, the current dynamic obstacle position and the robot relative speed, where the robot relative speed is obtained based on the robot speed and the obstacle speed.

[0059] Among them, the current robot position refers to the position coordinates of the robot in the set area at the current moment. The set area can be the operating area set in the robot map, such as the cleaning area, delivery area, guidance area, etc. The robot map can be a global map, a local map, or a perception map of the robot. The perception map is, for example, a local map generated in real time based on the robot sensor. An initial planning path is also set in the set area. The initial planning path can cover the entire set area and is used to indicate the path of the robot's movement in the set area, such as the cleaning path in the cleaning area, the delivery path in the delivery area, and the guidance path in the guidance area.

[0060] The current dynamic obstacle position refers to the position coordinates of the dynamic obstacle detected at the current moment in the set area. The robot speed refers to the current movement speed of the robot, which can refer to the vector speed, which can represent the movement direction and speed of the robot. The obstacle speed refers to the movement speed of the dynamic obstacle, which can refer to the vector speed. The robot relative speed refers to the movement speed of the robot relative to the dynamic obstacle.

[0061] Specifically, the robot collects obstacle information in the environment at a preset frequency and marks the obstacle position in the robot map in real time. The robot can identify the type of obstacle, such as dynamic obstacles and static obstacles, by comparing the positions of the obstacles. Specifically, the robot detects that the obstacle position in the robot map of the current frame has changed compared to the robot map of the previous frame, and determines that the obstacle is a dynamic obstacle. Generally, a dynamic obstacle may refer to a dynamic obstacle that exists in the initial planned path. The robot then calculates the obstacle speed based on the obstacle position in the current frame and the obstacle position in the previous frame, and obtains the current robot position of the robot in the robot map of the current frame, as well as the current dynamic obstacle position of the dynamic obstacle in the robot map of the current frame.

[0062] Step 204 , calculate the position distance based on the current robot position, the current dynamic obstacle position, the relative speed of the robot and the preset detection time period to obtain the relative position distance corresponding to each detection time point in the preset detection time period.

[0063] The preset detection time period refers to a time period preset for detecting whether the robot collides with an obstacle. The relative position distance refers to the distance between the robot and the obstacle at a certain detection time point.

[0064] Specifically, the robot uses the current robot position and the robot relative speed to predict the position that the robot will move to in the future. Specifically, the robot calculates the position according to the current robot position, the robot relative speed and the preset detection time period, and obtains the robot detection position corresponding to each detection time point in the preset detection time period. Then, the difference between the robot detection position corresponding to each detection time point and the current dynamic obstacle position is calculated respectively, and the relative position distance corresponding to each detection time point in the preset detection time period is obtained.

[0065] Step 206, obtain a preset static obstacle avoidance path, determine a target relative position distance that meets a preset collision start distance condition from the relative position distances corresponding to each detection time point, and determine a collision start position in each static obstacle avoidance position of the static obstacle avoidance path based on the detection time point corresponding to the target relative position distance.

[0066] The preset static obstacle avoidance path refers to the obstacle avoidance path obtained by planning the position of the dynamic obstacle in the robot map of the current frame. Specifically, it can be based on the position of the dynamic obstacle in the initial planning path. In the initial planning path, the robot's position is used as the starting point, a path segment where the dynamic obstacle is located is intercepted, and a path search algorithm (such as the A* algorithm) is used to search for a new path from the robot's position to the end point of the path segment as the obstacle avoidance path. The collision start position refers to the position when the robot starts to collide with the dynamic obstacle in the preset static obstacle avoidance path.

[0067] Specifically, when the robot detects the presence of a dynamic obstacle in the initial planned path according to the robot map of the current frame, a preset static obstacle avoidance path is generated according to the position of the dynamic obstacle in the initial planned path. The preset static obstacle avoidance path can be understood as, since the position of the dynamic obstacle in the robot map of the current frame is fixed, the dynamic obstacle can be treated as a static obstacle in the robot map of the current frame to perform obstacle avoidance path planning to obtain the preset static obstacle avoidance path. The preset static obstacle avoidance path includes the robot posture of the robot at each path point, and the robot position can be extracted from the robot posture of the robot at the path point as the static obstacle avoidance position. The preset static obstacle avoidance path can be a robot position sequence obtained by performing obstacle avoidance path planning according to the currently executed robot speed, including each planning time point and the static obstacle avoidance position corresponding to each planning time point.

[0068] After the robot obtains the preset static obstacle avoidance path, it determines the target relative position distance that meets the preset collision starting distance condition from the relative position distances corresponding to each detection time point, including obtaining the preset relative position distance, comparing the relative position distances corresponding to each detection time point with the preset relative position distance threshold in time sequence, and determining the first relative position distance that does not exceed the preset relative position distance threshold as the target relative position distance.

[0069] The robot obtains the detection time point corresponding to the target relative position distance, matches the detection time point corresponding to the target relative position distance with each planning time point according to the preset matching algorithm, determines the successfully matched planning time point as the target planning time point, obtains the static obstacle avoidance position corresponding to the target planning time point, and obtains the collision starting position.

[0070] Step 208, the obstacle avoidance speed is calculated based on the detection time point corresponding to the current robot position, the collision starting position, and the target relative position distance, and the obstacle avoidance speed is obtained, and the robot moves at the obstacle avoidance speed according to the preset static obstacle avoidance path.

[0071] Specifically, the robot calculates the collision speed according to the detection time points corresponding to the current robot position, the collision start position and the target relative position to obtain the collision speed. The robot can use the collision speed as the obstacle avoidance speed threshold; the robot can also obtain a preset collision speed error, calculate the speed threshold according to the collision speed and the preset collision speed error, and obtain the obstacle avoidance speed threshold. The preset collision speed error refers to a preset error value for correcting the collision speed, and the preset collision speed error can be determined according to the obstacle speed of the dynamic obstacle, and the two are positively correlated. For example, when the obstacle speed is large, the set collision speed error is also large.

[0072] The robot determines the obstacle avoidance speed condition according to the obstacle avoidance speed threshold, selects the robot movement speed that meets the obstacle avoidance speed condition within the preset robot movement speed range as the obstacle avoidance speed, and then the robot moves at the obstacle avoidance speed according to the preset static obstacle avoidance path.

[0073] In one embodiment, the obstacle avoidance speed is the obstacle avoidance linear speed. The robot calculates the obstacle avoidance angular speed corresponding to the obstacle avoidance linear speed based on the robot posture and the obstacle avoidance linear speed in a preset static obstacle avoidance path; the robot moves at the obstacle avoidance speed and obstacle avoidance angular speed according to the preset static obstacle avoidance path.

[0074] Specifically, the preset static obstacle avoidance path has a corresponding path curvature, which represents the degree to which the curve in the preset static obstacle avoidance path deviates from the straight line and is controlled by the linear velocity and angular velocity of the robot's movement. The robot must always meet the path curvature of the preset static obstacle avoidance path during movement to ensure that the robot does not deviate from the preset static obstacle avoidance path during movement.

[0075] After obtaining the obstacle avoidance linear velocity, the robot obtains the path curvature corresponding to the preset static obstacle avoidance path, and uses the path curvature and the obstacle avoidance linear velocity to calculate the obstacle avoidance angular velocity. Then the robot moves along the preset static obstacle avoidance path at the obstacle avoidance linear velocity and obstacle avoidance angular velocity.

[0076] In the above robot motion control method, the robot relative speed is obtained according to the robot speed and the obstacle speed, and then the relative position distance corresponding to each detection time point in the preset detection time period is calculated according to the current robot position, the current dynamic obstacle position and the robot relative speed. The change in the distance between the robot and the dynamic obstacle can be determined according to the relative position distance, and it can be timely judged whether the robot and the dynamic obstacle will collide, thereby ensuring the accuracy of the collision detection between the robot and the dynamic obstacle. Then, the relative position distance of the target where the collision occurs is determined according to the relative position distance corresponding to each detection time point, and the collision start position is determined in the preset static obstacle avoidance path according to the detection time point corresponding to the target relative position distance, thereby achieving the recognition accuracy of the collision start position. Then, the obstacle avoidance speed is calculated according to the detection time point corresponding to the current robot position, the collision start position and the target relative position distance, and the obstacle avoidance speed is obtained. By controlling the robot to move according to the static obstacle avoidance path at the obstacle avoidance speed, the dynamic obstacles can be safely avoided, thereby improving the safety of the robot movement.

[0077] In one embodiment, step 204, performing position distance calculation based on the current robot position, the current dynamic obstacle position, the robot relative speed and the preset detection time period to obtain the relative position distance corresponding to each detection time point in the preset detection time period includes:

[0078] The moving distance of the robot is calculated based on the relative speed of the robot and each detection time point in the preset detection time period, and the moving distance of the robot corresponding to each detection time point is obtained;

[0079] Calculate the current robot position and the sum of the robot movement distances corresponding to each detection time point respectively, and obtain the robot detection position corresponding to each detection time point;

[0080] The difference between the robot detection position corresponding to each detection time point and the current dynamic obstacle position is calculated respectively to obtain the relative position distance corresponding to each detection time point.

[0081] Specifically, the robot uses each detection time point and the robot relative speed to perform product calculations to obtain the robot movement distance corresponding to each detection time point, and then calculates the sum of the current robot position and the robot movement distance corresponding to each detection time point to obtain the robot detection position corresponding to each detection time point. The robot calculates the difference between the robot detection position corresponding to each detection time point and the current dynamic obstacle position to obtain the relative position distance corresponding to each detection time point.

[0082] In a specific embodiment, when the robot and the dynamic obstacle are in motion, the robot speed is , the obstacle speed of the dynamic obstacle is , then the relative speed between the robot and the dynamic obstacle is As shown in formula (1).

[0083] Formula (1)

[0084] The current robot position of the robot is , the current dynamic obstacle position of the dynamic obstacle is , then the relative position between the robot and the dynamic obstacle As shown in formula (2).

[0085] Formula (2)

[0086] Based on the relative speed and relative position between the robot and the dynamic obstacle, calculate whether a collision will occur and when the collision will occur. The specific steps include:

[0087] Set a time threshold less than The detection time series As the detection time period, the change of the robot's position over time in the set detection time sequence is shown in formula (3): Indicates the robot detection position corresponding to each detection time point, which can represent the predicted position of the robot after moving. Indicates the position of the robot before it moves at a certain detection time point.

[0088] Formula (3)

[0089] The relative position distance of the robot to the dynamic obstacle at each detection time point is shown in formula (4): Indicates the relative position distance corresponding to each detection time point.

[0090] Formula (4)

[0091] The robot calculates the relative position distance corresponding to each detection time point and sets a safety distance threshold As the preset relative position distance threshold, when the relative position distance Less than the safety distance threshold , it is determined that the robot collides with a dynamic obstacle.

[0092] In this embodiment, by calculating the relative speed of the robot and calculating the relative position distance corresponding to each detection time point based on the relative speed of the robot and the current position of the robot, the position change between the robot and the dynamic obstacle can be reflected, so that collision detection between the robot and the dynamic obstacle can be realized based on the relative position distance, thereby improving the accuracy of the robot's collision detection.

[0093] In one embodiment, step 208, the obstacle avoidance speed is calculated based on the detection time point corresponding to the current robot position, the collision start position, and the target relative position distance to obtain the obstacle avoidance speed, including:

[0094] The position distance is calculated based on the current robot position and the collision starting position to obtain the collision starting distance;

[0095] Calculate the ratio of the collision start distance to the detection time point corresponding to the target relative position distance to obtain the collision speed;

[0096] A preset collision speed error is obtained, a speed threshold is calculated based on the preset collision speed error and the collision speed to obtain an obstacle avoidance speed threshold, and an obstacle avoidance speed is determined based on the obstacle avoidance speed threshold.

[0097] Specifically, the robot calculates the difference between the current robot position and the collision start position to obtain the collision start distance, which refers to the distance between the current robot position and the collision start position. Then the ratio of the detection time points corresponding to the collision start position and the target relative position distance is calculated to obtain the collision speed. Among them, the detection time point t corresponding to the target relative position distance s represents the time when the robot begins to collide with the dynamic obstacle, and the collision speed v represents the robot speed when the robot collides with the dynamic obstacle. The collision speed v is shown in formula (5).

[0098] Formula (5)

[0099] Since there is an error in the obstacle speed calculated based on the position of the dynamic obstacle in the robot map of the previous frame and the position of the dynamic obstacle in the robot map of the current frame, there is also an error in the collision speed calculated according to formulas (1)-(5). Therefore, in order to ensure the accuracy of the robot's obstacle avoidance speed, the collision speed needs to be corrected using the preset collision speed error.

[0100] After obtaining the collision speed, the robot obtains the preset collision speed error, calculates the speed threshold according to the preset collision speed error and the collision speed, obtains the obstacle avoidance speed threshold, and then the robot determines the obstacle avoidance speed according to the obstacle avoidance speed threshold.

[0101] In this embodiment, by calculating the collision speed according to the collision starting distance, and calculating the obstacle avoidance speed threshold according to the collision speed and the preset collision speed error, the accuracy of the robot's obstacle avoidance speed is ensured, thereby improving the safety of the robot's obstacle avoidance.

[0102] In a specific embodiment, as shown in FIG3 , a schematic diagram of a robot collision trajectory is provided. Obtain the obstacle speed corresponding to the dynamic obstacle, and obtain the movement direction of the dynamic obstacle. The movement trajectory of the dynamic obstacle is obtained according to the obstacle speed and movement direction of the dynamic obstacle. The gray arrow line segment is the movement trajectory of the dynamic obstacle, and the continuous dotted circle represents the dynamic obstacle moving along the movement trajectory. Then obtain the preset static obstacle avoidance path of the robot to generate the machine planning trajectory. The black arrow line segment represents the machine planning trajectory, and the continuous dotted box (including black and gray dotted boxes) represents the robot moving along the machine planning trajectory. Superimpose the movement trajectory of the dynamic obstacle and the machine planning trajectory of the robot according to the time series, as shown in FIG3 .

[0103] As can be seen from the figure, the position of the robot in the solid line frame is taken as the starting position of the robot, and the position of the dynamic obstacle in the solid line circle is taken as the starting position of the dynamic obstacle. The robot starts to move from the starting position along the machine planning trajectory, and the dynamic obstacle starts to move from the starting position along the motion trajectory. At time , the distance between the position the robot moves to and the starting position is At this time, the dynamic obstacle also moves to At the position corresponding to the moment, the dynamic obstacle and the robot begin to overlap. Then the robot and the dynamic obstacle continue to move. At time , the distance between the robot's moving position and the starting position is At this time, the dynamic obstacle also moves to At the position corresponding to the moment, the dynamic obstacle and the robot stop overlapping.

[0104] Obviously, the robot's machine planning trajectory and the motion trajectory of the dynamic obstacle are in the robot position. Overlap occurs, The robot moves at a distance arrive The robot position between arrive The robot continues to collide with dynamic obstacles during the process, which can be represented by a continuous black dashed box, and the gray dashed box indicates that the robot has not collided with the dynamic obstacle. The robot position where the robot collides with the dynamic obstacle The corresponding time is , indicating that the robot moves according to the machine planning trajectory. Moment When the robot reaches the corresponding position, the robot starts to collide with the dynamic obstacle. Moment When the robot reaches the corresponding position, the robot stops colliding with the dynamic obstacle. When the robot reaches the corresponding position, the robot stops colliding with the dynamic obstacle. is the collision starting distance, is the detection time point corresponding to the relative position distance of the target.

[0105] In one embodiment, the obstacle avoidance speed threshold includes an upper obstacle avoidance speed limit or a lower obstacle avoidance speed limit; the speed threshold is calculated based on a preset collision speed error and a collision speed to obtain the obstacle avoidance speed threshold, and the obstacle avoidance speed is determined based on the obstacle avoidance speed threshold, including:

[0106] Calculate the difference between the collision speed and the preset collision speed error to obtain the upper limit of the obstacle avoidance speed, determine a candidate obstacle avoidance speed that is less than the upper limit of the obstacle avoidance speed within the preset candidate obstacle avoidance speed range, and obtain the collision speed; or

[0107] The sum of the collision speed and the preset collision speed error is calculated to obtain the obstacle avoidance speed lower limit value, and a candidate obstacle avoidance speed greater than the obstacle avoidance speed lower limit value is determined within the preset candidate obstacle avoidance speed range to obtain the collision speed.

[0108] Specifically, the robot obtains the preset collision speed error, calculates the difference between the collision speed and the preset collision speed error, and obtains the upper limit of the obstacle avoidance speed, as shown in formula (6):

[0109] Formula (6)

[0110] Among them, the max(a,b) function means taking the maximum value of a and b, where a is , b is 0. Formula (6) indicates that when the robot moves at the collision speed, If a collision occurs at a certain position, a safety threshold can be set to ensure the safety of the robot movement. , that is, the preset collision speed error. By calculating the difference between the collision speed and the preset collision speed error, the upper limit of the obstacle avoidance speed is obtained, so that the robot can move on the machine planning trajectory at a slower speed that does not exceed the upper limit of the obstacle avoidance speed, allowing dynamic obstacles to pass first to achieve obstacle avoidance for the robot.

[0111] The robot calculates the sum of the collision speed and the preset collision speed error to obtain the lower limit of the obstacle avoidance speed, as shown in formula (7):

[0112] Formula (7)

[0113] It means that the robot obtains the lower limit of the obstacle avoidance speed by calculating the sum of the collision speed and the preset collision speed error, so that the robot can move on the machine planned trajectory at a faster speed than the lower limit of the obstacle avoidance speed, allowing the robot to pass first to achieve obstacle avoidance.

[0114] In this embodiment, by calculating the upper limit value and the lower limit value of the obstacle avoidance speed according to the collision speed and the preset collision speed error, and determining the obstacle avoidance speed according to the upper limit value or the lower limit value of the obstacle avoidance speed, the robot's obstacle avoidance requirements are met, thereby ensuring the robot's safe obstacle avoidance.

[0115] In a specific embodiment, as shown in FIG4 , a schematic diagram of a speed curve is provided. The arrow line segment is a machine speed curve representing the robot's movement speed. The st diagram in the figure shows that when the robot moves along the machine-planned trajectory, it will move to the s position of the trajectory at time t. The dependent variable s in the figure represents the movement distance of the robot from the starting position along the machine-planned trajectory to the position at any point on the trajectory, and the independent variable t represents time. For example, s=0 at t=0, and s=0 is the current position of the machine. The dynamic obstacle is predicted based on the obstacle speed. The robot will pass through the machine planning path within the time period path segment, the motion trajectory of the robot and the dynamic obstacle is located in the machine planning trajectory and are overlapping.

[0116] Since the movement speed of the robot in a certain frame of the robot map is fixed, the robot speed curve of the robot is presented as a straight line in the ST diagram, such as the straight line shown in Figure 4, which is also the collision speed of the robot, which can be obtained by or OK. and Point The line segment between represents the machine planning trajectory of the robot.

[0117] Since the obstacle speed predicted by the dynamic obstacle has errors, the collision position predicted by the obstacle speed and And the robot's collision speed also has errors, which can be converted into obstacle avoidance speed and preset collision speed error through the obstacle speed of the dynamic obstacle and its existing error. According to the obstacle avoidance speed and the preset collision speed error, the motion trajectory area of ​​the dynamic obstacle is constructed in the ST diagram, such as the gray square area shown in Figure 4. The overlapping area of ​​the gray square area and the line segment of the machine speed curve in Figure 4 represents the overlapping area of ​​the calculation trajectory of the dynamic obstacle and the machine planning trajectory of the robot. For example, a robot position in the machine planning trajectory corresponding to time t0, and multiple obstacle positions that may exist in the corresponding gray square area for dynamic obstacles.

[0118] Therefore, in order to avoid collision between the robot and dynamic obstacles, the robot's machine speed curve needs to not pass through the overlapping area represented by the gray square area in Figure 4. Therefore, the robot's machine speed curve can be obtained by setting a rotating straight line with a rotating point as the origin of the coordinates, and by changing the angle between the straight line and the coordinate axis, a curve with different speed values ​​can be obtained, as shown in the schematic diagram of speed curve planning in Figure 5.

[0119] In order to ensure that the rotating straight line does not overlap with the obstacle area, two critical safety speed curves can be determined according to the boundary points of the overlapping area of ​​the dynamic obstacle and the machine trajectory, such as the critical safety speed curve 1 and the critical safety speed curve 2 shown in Figure 5. The critical safety speed curve 1 is used as the upper limit of the obstacle avoidance speed, and the critical safety speed curve 2 is used as the lower limit of the obstacle avoidance speed. Then, two safe speed curve ranges can be determined as Range 1 and Range 2 according to the two critical safety speed curves 1 and 2. Among them, Range 1 represents the angle between the critical safety speed curve 1 and the horizontal axis, and the safety speed curve in the Range 1 range indicates that the robot is slowed down and travels at a lower speed to allow the dynamic obstacle to pass first; Range 2 represents the angle between the critical safety speed curve 2 and the vertical axis, and the safety speed curve in the Range 2 range indicates that the robot is accelerated and allowed to pass before the dynamic obstacle has passed. Since the robot speed in Range2 is greater than that in Range1, in order to avoid the unknown speed change of dynamic obstacles, which may cause the robot to collide with dynamic obstacles while passing through them with a larger robot speed, a smaller robot speed is selected to move and wait for the dynamic obstacles to pass through first, which can ensure the movement safety of the robot. Preferably, a safe speed curve is selected in Range1, such as a machine speed curve represented by a straight line whose angle with the horizontal axis is less than Range1, that is, a robot speed less than the upper limit of the obstacle avoidance speed is selected.

[0120] In a specific embodiment, the robot can select any machine speed curve within the safe speed curve range according to the ST diagram, and obtain the angle between the machine speed curve and the coordinate axis; perform inverse trigonometric function calculation on the angle according to the preset time length to obtain the distance length; then determine the speed value corresponding to the selected machine speed curve according to the time length and the distance length to obtain the obstacle avoidance speed.

[0121] In one embodiment, before obtaining the current robot position, the current dynamic obstacle position and the robot relative speed in step 202, the method further includes:

[0122] Obtain the current obstacle map and the initial planned path, and determine the obstacle path in the initial planned path based on the obstacle positions in the current obstacle map;

[0123] Based on the path starting point and path end point corresponding to the obstacle path, obstacle avoidance path planning is performed in the current obstacle map to obtain an initial obstacle avoidance path;

[0124] The path is smoothed based on the initial obstacle avoidance path to obtain a preset static obstacle avoidance path.

[0125] The obstacle path refers to the path segment where obstacles exist in the initial obstacle avoidance path.

[0126] Specifically, the robot obtains a current obstacle map, which may include an initial planned path. The current obstacle map may be a map updated from a historical obstacle map according to current environmental information. The robot determines a local path with obstacles in the initial planned path as an obstacle path according to the obstacle positions in the current obstacle map.

[0127] Determine the path location and path end point in the obstacle path, and plan the obstacle avoidance path based on the path location and path end point. The robot can use the path search algorithm to search for a path from the path start point to the path end point to obtain the initial obstacle avoidance path. The path search algorithm is, for example, the A* algorithm, the DFS (Depth Frist Search) algorithm, the Dijkstra (shortest path) algorithm, etc. The initial obstacle avoidance path is used to replace the obstacle path. Then the robot can use the smoothing algorithm to smooth the initial obstacle avoidance path to obtain a preset static obstacle avoidance path.

[0128] In a specific embodiment, the robot obtains a robot map of the current frame. When there is an obstacle in the robot map of the current frame, the robot map is used as a map of a static obstacle scene and trajectory planning of the static obstacle is performed. The specific steps are as follows:

[0129] When the robot performs path planning in the set area, an initial planning path that can cover the entire area is generated in the set area, such as a cleaning path, as shown in Figure 6. The black filled rectangle is the robot, the black solid line with an arrow is the initial planning path, and the outermost rectangular box is the set area.

[0130] Then, according to the position of the machine on the initial planned trajectory, a path segment with a set path length of PATH_LENGTH is intercepted from the initial planned path, as shown in the schematic diagram of the intercepted path segment in FIG7 .

[0131] The robot detects whether there is a static obstacle on the intercepted path segment. If not, the robot's motion trajectory is generated according to the intercepted path segment. If there is a static obstacle, the intercepted path segment is determined to be an obstacle path, and a path search algorithm is called to search for a path from the robot's position to the end point of the intercepted path segment to replace the intercepted path segment. The path search algorithm is, for example, the A* algorithm, to obtain an initial obstacle avoidance path (A* search path), as shown in the schematic diagram of the search path in Figure 8.

[0132] Convert the initial obstacle avoidance path into the initial obstacle avoidance trajectory. The initial obstacle avoidance trajectory is pre-set to consist of a series of trajectory points. The schematic diagram of the trajectory point is shown in Figure 9. The black filled rectangle is the robot, and the black arrow indicates that the trajectory point is in the tangent direction of the initial obstacle avoidance trajectory at this point. Represents the coordinates and orientation of the trajectory point, Indicates the time required for the robot to move from the current trajectory point to the next trajectory point. It can be used to calculate the speed that the robot should execute. The distance between the two trajectory points is calculated based on the coordinates of the current trajectory point and the next trajectory point. Then the ratio of distance and time is calculated to get the speed of the robot, which means the speed at which the machine moves from the current trajectory point to the next trajectory point.

[0133] The initial obstacle avoidance trajectory can be obtained by discretizing the initial obstacle avoidance path. For example, the point spacing of discrete sampling is set to DIST_OFFSET, and the initial obstacle avoidance path is discretized according to the point spacing to obtain discrete trajectory points corresponding to the initial obstacle avoidance trajectory, as shown in the schematic diagram of discrete trajectory points in FIG10 .

[0134] Get the coordinates of discrete trajectory points from the initial obstacle avoidance trajectory , the orientation of the discrete trajectory point is calculated based on the coordinates of the two discrete trajectory points: , as shown in formula (8):

[0135] Formula (8)

[0136] Then the time of discrete trajectory points is calculated based on the maximum running speed of the machine SPPED_MAX and the point spacing DIST_OFFSET of discrete trajectory points. , is a fixed value, as shown in formula (9):

[0137] Formula (9)

[0138] Since the discrete trajectory points are not very smooth and cannot be used directly to control the robot's motion, it is necessary to iteratively optimize and solve the discrete trajectory points so that the path generated by the final optimized trajectory points is smooth enough, the path is executable and will not hit obstacles, and the speed is within the executable range of the robot.

[0139] The path smoothing formula is shown in formula (10):

[0140] Formula (10)

[0141] The expression formula for discrete trajectory points away from obstacles is shown in formula (11):

[0142] Formula (11)

[0143] in is the penalty function for obstacle avoidance distance. If x ≥ 0, , if x<0, , Indicates the obstacle point closest to the current trajectory point The distance It is the minimum distance that a discrete trajectory point needs to maintain with the nearest obstacle point.

[0144] The speed constraint expression is shown in formula (12):

[0145] Formula (12)

[0146] in is the speed penalty function, if x≤0, , if x>0, , It is the maximum running speed value of the machine.

[0147] The objective function of path optimization solution is shown in formula (13):

[0148] Formula (13)

[0149] in is the weight of the trajectory smoothing term, is the weight of the obstacle avoidance item, is the weight of the speed term.

[0150] The optimization function is shown in formula (14):

[0151] Formula (14)

[0152] This optimization function can be optimized and solved through an optimizer (ceres, g2o, etc.), and the result of the solution is the optimized trajectory points. The final output static obstacle avoidance path is generated according to the optimized trajectory points as the preset static obstacle avoidance path for subsequent use. The preset static obstacle avoidance path includes various path points, as shown in the schematic diagram of the static obstacle avoidance path in Figure 11.

[0153] In this embodiment, an obstacle path with obstacles is determined in the initial planning path, and an initial obstacle avoidance path is obtained by performing obstacle avoidance path planning, so as to avoid collisions caused by the robot moving along the obstacle path, thereby ensuring the safety of the robot's movement. Then, the initial obstacle avoidance path is smoothed to obtain a static obstacle avoidance path, thereby improving the safety of the static obstacle avoidance path.

[0154] In one embodiment, before obtaining the current robot position, the current dynamic obstacle position and the robot relative speed in step 202, the method further includes:

[0155] Get the starting position of the obstacle corresponding to the starting time point and the ending position of the obstacle corresponding to the ending time point in the historical time period;

[0156] The obstacle moving distance is calculated based on the obstacle starting position and the obstacle ending position. When the obstacle moving distance exceeds the preset displacement threshold, the current obstacle position is obtained to obtain the current dynamic obstacle position.

[0157] Obstacle speed is obtained by calculating the speed based on the obstacle moving distance and historical time period;

[0158] Get the current robot speed, calculate the difference between the current robot speed and the obstacle speed, and get the relative speed of the robot.

[0159] Specifically, the robot collects multiple consecutive frames of obstacle maps in the historical time period, extracts the obstacle position in the obstacle map corresponding to the starting time point as the obstacle location, then extracts the obstacle position in the obstacle map corresponding to the ending time point as the obstacle end position, and calculates the difference between the obstacle starting position and the obstacle end position to obtain the obstacle moving distance. When the obstacle moving distance exceeds the preset displacement threshold, the obstacle is determined to be a dynamic obstacle.

[0160] The robot obtains the current obstacle position to obtain the current dynamic obstacle position, and calculates the ratio of the obstacle moving distance and the historical time period to obtain the obstacle speed.

[0161] In a specific embodiment, since the coordinates of a static obstacle in the obstacle map do not change with time, as shown in the schematic diagram of a static obstacle in FIG12 , wherein the horizontal axis t represents time, and the vertical axis p represents the coordinates of the obstacle in the obstacle map, FIG12 represents a static obstacle whose coordinates remain unchanged with time; while the coordinates of a dynamic obstacle in the obstacle map will change with time, as shown in the schematic diagram of a dynamic obstacle in FIG13 , wherein the horizontal axis t represents time, and the vertical axis p represents the coordinates of the obstacle in the obstacle map, FIG13 represents a dynamic obstacle whose coordinates change with time.

[0162] After the robot detects an obstacle, it needs to perform dynamic obstacle detection on the obstacle. The specific steps are as follows:

[0163] Since a single obstacle may be represented as multiple obstacle points in the perception map, the obstacle points are clustered using a preset clustering algorithm (such as the K-Means clustering algorithm, the DBSCAN clustering algorithm, etc.), and the obstacle points belonging to the same obstacle are marked as one class, as shown in the obstacle point clustering diagram in FIG14 .

[0164] Then, the clustered obstacle points can be enclosed by a minimum circumscribed circle, and then the center point coordinates and radius size of the obstacle can be determined according to the enclosing range of the clustered obstacle points. The schematic diagram of enclosing obstacle points shown in FIG15 shows that the center point coordinates and radius size of the clustered obstacle point a are (x, y, r).

[0165] The position of each obstacle can be marked in the robot map of the previous frame, and a search box can be set. Then, in the robot map of the current frame, it is detected whether the position of the obstacle in the search box has changed. If the position of the obstacle in the search box has not changed compared with the obstacle position in the previous frame, the obstacle is determined to be a static obstacle. If the position has changed, the obstacle is determined to be a dynamic obstacle. The schematic diagram of the obstacle search box shown in FIG16 shows that the current obstacle position of the dynamic obstacle in the search box is offset to the right compared with the obstacle position in the previous frame, and the current obstacle position of the static obstacle is the same as the obstacle position in the previous frame.

[0166] After the robot determines that the obstacle is a dynamic obstacle, it determines the movement direction and speed of the dynamic obstacle based on the obstacle position in the current frame and the obstacle position in the previous frame. The obstacle speed is a directed speed. The obstacle movement direction shown in Figure 17 is a schematic diagram showing the movement direction of the dynamic obstacle from the obstacle position in the previous frame. Move to the obstacle position of the current frame .

[0167] The robot moves according to the obstacle position in the previous frame. and the obstacle position of the current frame , and the time interval between two frames Calculate the heading of the obstacle, as shown in formula (15):

[0168] Formula (15)

[0169] The scalar velocity v of a dynamic obstacle is shown in formula (16):

[0170] Formula (16)

[0171] Directed velocity of dynamic obstacles As shown in formula (17):

[0172] Formula (17)

[0173] In this embodiment, dynamic obstacle detection is performed on the obstacle according to the obstacle moving distance, and then the obstacle speed is calculated according to the obstacle moving distance and the historical time period, so that the robot can be subsequently subjected to collision detection according to the obstacle speed, thereby achieving obstacle avoidance control of the robot based on the collision detection results, thereby retaining the robot's movement safety.

[0174] In one embodiment, step 204, performing position distance calculation based on the current robot position, the current dynamic obstacle position, the robot relative speed and the preset detection time period to obtain the relative position distance corresponding to each detection time point in the preset detection time period includes:

[0175] Determine the relative direction of the obstacle based on the current dynamic obstacle position and the current robot position, and determine the relative speed direction based on the robot relative speed;

[0176] The direction angle between the relative speed direction and the relative direction of the obstacle is calculated. When the direction angle is less than the preset collision detection angle, the position distance is calculated based on the current robot position, the current dynamic obstacle position, the robot relative speed and the preset detection time period to obtain the relative position distance corresponding to each detection time point in the preset detection time period.

[0177] Specifically, the robot determines the relative direction of the obstacle according to the current dynamic obstacle position and the current robot position, and determines the relative speed direction according to the robot relative speed. Then, the direction angle between the relative speed direction and the relative direction of the obstacle is calculated, and the robot performs collision detection according to the direction angle.

[0178] When the robot detects that the direction angle is less than the preset collision detection angle, it means that there is a risk of collision with a dynamic obstacle when the robot moves at the current robot speed. In this case, it is necessary to perform collision detection on the robot, that is, to calculate the position distance based on the current robot position, the current dynamic obstacle position, the robot relative speed and the preset detection time period, and obtain the relative position distance corresponding to each detection time point in the preset detection time period. By comparing the relative position distance corresponding to each detection time point with the preset relative position distance threshold, it is determined whether the robot collides with the dynamic obstacle.

[0179] If the detected direction angle is less than the preset collision detection angle, it means that there is no risk of collision with dynamic obstacles when the robot moves at the current robot speed. In this case, no processing is performed and the robot is controlled to move at the current robot speed according to the preset static obstacle avoidance path.

[0180] In a specific embodiment, as shown in FIG18 , a schematic diagram of a collision detection range is provided.

[0181] The robot determines the relative direction of the obstacle based on the current dynamic obstacle position and the current robot position, and calculates the difference between the current dynamic obstacle position and the current robot position to obtain the current position distance.

[0182] The robot can set a collision detection range based on the current robot position and the current position distance. The collision detection range is used to determine whether to perform robot collision detection. Specifically, the current robot position is used as the center of the circle, the relative direction of the obstacle is used as the midline of the collision detection range, and then a fan-shaped area with a preset angle is generated with the current position distance as the radius. The preset angle is, for example, 90°.

[0183] The robot then determines the direction of the relative speed based on the relative speed of the robot. When it is detected that the direction of the relative speed is not within the fan-shaped area corresponding to the collision detection area, it is determined that the robot is safe during the movement of the robot according to the current robot speed; if it is detected that the direction of the relative speed is within the fan-shaped area corresponding to the collision detection area, the robot is subjected to collision detection.

[0184] In this embodiment, by constructing a collision detection area and determining whether there is a risk of collision between the robot and a dynamic obstacle based on the relative speed direction and the collision detection area, unnecessary calculation of collision detection can be avoided and computing resources can be saved.

[0185] In one embodiment, moving at an obstacle avoidance speed according to a preset static obstacle avoidance path includes:

[0186] Obtaining the target curvature, which is calculated based on the posture and interval time corresponding to the path points in the preset static obstacle avoidance path, and obtaining the robot linear velocity and robot angular velocity corresponding to the preset static obstacle avoidance path, and obtained based on the ratio of the robot angular velocity to the robot linear velocity;

[0187] Obstacle avoidance angular velocity is obtained by multiplying the target curvature and the obstacle avoidance speed;

[0188] Move along the preset static obstacle avoidance path at the obstacle avoidance speed and obstacle avoidance angular velocity.

[0189] Specifically, after the robot calculates the obstacle avoidance speed threshold, it can select the path point closest to the robot and its next path point in the preset static obstacle avoidance path, as shown in the schematic diagram of the path point in Figure 19, where the black filled rectangle is the robot, the black arrow indicates that the trajectory point is in the tangent direction of the initial obstacle avoidance trajectory at this point, indicating the selected path point closest to the robot (the black point close to the robot) and the next path point for calculating the speed control information. The position and time of the next path point are .

[0190] Set the robot's current path point position to , the position and time of the next path point are , then the linear speed of the robot moving along the preset static obstacle avoidance path As shown in formula (18):

[0191] Formula (18)

[0192] The angular velocity of the robot moving along the preset static obstacle avoidance path As shown in formula (19):

[0193] Formula (19)

[0194] Normal_angle() is used for normalization to ensure that the output value is in the range of (-π,π].

[0195] The robot obtains the path curvature corresponding to the preset static obstacle avoidance path. The path curvature is generally the target curvature. The calculation of the target curvature curv is shown in formula (20). The target curvature represents the robot motion parameter that controls the robot to move in the preset static obstacle avoidance path according to the target curvature without path deviation.

[0196] Formula (20)

[0197] To avoid collision between the robot and dynamic obstacles, the target linear velocity of the robot moving on the preset static obstacle avoidance path can be set as , which is the obstacle avoidance speed, where satisfy , It can refer to the upper limit of obstacle avoidance speed; or satisfy , It can refer to the lower limit of obstacle avoidance speed, and a refers to the maximum upper limit of obstacle avoidance speed. Therefore, the obstacle avoidance angular velocity of the robot moving on the preset static obstacle avoidance path is .

[0198] The robot moves along a preset static obstacle avoidance path at a target linear velocity and target angular velocity, and can avoid dynamic obstacles.

[0199] In a specific embodiment, as shown in FIG20 , a flow chart of robot obstacle avoidance control is provided. The robot treats all obstacles in the robot map of the current frame as static obstacles and performs obstacle avoidance trajectory planning; then, dynamic obstacle detection is performed based on the position of the obstacle in the robot map of the previous frame and the position of the obstacle in the robot map of the current frame to determine whether the obstacle is a dynamic obstacle. When the obstacle is a static obstacle, the robot is controlled to move according to the obstacle avoidance trajectory at the current robot speed.

[0200] When the obstacle is a dynamic obstacle, the motion trajectory of the dynamic obstacle in the future is generated according to the current speed and movement direction of the dynamic obstacle; according to the relative position distance between the dynamic obstacle and the robot in the initial obstacle avoidance path of the robot, it is judged whether the robot will collide with the dynamic obstacle; if a collision will occur, obstacle avoidance speed planning is performed to determine the robot's obstacle avoidance speed, and then the robot is controlled to move at the obstacle avoidance speed according to the obstacle avoidance trajectory; if no collision will occur, the robot is controlled to move at the current robot speed according to the obstacle avoidance trajectory.

[0201] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0202] Based on the same inventive concept, the embodiment of the present application also provides a robot operation control device for implementing the robot motion control method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more robot operation control device embodiments provided below can refer to the limitations of the robot motion control method above, and will not be repeated here.

[0203] In an exemplary embodiment, as shown in FIG. 21 , a robot operation control device 2100 is provided, comprising: an acquisition module 2102, a distance calculation module 2104, a collision position determination module 2106 and an obstacle avoidance module 2108, wherein:

[0204] An acquisition module 2102 is used to acquire the current robot position, the current dynamic obstacle position and the robot relative speed, where the robot relative speed is obtained based on the robot speed and the obstacle speed;

[0205] The distance calculation module 2104 is used to calculate the position distance based on the current robot position, the current dynamic obstacle position, the relative speed of the robot and the preset detection time period, and obtain the relative position distance corresponding to each detection time point in the preset detection time period;

[0206] A collision position determination module 2106 is used to obtain a preset static obstacle avoidance path, determine a target relative position distance that meets a preset collision start distance condition from the relative position distances corresponding to each detection time point, and determine a collision start position in each static obstacle avoidance position of the static obstacle avoidance path based on the detection time point corresponding to the target relative position distance;

[0207] The obstacle avoidance module 2108 is used to calculate the obstacle avoidance speed based on the detection time point corresponding to the current robot position, the collision starting position, and the target relative position distance, obtain the obstacle avoidance speed, and move at the obstacle avoidance speed according to the preset static obstacle avoidance path.

[0208] In one embodiment, the distance calculation module 2104 includes:

[0209] The moving distance calculation unit is used to calculate the moving distance based on the relative speed of the robot and each detection time point in the preset detection time period, so as to obtain the robot moving distance corresponding to each detection time point; respectively calculate the sum of the current robot position and the robot moving distance corresponding to each detection time point, so as to obtain the robot detection position corresponding to each detection time point; respectively calculate the difference between the robot detection position corresponding to each detection time point and the current dynamic obstacle position, so as to obtain the relative position distance corresponding to each detection time point.

[0210] In one embodiment, the obstacle avoidance module 2108 includes:

[0211] The collision speed calculation unit is used to calculate the position distance based on the current robot position and the collision starting position to obtain the collision starting distance; calculate the ratio of the detection time point corresponding to the collision starting distance and the target relative position distance to obtain the collision speed; obtain the preset collision speed error, calculate the speed threshold based on the preset collision speed error and the collision speed, obtain the obstacle avoidance speed threshold, and determine the obstacle avoidance speed based on the obstacle avoidance speed threshold.

[0212] In one embodiment, the obstacle avoidance module 2108 includes:

[0213] The speed threshold determination unit is used to calculate the difference between the collision speed and the preset collision speed error to obtain the upper limit of the obstacle avoidance speed, determine the candidate obstacle avoidance speed that is less than the upper limit of the obstacle avoidance speed within the preset candidate obstacle avoidance speed range, and obtain the collision speed; or calculate the sum of the collision speed and the preset collision speed error to obtain the lower limit of the obstacle avoidance speed, determine the candidate obstacle avoidance speed that is greater than the lower limit of the obstacle avoidance speed within the preset candidate obstacle avoidance speed range, and obtain the collision speed.

[0214] In one embodiment, the robot operation control device 2100 further includes:

[0215] The path planning unit is used to obtain the current obstacle map and the initial planned path, determine the obstacle path in the initial planned path based on the obstacle position in the current obstacle map; perform obstacle avoidance path planning in the current obstacle map based on the path starting point and path end point corresponding to the obstacle path to obtain the initial obstacle avoidance path; perform path smoothing based on the initial obstacle avoidance path to obtain a preset static obstacle avoidance path.

[0216] In one embodiment, the robot operation control device 2100 further includes:

[0217] The relative speed calculation unit is used to obtain the obstacle starting position corresponding to the starting time point and the obstacle end position corresponding to the end time point in the historical time period; calculate the obstacle movement distance based on the obstacle starting position and the obstacle end position, and when the obstacle movement distance exceeds a preset displacement threshold, obtain the current obstacle position to obtain the current dynamic obstacle position; perform speed calculation based on the obstacle movement distance and the historical time period to obtain the obstacle speed; obtain the current robot speed, calculate the difference between the current robot speed and the obstacle speed, and obtain the robot relative speed.

[0218] In one embodiment, the distance calculation module 2104 includes:

[0219] The direction angle detection unit is used to determine the relative direction of the obstacle based on the current dynamic obstacle position and the current robot position, and determine the relative speed direction based on the robot relative speed; calculate the direction angle between the relative speed direction and the relative direction of the obstacle, and when the direction angle is less than a preset collision detection angle, perform position distance calculation based on the current robot position, the current dynamic obstacle position, the robot relative speed and a preset detection time period to obtain the relative position distance corresponding to each detection time point in the preset detection time period.

[0220] Each module in the above robot operation control device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0221] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG22. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as the current robot position and the current robot position. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a robot motion control method is implemented.

[0222] Those skilled in the art will understand that the structure shown in FIG. 22 is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0223] In one embodiment, a robot is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0224] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0225] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0226] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0227] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0228] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0229] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A robot motion control method, characterized in that: The method comprises: Obtaining the current robot position, the current dynamic obstacle position and the robot relative speed, wherein the robot relative speed is obtained according to the robot speed and the obstacle speed; Performing position distance calculation based on the current robot position, the current dynamic obstacle position, the robot relative speed and a preset detection time period to obtain a relative position distance corresponding to each detection time point in the preset detection time period; Obtain a preset static obstacle avoidance path, determine a target relative position distance that meets a preset collision starting distance condition from the relative position distances corresponding to each detection time point, and determine a collision starting position in each static obstacle avoidance position of the preset static obstacle avoidance path based on the detection time point corresponding to the target relative position distance; the preset static obstacle avoidance path is a path obtained by planning an obstacle avoidance path using dynamic obstacles as static obstacles in a robot map of a current frame; the collision starting position is obtained based on a static obstacle avoidance position of a target planning time point in the preset static obstacle avoidance path that matches a detection time point corresponding to the target relative position distance; the target relative position distance is determined based on the first relative position distance that does not exceed a preset relative position distance threshold value among the relative position distances corresponding to each detection time point; The obstacle avoidance speed is calculated based on the detection time point corresponding to the current robot position, the collision starting position, and the target relative position distance, to obtain the obstacle avoidance speed, and the robot moves at the obstacle avoidance speed according to the preset static obstacle avoidance path.

2. The method according to claim 1, characterized in that The position distance calculation is performed based on the current robot position, the current dynamic obstacle position, the robot relative speed and the preset detection time period to obtain the relative position distance corresponding to each detection time point in the preset detection time period, including: Calculate the moving distance of the robot based on the relative speed of the robot and each detection time point in the preset detection time period to obtain the robot moving distance corresponding to each detection time point; Calculating the sum of the current robot position and the robot movement distance corresponding to each detection time point respectively, to obtain the robot detection position corresponding to each detection time point; The difference between the robot detection position corresponding to each detection time point and the current dynamic obstacle position is calculated respectively to obtain the relative position distance corresponding to each detection time point.

3. The method according to claim 1, characterized in that The obstacle avoidance speed is calculated based on the detection time point corresponding to the current robot position, the collision starting position, and the target relative position distance to obtain the obstacle avoidance speed, including: Performing position distance calculation based on the current robot position and the collision starting position to obtain a collision starting distance; Calculate the ratio of the collision start distance to the detection time point corresponding to the target relative position distance to obtain the collision speed; A preset collision speed error is obtained, a speed threshold is calculated based on the preset collision speed error and the collision speed to obtain an obstacle avoidance speed threshold, and the obstacle avoidance speed is determined based on the obstacle avoidance speed threshold.

4. The method according to claim 3, characterized in that The obstacle avoidance speed threshold includes an upper obstacle avoidance speed limit or a lower obstacle avoidance speed limit; the speed threshold is calculated based on the preset collision speed error and the collision speed to obtain the obstacle avoidance speed threshold, and the obstacle avoidance speed is determined based on the obstacle avoidance speed threshold, including: Calculating the difference between the collision speed and the preset collision speed error to obtain the obstacle avoidance speed upper limit, determining a candidate obstacle avoidance speed that is less than the obstacle avoidance speed upper limit within a preset candidate obstacle avoidance speed range to obtain the collision speed; or, The sum of the collision speed and the preset collision speed error is calculated to obtain the obstacle avoidance speed lower limit value, and a candidate obstacle avoidance speed greater than the obstacle avoidance speed lower limit value is determined within a preset candidate obstacle avoidance speed range to obtain the collision speed.

5. The method according to claim 1, characterized in that Before obtaining the current robot position, the current dynamic obstacle position and the relative speed of the robot, the method further includes: Obtaining a current obstacle map and an initial planned path, and determining an obstacle path in the initial planned path based on obstacle positions in the current obstacle map; Performing obstacle avoidance path planning in the current obstacle map based on the path starting point and the path end point corresponding to the obstacle path, to obtain an initial obstacle avoidance path; Path smoothing is performed based on the initial obstacle avoidance path to obtain the preset static obstacle avoidance path.

6. The method according to claim 1, characterized in that Before obtaining the current robot position, the current dynamic obstacle position and the relative speed of the robot, the method further includes: Get the starting position of the obstacle corresponding to the starting time point and the ending position of the obstacle corresponding to the ending time point in the historical time period; Calculating the obstacle moving distance based on the obstacle starting position and the obstacle ending position, and when the obstacle moving distance exceeds a preset displacement threshold, acquiring the current obstacle position to obtain the current dynamic obstacle position; Calculating the speed based on the obstacle moving distance and the historical time period to obtain the obstacle speed; The current robot speed is obtained, and the difference between the current robot speed and the obstacle speed is calculated to obtain the relative speed of the robot.

7. The method according to claim 1, characterized in that The position distance calculation is performed based on the current robot position, the current dynamic obstacle position, the robot relative speed and the preset detection time period to obtain the relative position distance corresponding to each detection time point in the preset detection time period, including: Determine the relative direction of the obstacle based on the current dynamic obstacle position and the current robot position, and determine the relative speed direction based on the robot relative speed; The direction angle between the relative speed direction and the obstacle relative direction is calculated. When the direction angle is less than a preset collision detection angle, a position distance calculation is performed based on the current robot position, the current dynamic obstacle position, the robot relative speed and a preset detection time period to obtain the relative position distance corresponding to each detection time point in the preset detection time period.

8. A robot motion control device, characterized in that: The device comprises: An acquisition module is used to acquire the current robot position, the current dynamic obstacle position and the robot relative speed, wherein the robot relative speed is obtained according to the robot speed and the obstacle speed; A distance calculation module is used to perform position distance calculation based on the current robot position, the current dynamic obstacle position, the robot relative speed and a preset detection time period, and obtain the relative position distance corresponding to each detection time point in the preset detection time period; A collision position determination module is used to obtain a preset static obstacle avoidance path, determine a target relative position distance that meets a preset collision starting distance condition from the relative position distances corresponding to each detection time point, and determine a collision starting position in each static obstacle avoidance position of the preset static obstacle avoidance path based on the detection time point corresponding to the target relative position distance; the preset static obstacle avoidance path is a path obtained by planning an obstacle avoidance path using dynamic obstacles as static obstacles in a robot map of a current frame; the collision starting position is obtained based on a static obstacle avoidance position of a target planning time point in the preset static obstacle avoidance path that matches a detection time point corresponding to the target relative position distance; the target relative position distance is determined based on the first relative position distance that does not exceed a preset relative position distance threshold value among the relative position distances corresponding to each detection time point; The obstacle avoidance module is used to calculate the obstacle avoidance speed based on the detection time point corresponding to the current robot position, the collision starting position, and the target relative position distance, obtain the obstacle avoidance speed, and move at the obstacle avoidance speed according to the preset static obstacle avoidance path.

9. A robot comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.