Quadruped robot swinging leg obstacle avoidance method based on vision and path planning

Through global path planning and artificial potential field method, the swing leg trajectory of the quadruped robot is dynamically adjusted, which solves the problems of high energy consumption and poor stability of the quadruped robot when avoiding obstacles in complex terrain, and achieves effective detection of dynamic obstacles. Avoid.

CN118795894APending Publication Date: 2024-10-18NANJING WEILAN INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411171649.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2021-06-17
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

When existing quadruped robots swing their legs to avoid obstacles in complex terrain, the fixed trajectory leads to high energy consumption and poor stability, making it impossible to achieve dynamic obstacle avoidance.

Method used

A vision-based global path planning method is used, combined with an RGB-D camera to obtain the ground height map, the swing leg trajectory is dynamically adjusted, and the artificial potential field method is used to avoid obstacles within the prediction period.

Benefits of technology

It improves the ability of the quadruped robot to travel in complex terrain, avoids the situation where the swing legs are stuck by obstacles, reduces energy consumption, and achieves effective obstacle avoidance of sudden dynamic obstacles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118795894A_ABST
    Figure CN118795894A_ABST
Patent Text Reader

Abstract

The invention provides a quadruped robot swing leg obstacle avoidance method based on vision and path planning, which performs path planning on a swing leg based on visual information, and sets a prediction period to predict the swing leg in real time in a movement process to avoid colliding with an obstacle. According to the quadruped robot swing leg obstacle avoidance method provided by the invention, a method capable of dynamically adjusting the swing leg track in the movement process of the quadruped robot is provided, so that the traffic capacity of the quadruped robot in a complex terrain is greatly enhanced; according to the obstacle avoidance method, path planning is carried out on the swing legs, and path planning is carried out once before the feet of the swing legs are lifted every time, so that the situation that a certain swing leg is clamped by an obstacle is avoided; in addition, the obstacle avoidance method can avoid moving obstacles suddenly appearing in the space.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This invention is a divisional application for the patent application with application number 202110682708.X, invention name “A method for avoiding obstacles by swinging legs of a quadruped robot based on vision and path planning”, and application date June 17, 2021. Technical Field

[0002] The invention relates to the field of path planning for quadruped robots, and in particular to a leg swing obstacle avoidance method for quadruped robots based on vision and path planning. Background Art

[0003] Robot path planning is an important and basic problem in the field of robotics research. Robot path planning aims to find a path from the starting point to the end point for the robot, and to safely avoid all obstacles in the motion space. According to the robot's understanding of the information in its working environment, robot path planning can be roughly divided into two types, namely, path planning based on understanding of local environmental information (also known as local path planning) and path planning based on understanding of global environmental information (also known as global path planning). The former is that the robot extracts and understands the effective local environmental features through real-time fusion of information obtained by its various sensors, and plans the local path online in real time. It has high flexibility and real-time performance. Its disadvantage is that the path planned by relying on local environmental features may be the local optimal path or even an unreachable path to the target. The latter requires the mobile robot to build an abstract global map model of the environment image based on the understanding of the global information features of the environment, and use the search and optimization algorithm on the constructed global map model to obtain the global optimal path or a better path, and can guide the robot to move safely to the target in the actual environment. It mainly involves two parts: environmental map understanding and construction and path search and guidance strategy. When complete and accurate environmental information is available in advance, the global planning algorithm can plan a complete path from the starting point to the end point at one time. However, if a sudden threat is encountered during the robot's movement, the path of the global path planning algorithm cannot meet the requirements of avoiding the threat, and it must be combined with the local path planning algorithm to generate a real-time avoidance path.

[0004] At present, the mainstream mobile robots can be divided into three types: wheeled, tracked and legged. Among them, legged robots have the best performance on complex and rugged terrain, which is much better than wheeled and tracked robots. Among legged robots, from the perspective of energy efficiency value (CoT, Cost of Transport), the efficiency of quadruped robots is much higher than other multi-legged robots. Therefore, quadruped robots have extremely high research value and commercial value. In recent years, due to the development of machine vision and camera hardware technology, quadruped robots equipped with RGB-D cameras can obtain high-precision height map information, but most of the current quadruped robot products only use this visual information to plan the height and position of the foothold, and the swing leg trajectory still uses a fixed trajectory or a simple spline interpolation.

[0005] Since the control of legged robots requires a higher control frequency (greater than 500Hz), fixed trajectories are used to shorten the control cycle as much as possible. When the swing leg trajectory of a quadruped robot adopts a fixed trajectory, such as a Bezier curve, or simply uses fixed path points for cubic spline interpolation, when the robot finds an obstacle in front of the swing leg through the camera, it can only avoid the obstacle by raising the height of the swing leg or changing the foothold. However, frequently avoiding obstacles by raising the height of the swing leg will cause a lot of unnecessary energy consumption, and avoiding obstacles by changing the foothold may reduce the area of ​​the support plane formed by the supporting legs, reducing the stability of the entire robot system. At the same time, using a fixed swing leg trajectory cannot achieve dynamic obstacle avoidance of the swing leg. In most cases, legged robots use global path planning and local path planning to avoid obstacles as a whole, but these current legged robots ignore the swing leg trajectory planning.

[0006] Therefore, there is an urgent need for a quadruped robot leg swinging obstacle avoidance method, which can effectively reduce energy consumption when avoiding obstacles, improve the stability of the robot when avoiding obstacles, and achieve dynamic obstacle avoidance. Summary of the invention

[0007] In order to solve the above technical problems, the present invention provides a quadruped robot swing leg obstacle avoidance method based on vision and path planning, which is characterized by comprising the following steps: (1) obtaining a ground height map in real time through an RGB-D camera and recording obstacle information appearing therein; (2) starting the swing phase, performing global path planning according to the obtained ground height map to obtain a global path trajectory of the swing leg; (3) judging whether to enter a prediction cycle, if entering the prediction cycle, executing step (4); if not entering the prediction cycle, executing step (5); (4) predicting whether a collision occurs, if a collision is predicted, executing step (6); if no collision is predicted, Then execute step (5); (5) obtain the motion parameters of the global path planning, move along the global path trajectory, and execute step (7); (6) use the artificial potential field method to avoid obstacles, obtain the motion path trajectory and motion parameters calculated by the artificial potential field method, move along this path, and execute step (8); (7) determine whether the swing phase is over, if the swing phase has not ended, return to step (3); if the swing phase is over, execute step (9); (8) determine whether the swing phase is over or reaches the landing point, if the swing phase has not ended and has not reached the landing point, return to step (6); if the swing phase has ended or reached the landing point, execute step (9); (9) the swing phase is over.

[0008] The quadruped robot swing leg obstacle avoidance method based on vision and path planning provided in the present invention has the following advantages: (1) Based on the visual information of the RGB-D camera, the present invention uses a global path planning trajectory generation method and combines it with a dynamic path planning method to provide a method that can dynamically adjust the swing leg trajectory during the movement of the quadruped robot, greatly enhancing the quadruped robot's ability to pass in complex terrain; (2) The quadruped robot swing leg obstacle avoidance method provided in the present invention is to perform path planning for the swing leg. Before each leg is lifted during the swing phase, a path planning is performed to avoid a swing leg being stuck by an obstacle; (3) The quadruped robot swing leg obstacle avoidance method provided in the present invention can avoid moving obstacles that suddenly appear in space. In the present invention, during the prediction period of the swing phase, the latest acquired ground height map is combined to detect whether a dynamic moving obstacle appears, predict whether the swing leg will collide with the obstacle, and if a collision is predicted, the artificial potential field method is used to avoid the dynamic obstacle.

[0009] Preferably, when performing global path planning in step (2), the current position of the swing leg is taken as the starting point, and the heuristic landing point obtained by the heuristic algorithm is taken as the end point to obtain the global path trajectory of the swing leg.

[0010] Preferably, when performing global path planning, spline interpolation is performed based on the obtained global path points and the preset foot-lifting height to obtain the global path trajectory of the swinging leg.

[0011] Preferably, when performing global path planning in step (2), one of the following methods is used: topology method, visibility graph method, grid method, A* algorithm and RRT path planning algorithm.

[0012] Preferably, when selecting the prediction period, it is selected according to the update frequency of the ground height map and the control period of the control algorithm.

[0013] Preferably, when predicting whether a collision occurs in step (4), the joint value of the swing leg is inversely calculated through the foot end position of the swing leg and each leg joint of the swing leg is checked to see whether it will collide with the obstacle.

[0014] Preferably, the motion parameters of the global path planning include position, velocity and acceleration.

[0015] Preferably, the motion parameters calculated using the artificial potential field method include position, velocity and acceleration. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flow chart of a quadruped robot leg swinging obstacle avoidance method based on vision and path planning provided by the present invention.

[0017] Figure 2a It is an interpolated swing trajectory diagram of the foot end of the quadruped robot of the present invention along the path points in the ground plane direction (x, y); Figure 2b It is a trajectory diagram of the foot end of the quadruped robot of the present invention swinging up and down in the direction (z) perpendicular to the ground plane; Figure 2c It is a motion trajectory diagram of the interpolation trajectory obtained by the swing leg path planning of the present invention and the traditional fixed trajectory in three-dimensional space. DETAILED DESCRIPTION

[0018] The following is a detailed description of the technical means used by the present invention to achieve the intended purpose of the invention with reference to the drawings and preferred embodiments of the present invention.

[0019] like Figure 1 As shown, Figure 1 A flow chart of a quadruped robot leg swinging obstacle avoidance method based on vision and path planning provided by the present invention.

[0020] Step 101, obtain the ground height map in real time through the RGB-D camera, and record the obstacle information appearing therein. By installing an RGB-D camera on the quadruped robot, high-precision ground height information can be obtained in real time. The RGB-D camera is a new technology that has emerged in recent years. Functionally, it adds a depth measurement function to the function of an ordinary RGB camera. Therefore, the image obtained by the RGB-D camera is actually two images, one is an ordinary RGB three-channel color image, and the other is a depth image. The depth image is similar to a grayscale image. Each pixel value of the depth image is the actual distance between the sensor and the object. Usually, the RGB image and the depth image are aligned, and there is a one-to-one correspondence between their pixels. The RGB-D camera carried on the quadruped robot shoots the surrounding environment at a certain frequency and updates the obstacle information around the robot in real time. In this embodiment, the RGB-D camera updates the ground height map at a frequency of 10Hz. In addition, in order to reduce the amount of calculation and improve operating efficiency, the obstacles can be completed into a cuboid, such as Figure 2c shown.

[0021] Step 102, in the first control cycle when each swing leg starts to swing (i.e., at the beginning of the swing phase), global path planning is performed according to the ground height map obtained by the RGB-D camera to obtain the global path trajectory of the swing leg. When performing global path planning, the current position of the swing leg is taken as the starting point, and the heuristic landing point obtained by the heuristic algorithm of the comprehensive vision is taken as the end point, and global path planning is performed to obtain the global path trajectory of the swing leg, and an approximately optimal collision-free path is obtained, wherein the method for determining the end point specifically refers to obtaining the heuristic landing point by using the heuristic Raibert heuristic, and at the same time, a spiral search is performed around the obtained landing point by the comprehensive vision to determine the available heuristic landing point, and this available heuristic landing point is the required end point. The heuristic landing point obtained by the heuristic algorithm integrates the movement speed, direction and height information in the environment of the quadruped robot at this time, and the heuristic landing point helps the quadruped robot maintain the balance of the quadruped robot in the support phase and can avoid known obstacles in the environment. According to the obtained global path path point and the preset foot-lifting height, spline interpolation is performed to obtain the global path trajectory of the swing leg. Assume that the swing trajectory of the foot end trajectory in the three-dimensional directions of X, Y and Z includes: the foot end swings along the interpolation trajectory of the path point in the ground plane direction (x, y), and the foot end swings up and down in the direction perpendicular to the ground plane (z). Among them, the trajectory on the xy plane uses quintic spline interpolation, and the quintic spline interpolation is also used in the z direction. The swing trajectory is as follows Figure 2a and Figure 2bAs shown in . Using the quintic spline interpolation method to calculate the trajectory of the quadruped robot can ensure that the acceleration of the swing leg is continuous without jumps, and prevent the output torque of the quadruped robot's leg motor from being modulated, which affects the external force perception of the swing leg.

[0022] When performing global path planning, a variety of different methods can be used. The most commonly used global path planning algorithms include: topology method, visibility graph method, grid method, A* algorithm and RRT (Rapidly-Exploring Random Tree) path planning algorithm. Each algorithm has its advantages and disadvantages. You can choose the appropriate global path planning algorithm based on the actual application scenario of the robot.

[0023] The topological method refers to the process of dividing the environment to be planned into several sub-areas with consistent topological characteristics and connectivity, and finding a topological path on the network built on these connected areas instead of considering the precise location of obstacles in the environment when planning a path. However, the topological method can only reflect the interconnected relationship between points in the real environment, and cannot construct a map that is geometrically consistent with the real environment. In addition, the process of establishing a topological network using the topological method is quite complicated. In particular, how to effectively correct the existing topological network and how to increase the graphics speed when adding obstacles are issues to be solved. In order to further consider specific geometric details and geometric paths, that is, path planning methods based on free space, commonly used methods include visual graph methods, grid methods, etc.

[0024] The visual graph method assumes the robot and the obstacle as a point mass and an approximate polygon respectively, and uses visible line segments to connect the point mass, the target point, and the vertices of the polygon in an orderly combination, that is, the line cannot pass through the polygon of the obstacle, and the robot path planning problem is converted into a search for the shortest line segment set between the starting point and the target point. The A* algorithm or its improved algorithm is often used to search for the shortest path. Since the searched path is a line segment connecting the vertices of the obstacle, the robot is prone to collision with the obstacle. When there are many obstacles or feature information in the environment, the search time is long; in addition, the visual graph method has poor flexibility, poor adaptability to the environment and poor real-time performance, and cannot guarantee that the searched path is the global optimal, especially when the size of the robot is small, the search time is long.

[0025] The grid method uses two types of grids with different properties and different serial numbers to describe the robot's working environment, namely, free grids and obstacle grids. The free grid area does not contain obstacles, while the obstacle grid area contains obstacles. The robot path planning problem is converted into an ordered set of feasible grids in the search workspace. This method uses grids as the basic unit to record the robot's environmental information. The larger the grid scale, the rougher the description of the feature map, the worse the quality of the planned path, and the larger the error; the smaller the grid scale, the more accurate the description of environmental obstacles, and the better the quality of the planned path. However, the smaller the grid scale, the more storage space and the complexity of the search are required. Therefore, the appropriate grid scale and the corresponding algorithm for optimizing the search grid ordered set should be selected according to the specific application environment. The grid map can describe many characteristics of the real environment and achieve optimal time and space consumption. Therefore, the grid map is a widely used method for describing environmental maps. However, the grid method has high requirements for the size of the grid. If the grid scale is too large, the planned path will be very inaccurate; if the grid scale is too small, the search range of the algorithm will increase exponentially, the amount of calculation will be large, a large amount of storage space will be occupied, and the real-time performance will not be ideal.

[0026] A* algorithm is a classic path planning algorithm, which is used in path planning algorithms with a high probability. As a search method for solving the shortest path in a static road network, A* algorithm introduces global information in path planning, estimates the distance between the current node and the end point, and judges the possibility of the node being on the shortest route based on this, and chooses to expand the node in the direction with the least consumption. The algorithm finds the best path by looping through the surrounding node information based on the given map information, and its algorithm has good stability. However, since the A* algorithm consumes a lot of computing time based on the given map information and the traversal of the nodes, it is difficult to achieve global optimization design, and the real-time performance is poor and it cannot cope with new obstacles. The A* algorithm uses a heuristic search method, which greatly reduces the number of search nodes, thereby greatly improving the search efficiency. However, the algorithm may generate multiple paths with the least consumption at the same time, and cannot guarantee that the searched path is the optimal path. Moreover, if the obstacles in the environment are complex, the A* algorithm expands more nodes, which will also lead to low search efficiency. In addition, the path planned by the A* algorithm is prone to turning points. Considering the kinematic model of the actual robot, too many turning points are not conducive to the control of the robot.

[0027] The path planning algorithm based on the rapidly expanding random tree (RRT) avoids modeling the space by performing collision detection on the sampling points in the state space, and can effectively solve the path planning problems in high-dimensional space and complex constraints. The path planning algorithm based on the rapidly expanding random tree takes an initial point as the root node, and generates a random expansion tree by adding leaf nodes through random sampling. When the leaf node in the random tree contains the target point or enters the target area, a path from the initial point to the target point can be found in the random tree. The application of the RRT algorithm in static environments is relatively mature, but when it is applied to complex dynamic environments, due to the strong random scalability of the algorithm, the random tree may deviate from the target direction and increase the path planning time. In addition, when generating a random tree, the RRT algorithm may expand redundant nodes to join the random tree, causing the final planned path to oscillate and twist.

[0028] In one embodiment provided by the present invention, the global path planning algorithm adopts the RRT* path planning algorithm. The RRT algorithm does not return the optimal path, while the RRT* path planning algorithm can return an approximately optimal path.

[0029] Step 103, determine whether to enter the prediction cycle. If the prediction cycle is entered, step 104 is executed. If the prediction cycle is not entered, step 105 is executed. The main function of the prediction cycle is to detect the movement of the swing leg along the global trajectory according to a certain period, and detect whether the robot will hit an obstacle when moving along the current trajectory. When selecting the prediction cycle, it can be selected according to the update frequency of the high-precision map and the control cycle of the control algorithm. When selecting the prediction cycle, it can be selected based on experience. In order to ensure that the main frequency of the control algorithm is not significantly reduced, the prediction cycle can be 10 to 20 times the control cycle, but it should be less than the update cycle of the map. For example, if the update cycle of the high-precision map is 100ms / time and the control cycle is 2ms / time, the prediction cycle can be selected as 20ms / time, that is, a prediction is performed after every 10 control cycle iterations. The prediction frequency should be lower than the main frequency of the control algorithm, because the update of the trajectory requires a large amount of calculation. If calculation is performed in each control cycle, the main frequency of the control may be significantly reduced.

[0030] Step 104, predict whether a collision will occur. If a collision is predicted, step 106 is executed. If no collision is predicted, step 105 is executed. When the swing leg moves along the global path trajectory and enters the prediction cycle, the robot needs to judge based on the global path trajectory and the latest ground height map: if the movement continues according to the global path trajectory, whether the position of the foot end will cause the swing leg to collide with the obstacle during the prediction cycle. When predicting whether the swing leg collides with the obstacle, it is judged whether the height of the position where the foot end of the swing leg is located is lower than the height of the corresponding position in the latest ground height map. If the height of the position where the foot end of the swing leg is located is lower than the height of the corresponding position in the latest ground height map, it is judged that a collision will occur.

[0031] Step 105, obtain the motion parameters of the global path planning, and move along the global path trajectory. Here, the motion parameters of the global path planning include the position, velocity, and acceleration of the global path planning. In step 102, the global path trajectory of the swing leg has been obtained. When the robot has not entered the prediction cycle or the prediction of entering the prediction cycle will not cause a collision, the position, velocity, and acceleration of the global path planning will be obtained, and the robot will move along the global path trajectory. After executing step 105, execute step 107 to determine whether the swing phase has ended. If the swing phase has not ended, return to step 103 and continue to determine whether to enter the prediction cycle; if the swing phase has ended, execute step 109, and the swing phase ends.

[0032] Step 106, using the artificial potential field method to avoid obstacles, the robot obtains the position, velocity and acceleration calculated using the artificial potential field method. When the robot enters the prediction cycle and it is predicted that a collision will occur if the robot moves along the global path trajectory of the swinging leg, the robot will no longer move along the global path trajectory, but will use the artificial potential field method to avoid obstacles.

[0033] The artificial potential field method is an effective local path planning method. Its main idea is to describe the robot's working environment as a virtual potential field. The target point is the robot's gravitational source, and the obstacle is the robot's repulsive source. Under the combined force of the gravitational source and the repulsive source, the robot can effectively avoid obstacles in real time and move toward the target point along a collision-free path. The artificial potential field method is widely used in robot local path planning due to its advantages such as simple mathematical principles, high real-time performance, and smooth generated paths. However, this method has inherent defects: (1) Since the path it plans is based on limited local environmental information and lacks macroscopic self-regulation ability in the global environment, it is very easy to fall into local optimality; (2) Since force imbalance is the main factor in the robot's movement, it is very easy to reach force balance at non-target points, resulting in the phenomenon of unreachable targets; (3) In the narrow space between obstacles, it is very easy to fall into unstable states such as wandering and shaking. Although the artificial potential field method has the above defects, the present invention applies the artificial potential field method to avoid obstacles when the global path planning will cause a collision, that is, the position of the obstacle with a high probability has a large movement with the position during path planning. At this time, the swinging target will change from swinging to the target point first to avoiding collision first. At this time, the artificial potential field method will be a good dynamic obstacle avoidance method.

[0034] In the embodiment provided in the present invention, when the robot adopts the artificial potential field method to avoid obstacles, the local target path point is first obtained according to the global trajectory and the current swing phase. The local target path point is the next path point corresponding to the swing phase when the swing leg moves according to the global path trajectory. The total potential field of the artificial potential field method is composed of the gravitational field and the repulsive field:

[0035] U potential (p) = U att (p)+U rep (p), where p is the current foot position, U potential (p) is the total potential field of the robot at the current foot position p, U att (p) is the gravitational field of the robot at the current foot position p, U rep (p) is the repulsive force field of the robot at the current foot position p. The gravitational field can be calculated from the current foot position and the current target path point:

[0036]

[0037] Among them, ζ is the gravitational coefficient, α is the distance constant, and d is the distance between the current foot end position p and the target point. In this embodiment, in order to prevent the current foot end position from being too far away from the target point, a large gravitational field will be formed, causing the robot to move too fast. Therefore, we use a segmented gravitational potential function to solve this problem, that is, reduce the power of the distance when the distance is far.

[0038] The repulsive field is calculated by the distance between the current foot position and the obstacle:

[0039]

[0040] Among them, ρ(p) is the shortest distance between the current foot position and the obstacle surface, η is the repulsion coefficient, and ρ0 is the distance constant, which is the obstacle distance threshold. When the obstacle is greater than this distance, there will be no repulsion effect.

[0041] By calculating the gradients of the above-mentioned gravitational field and repulsive field, the force of the current foot position in the artificial potential field can be obtained, and the motion direction, speed, acceleration and position information can be obtained based on the force. And because the potential field is continuous, the obtained motion parameters are also continuous.

[0042] Through step 106, the motion path trajectory and motion parameters calculated when the artificial potential field method is used for obstacle avoidance can be obtained, and the robot moves along this path. Here, the motion parameters mainly include the position, velocity and acceleration calculated by the artificial potential field method. After executing step 106, step 108 is executed to determine whether the swing phase ends or reaches the landing point. If the swing phase of the robot's swing leg has not ended and it has not reached the landing point, then return to step 106 and continue to use the artificial potential field method for obstacle avoidance; if the swing phase of the robot's swing leg ends or reaches the landing point, then step 109 is executed, and the swing phase ends.

[0043] like Figure 2c As shown in Figure 2c It represents the representation in three-dimensional space of the motion trajectory obtained by using the quadruped robot swinging leg obstacle avoidance method based on vision and path planning provided in the present invention and the traditional fixed trajectory obstacle avoidance method. Figure 2c The points in represent the starting point and landing point of the swing leg. Figure 2c It can be seen that when the landing point is the same, the use of the traditional fixed trajectory obstacle avoidance method will collide with obstacles, while the use of the quadruped robot swinging leg obstacle avoidance method based on vision and path planning provided in the present invention can effectively avoid obstacles and achieve the purpose of obstacle avoidance.

[0044] The quadruped robot swing leg obstacle avoidance method based on vision and path planning provided in the present invention has the following advantages: (1) In the traditional swing leg trajectory generation method, fixed curve trajectory or fixed path point spline interpolation is mostly used. Although the traditional swing leg generation method has a small amount of calculation and a greatly shortened calculation cycle, the robustness in complex terrain is not good, and obstacle avoidance by adjusting the leg lift height of the swing leg is likely to cause unnecessary energy consumption. Compared with the traditional swing leg trajectory generation method, the present invention uses a global path planning trajectory generation method based on the visual information of the RGB-D camera and combines it with a dynamic path planning method to provide a method that can dynamically adjust the swing leg trajectory during the movement of the quadruped robot, greatly enhancing the quadruped robot's ability to pass in complex terrain. For example, when the height of the obstacle is 10 cm, when using the traditional fixed trajectory obstacle avoidance algorithm to avoid the obstacle, the robot's leg lift height must be above 10 cm. However, when using the swing leg obstacle avoidance algorithm in the present invention, the obstacle can be bypassed by performing path planning on the swing leg without having to lift the leg to above 10 cm. (2) The obstacle avoidance method for the swinging legs of a quadruped robot provided in the present invention is to perform path planning for the swinging legs. Before each leg is lifted during the swing phase, a path planning is performed, thus avoiding the following obstacles: Figure 2c As shown in the figure, when a swinging leg is stuck by an obstacle while moving using the traditional fixed trajectory obstacle avoidance method. When a quadruped robot moves at high speed, after a swinging leg is stuck, the force of the obstacle is likely to cause the entire robot to fall over and become inoperable. (3) The quadruped robot swinging leg obstacle avoidance method provided by the present invention can avoid moving obstacles that suddenly appear in space. In the present invention, during the prediction period of the swinging phase, the latest acquired ground height map will be combined to detect whether a dynamic moving obstacle appears, and it is predicted whether the swinging leg will collide with the obstacle. If a collision is predicted, the artificial potential field method is used to avoid the dynamic obstacle. When using the traditional obstacle avoidance method, if a high-speed moving obstacle suddenly appears in the field of view, the robot will not have time to adjust its posture to avoid the obstacle, because the traditional obstacle avoidance method does not dynamically update the swinging leg trajectory. Whether the moving obstacle will collide with the swinging leg depends only on whether the preset foot lift height is high enough or whether the landing point is selected well enough.

[0045] The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modifications to equivalent embodiments of equivalent changes using the technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the scope of the technical solution of the present invention.

Claims

1. A quadruped robot leg swing obstacle avoidance method based on vision and path planning, characterized in that: The following steps are involved: Use the RGB-D camera to obtain the ground height map in real time and record the obstacle information that appears in it; At the beginning of the swing phase, global path planning is performed based on the acquired ground height map to obtain the global path trajectory of the swing leg; The motion parameters of the global path planning include position, velocity and acceleration; Determine whether to enter the prediction cycle, and if so, predict whether a collision occurs; the prediction cycle is selected according to the update frequency of the ground height map and the control cycle of the control algorithm; If a collision is predicted, the artificial potential field method is used to avoid obstacles. The motion path trajectory and motion parameters calculated by the artificial potential field method are obtained, and the vehicle moves along this path to determine whether the swing phase has ended or reached the landing point. If the swing phase has ended or reached the landing point, the step of ending the swing phase is executed.

2. The quadruped robot swing leg obstacle avoidance method according to claim 1, characterized in that: The motion parameters calculated by the artificial potential field method include position, velocity and acceleration.

3. The quadruped robot swing leg obstacle avoidance method according to claim 1, characterized in that: The method further comprises: If the swing phase has not ended and the landing point has not been reached, return to the step of avoiding obstacles using the artificial potential field method, obtain the motion path trajectory and motion parameters calculated using the artificial potential field method, and move along the path.

4. The quadruped robot swing leg obstacle avoidance method according to any one of claims 1 to 3, characterized in that: The total potential field of the artificial potential field method is composed of the gravitational field and the repulsive field: U potential (p) = U att (p)+U rep (p), where p is the current foot position, U potential (p) is the total potential field of the robot at the current foot position p, U att (p) is the gravitational field of the robot at the current foot position p, U rep (p) is the repulsive force field of the robot at the current foot position p; The gravitational field is calculated by the current foot position and the current target path point: Among them, ζ is the gravitational coefficient, α is the distance constant, and d is the distance between the current foot position p and the current target path point; The repulsive field is calculated by the shortest distance between the current foot position and the obstacle surface: Among them, ρ(p) is the shortest distance between the current foot position and the obstacle surface, η is the repulsion coefficient, and ρ0 is the obstacle action distance threshold.

5. The quadruped robot swing leg obstacle avoidance method according to claim 1, characterized in that: When performing global path planning, the current position of the swing leg is taken as the starting point, and the heuristic landing point obtained by the heuristic algorithm is taken as the end point to obtain the global path trajectory of the swing leg.

6. The quadruped robot leg swing obstacle avoidance method according to claim 5, characterized in that: When performing global path planning, spline interpolation is performed based on the obtained global path points and the preset foot-lifting height to obtain the global path trajectory of the swinging leg.

7. The quadruped robot swing leg obstacle avoidance method according to claim 1, characterized in that: The method further comprises: If the prediction cycle is not entered, the motion parameters of the global path planning are obtained, the motion is carried out along the global path trajectory, and it is determined whether the swing phase is completed; If the swing phase has not ended, return to the step of determining whether to enter the prediction cycle; If the swing phase ends, the steps of ending the swing phase are executed.

8. The quadruped robot leg swing obstacle avoidance method according to claim 1, characterized in that: The method further comprises: If no collision is predicted, the motion parameters of the global path planning are obtained, the motion is carried out along the global path trajectory, and it is determined whether the swing phase ends; If the swing phase has not ended, return to the step of determining whether to enter the prediction cycle; If the swing phase ends, the steps of ending the swing phase are executed.

9. The quadruped robot leg swing obstacle avoidance method according to claim 1, characterized in that: When performing global path planning, one of the following methods is used: topology method, visibility graph method, grid method, A* algorithm and RRT path planning algorithm.

10. The quadruped robot leg swing obstacle avoidance method according to claim 1, characterized in that: When predicting whether a collision occurs, the joint value of the swing leg is inversely calculated through the foot end position of the swing leg and each leg joint of the swing leg is checked to see whether it will collide with the obstacle.