Path tracking method and device of foot type robot, foot type robot and medium
Through the front and rear leg separation control strategy, the first leg is responsible for path guidance and the second leg is responsible for posture adjustment, which solves the problem that existing legged robots are difficult to balance path accuracy and posture stability in complex environments, achieves high-precision path tracking and stability, and improves the overall control performance of the robot.
Patent Information
- Application Number
- CN202510772693.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-10-03
AI Technical Summary
The existing control strategies of legged robots are relatively simple, and it is difficult to balance path accuracy and posture stability in complex environments, resulting in decreased path tracking accuracy and insufficient stability in dynamic or complex environments.
A front and rear leg separation control strategy is adopted, with the first leg responsible for path guidance and the second leg responsible for posture adjustment. By determining the desired steering angle of each leg separately, a balance between path tracking and posture control is achieved.
The overall control accuracy and response speed of the legged robot are improved, high dynamic performance and stability are maintained in complex environments, a balance between path following and posture control is achieved, and the robot can stably complete tasks in complex environments.
Smart Images

Figure CN120742874A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of legged robots, and in particular to a path tracking method and device for a legged robot, a legged robot, and a medium. Background Art
[0002] There are many types of robot navigation control methods. Traditional control mainly includes two parts: path planning and trajectory tracking. Path planning provides a global route, while trajectory tracking ensures that the robot stays as close to the route as possible in a dynamic environment.
[0003] Quadruped robots have developed rapidly in recent years. Currently, commonly used control methods treat the quadruped robot as a whole and apply a single control strategy to achieve path tracking. These methods are typically based on global path planning combined with error-based trajectory tracking algorithms to control path deviations by adjusting the robot's gait.
[0004] This type of solution usually only optimizes a single aspect, such as focusing only on path following or only adjusting posture. This single control strategy is difficult to meet the requirements of both path accuracy and posture stability, resulting in it being difficult for legged robots to simultaneously take into account path accuracy and overall stability in complex terrain or dynamic environments. Summary of the Invention
[0005] In view of this, the present invention provides a path tracking method and device for a legged robot, a legged robot, and a medium to solve the problem that the existing legged robot control strategy is relatively simple.
[0006] In a first aspect, the present invention provides a path tracking method for a legged robot, wherein the legged robot includes a first leg and a second leg arranged in a front-to-back direction, and the method includes:
[0007] Select the target point from the target path;
[0008] determining a first desired steering angle of the first leg according to the position information of the legged robot and the target position of the target point;
[0009] determining a deviation error of the second leg from the target path, and determining a second expected steering angle of the second leg according to the deviation error;
[0010] The first leg and the second leg are controlled to steer according to the first desired steering angle and the second desired steering angle.
[0011] In some optional embodiments, the position information of the legged robot includes a first position of the first leg and a second position of the second leg;
[0012] The determining, based on the position information of the legged robot and the target position of the target point, a first expected steering angle of the first leg includes:
[0013] determining a lateral distance between the legged robot and the target point based on the position information of the legged robot and the target position of the target point;
[0014] determining a target distance between the second leg and the target point based on the second position of the second leg and the target position of the target point;
[0015] A first desired steering angle of the first leg is determined based on the lateral distance and the target distance.
[0016] In some optional embodiments, the first desired steering angle is used to drive the second leg to move toward the target point, and the first desired steering angle is:
[0017]
[0018] Wherein, β represents the first desired steering angle, L represents the wheelbase between the first leg and the second leg, d1 represents the target distance between the second leg and the target point, and e1 represents the lateral distance between the legged robot and the target point.
[0019] In some optional embodiments, the deviation error includes a lateral error and a heading error; the lateral error is the distance between the second leg and the target path, and the heading error is the angular deviation between the current orientation of the second leg and the trajectory direction of the target path;
[0020] Determining a second expected steering angle of the second leg according to the deviation error includes:
[0021] determining a deflection angle of the second leg for reducing the lateral error according to the lateral error;
[0022] A second desired steering angle of the second leg is determined by combining the yaw angle of the second leg and the heading error.
[0023] In some optional implementations, the second desired steering angle is:
[0024]
[0025] Wherein, γ represents the second desired steering angle, θ1 represents the heading error, e2 represents the lateral error, and d2 represents the preset correction distance.
[0026] In some optional embodiments, controlling the first leg and the second leg to turn according to the first expected turning angle and the second expected turning angle includes:
[0027] Correcting the first desired steering angle according to the second desired steering angle to generate a first corrected steering angle, and controlling the first leg to steer according to the first corrected steering angle;
[0028] The second expected steering angle is corrected according to the first expected steering angle to generate a second corrected steering angle, and the second leg is controlled to steer according to the second corrected steering angle.
[0029] In some optional embodiments, the method further comprises:
[0030] The gait of the legged robot is adjusted according to the current environment of the legged robot and / or the curvature radius of the target path.
[0031] In a second aspect, the present invention provides a path tracking device for a legged robot, the legged robot comprising a first leg and a second leg arranged in a front-to-rear direction, the device comprising:
[0032] Target selection module, used to select target points from the target path;
[0033] a first processing module, configured to determine a first desired steering angle of the first leg according to the position information of the legged robot and the target position of the target point;
[0034] a second processing module, configured to determine a deviation error of the second leg from the target path, and determine a second expected steering angle of the second leg according to the deviation error;
[0035] A control module is configured to control the first leg and the second leg to steer according to the first desired steering angle and the second desired steering angle.
[0036] In a third aspect, the present invention provides a legged robot comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the path tracking method of the legged robot according to the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0037] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the path tracking method for a legged robot according to the first aspect or any corresponding embodiment thereof.
[0038] In a fifth aspect, the present invention provides a computer program product comprising computer instructions for causing a computer to execute the path tracking method for a legged robot according to the first aspect or any corresponding embodiment thereof.
[0039] The present invention controls the front and rear legs of the legged robot separately, determines a first desired steering angle of the first leg according to the positions of the legged robot and the target point to be tracked, and achieves path guidance by steering the first leg, and determines a corresponding second desired steering angle according to the deviation error of the second leg from the target path, and achieves posture adjustment of the legged robot by steering the second leg. This method of separate control of the front and rear legs allows the front and rear legs to focus on different tasks respectively, which can improve the overall control accuracy and response speed of the legged robot. In complex environments where rapid adjustment of the direction of travel is required, it can maintain high dynamic performance and stability, achieve a balance between path following and posture control, and enable the legged robot to stably complete path tracking tasks in complex environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in related technologies, the following briefly introduces the drawings required for use in the specific embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 is a schematic flow chart of a path tracking method for a legged robot according to an embodiment of the present invention;
[0042] Figure 2 is a flow chart of another path tracking method for a legged robot according to an embodiment of the present invention;
[0043] Figure 3 is a schematic diagram of controlling a first leg according to an embodiment of the present invention;
[0044] Figure 4 is a schematic diagram of controlling the second leg according to an embodiment of the present invention;
[0045] Figure 5 is a schematic diagram of the overall control flow of the antipodal robot according to an embodiment of the present invention;
[0046] Figure 6 is a structural block diagram of a path tracking device for a legged robot according to an embodiment of the present invention;
[0047] Figure 7 Schematic diagram of the hardware structure of the legged robot according to an embodiment of the present invention. DETAILED DESCRIPTION
[0048] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.
[0049] Traditional robot navigation and control methods are primarily divided into two parts: path planning and trajectory tracking. Path planning provides a global route from a starting point to a destination, while trajectory tracking ensures that the robot follows that route as closely as possible in a dynamic environment. However, applying these methods to quadruped robots presents several challenges, stemming from their complex dynamics, the volatile external environment, and the requirements for high stability and flexibility.
[0050] Currently, commonly used navigation and control methods for quadruped robots treat the robot as a whole and apply a single control strategy to achieve path tracking. These methods are typically based on global path planning combined with error-based trajectory tracking algorithms. By adjusting the robot's gait, path deviation can be controlled to ensure the robot follows the planned route as closely as possible.
[0051] Traditional approaches typically rely on a single control algorithm to achieve quadrupedal robot navigation. This approach often focuses on a single aspect while neglecting other important performance indicators, such as posture stability. For example, while some algorithms may be able to accurately follow a predetermined path, encountering uneven terrain or sudden external disturbances can compromise the legged robot's posture stability, leading to unstable walking or even a fall.
[0052] A single algorithm struggles to adapt to complex paths, resulting in reduced tracking accuracy. The inability to balance path tracking and posture adjustment makes the robot prone to lateral errors and deviations, making it difficult to simultaneously balance path accuracy and overall stability. In dynamic or complex environments, the lack of flexible real-time adjustment capabilities impacts mission efficiency.
[0053] An embodiment of the present invention provides a path tracking method for a legged robot. By separately controlling the front and rear legs of the legged robot and combining the front leg path following with the hind leg posture correction, high-precision path tracking, stable posture control and strong environmental adaptability are achieved, enabling the quadruped robot to perform tasks efficiently and stably in complex environments.
[0054] According to an embodiment of the present invention, an embodiment of a path tracking method for a legged robot is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0055] In this embodiment, a path tracking method for a legged robot is provided, which can be applied to a controller of a legged robot, such as a controller carried by the legged robot itself, or a control system for remotely controlling the legged robot. Figure 1 FIG. 1 is a flow chart of a path tracking method for a legged robot according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps.
[0056] Step S101: Select a target point from the target path.
[0057] In this embodiment, the legged robot follows a specific path while walking, which is referred to as the target path. The target path can be pre-set or determined in real time based on a path planning algorithm. This embodiment does not limit the method for obtaining the target path.
[0058] The point on the target path that needs to be tracked can be selected, i.e., the target point. The target point is selected based on the legged robot's current position and orientation. For example, the point on the target path closest to the current orientation can be used as the target point. This ensures smooth path guidance while taking into account current environmental changes and obstacle avoidance requirements.
[0059] Step S102 : determining a first desired turning angle of the first leg according to the position information of the legged robot and the target position of the target point.
[0060] In this embodiment, different control strategies are employed for each leg disposed in the fore-and-aft direction of the legged robot. For ease of description, the two legs disposed in the fore-and-aft direction are referred to as the first leg and the second leg, respectively. That is, the legged robot includes the first leg and the second leg disposed in the fore-and-aft direction. For example, the first leg is the front leg, and the second leg is the hind leg.
[0061] Taking a quadruped robot as an example, the quadruped robot is regarded as two parts, front and back, including two front legs and two hind legs. Both front legs can be used as the first legs, and both hind legs can be used as the second legs to control the four legs of the quadruped robot respectively.
[0062] In this embodiment, the front and rear legs of the anteropod are controlled independently, each applying a different control strategy. The first leg (typically the front leg) is responsible for path guidance, while the second leg (typically the hind leg) is responsible for posture adjustment. To ensure path guidance for the first leg, a steering angle (i.e., a first desired steering angle) is determined for the first leg.
[0063] Specifically, the position information of the legged robot can be determined based on its own sensors. This position information may include, for example, the position of the first leg, the position of the second leg, etc. Based on this position information and the target position of the target point, the deviation angle between the legged robot and the target point can be determined, thereby determining the first expected turning angle.
[0064] For example, if the target point is located in the left front of the legged robot, the first leg needs to turn toward the left front, that is, the first expected turning angle is the angle for turning toward the left front, and the size of the first expected turning angle depends on the specific position.
[0065] In this embodiment, the first leg is responsible for path guidance control, sets the target point according to the path planning, and guides the forward direction of the legged robot to ensure that the legged robot can move smoothly along the set target path.
[0066] Step S103: determining a deviation error of the second leg from the target path, and determining a second expected steering angle of the second leg according to the deviation error.
[0067] In this embodiment, as described above, the second leg is primarily responsible for posture adjustment. Specifically, based on information such as the position and orientation of the second leg, the deviation error of the second leg from the target path can be determined. This deviation error can specifically include errors related to distance and angle. Based on this deviation error, a desired steering angle for the second leg, i.e., a second desired steering angle, can be determined. If the second leg turns and moves along this second desired steering angle, the deviation error can be reduced. In other words, the second desired steering angle is used to reduce the deviation error between the second leg and the target path.
[0068] Among them, using the second leg for posture adjustment control can correct the deviation error in real time. By adjusting the posture of the second leg, the stability and balance of the legged robot on the target path can be maintained, and the posture stability of the legged robot can be guaranteed.
[0069] Step S104: Control the first leg and the second leg to steer according to the first desired steering angle and the second desired steering angle.
[0070] In this embodiment, after the first desired steering angle and the second desired steering angle are determined, the first leg and the second leg of the leg-type robot can be controlled to achieve steering of each leg.
[0071] For example, the first leg can be controlled based on a first desired steering angle to steer the first leg, and similarly, the second leg can be controlled based on a second desired steering angle. Alternatively, the first and second desired steering angles can be combined to further determine a more optimal steering angle, and the steering of each leg can be controlled based on the more optimal steering angle.
[0072] The path tracking method of a legged robot provided in this embodiment controls the front and rear legs of the legged robot separately, determines a first desired steering angle of the first leg according to the positions of the legged robot and the target point to be tracked, and enables path guidance by steering the first leg, and determines a corresponding second desired steering angle according to the deviation error of the second leg from the target path, and enables posture adjustment of the legged robot by steering the second leg. In this way of separate control of the front and rear legs, the front and rear legs each focus on different tasks, which can improve the overall control accuracy and response speed of the legged robot, and in complex environments where rapid adjustment of the direction of travel is required, it can maintain high dynamic performance and stability, achieve a balance between path following and posture control, and enable the legged robot to stably complete path tracking tasks in complex environments.
[0073] In this embodiment, another path tracking method for a legged robot is provided, which can be applied to a controller of a legged robot, such as a controller carried by the legged robot itself, or a control system for remotely controlling the legged robot. Figure 2 FIG. 1 is a flow chart of a path tracking method for a legged robot according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps.
[0074] Step S201: Select a target point from the target path.
[0075] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0076] Step S202 : determining a first desired turning angle of the first leg according to the position information of the legged robot and the target position of the target point.
[0077] For details, please see Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.
[0078] In some optional embodiments, the position information of the legged robot includes a first position of the first leg and a second position of the second leg. Furthermore, step S202 of "determining a first desired steering angle of the first leg based on the position information of the legged robot and the target position of the target point" may specifically include the following steps a1 to a3.
[0079] Step a1: Determine the lateral distance between the legged robot and the target point based on the position information of the legged robot and the target position of the target point.
[0080] Step a2: determining a target distance between the second leg and the target point based on the second position of the second leg and the target position of the target point.
[0081] Step a3: determining a first expected turning angle of the first leg according to the lateral distance and the target distance.
[0082] In this embodiment, as described above, the position information of the legged robot includes the first position of the first leg and the second position of the second leg. Based on the first position and the second position of the second leg, the straight line corresponding to the entire legged robot can be determined. Furthermore, based on the target position of the target point, the distance from the target point to the legged robot can be determined, and this distance can be used as the lateral distance. The lateral distance can represent the lateral distance deviation between the legged robot and the target point.
[0083] Furthermore, based on the position coordinates corresponding to the second position of the second leg and the target position of the target point, the distance between the second leg and the target point, i.e., the target distance, can be calculated. Generally, an appropriate target distance can be set based on the speed of the legged robot. The greater the speed of the legged robot, the greater the target distance. Accordingly, based on the target distance, an appropriate point on the target path is selected as the target point.
[0084] After determining the lateral distance and the target distance, a first desired steering angle of the first leg can be calculated, wherein the first desired steering angle is used to reduce the lateral distance, thereby reducing lateral errors and achieving precise trajectory navigation control.
[0085] Optionally, the first desired steering angle is used to drive the second leg to move toward the target point, and the first desired steering angle is:
[0086] Where β represents the first desired steering angle, L represents the wheelbase between the first leg and the second leg, d1 represents the target distance between the second leg and the target point, and e1 represents the lateral distance between the legged robot and the target point.
[0087] In this embodiment, the first desired steering angle is used to drive the second leg to move toward the target point;
[0088] Among them, without considering the turning of the second leg, that is, the direction of the second leg is the same as the direction of the entire leg robot, the first leg turns at a certain angle, which will drive the second leg to move along an arc with a certain turning radius.
[0089] like Figure 3As shown, point A represents the first leg, and its position coordinates are (x1, y1), that is, the coordinates of the first position are (x1, y1); similarly, point B represents the second leg, and its position coordinates are (x2, y2), that is, the coordinates of the second position are (x2, y2). If the target point on the target trajectory is point P, its position coordinates are (x p ,y p ), that is, the coordinate of the target position is (x p ,y p ), by adjusting the steering angle of the first leg A, the second leg B can be moved to the target point P. Figure 3 As shown, at this time, the turning radius of the second leg B is R, and the steering angle of the first leg A is β, which is the first desired steering angle.
[0090] Since the first leg A and the second leg B of the legged robot are rigidly connected, when the legged robot turns, the center of the circle around each leg is the same. Figure 3 As shown, if the turning angle of the first leg A is β, the second leg B rotates around the center O, and the first leg A also rotates around the center O. That is, after the first leg A rotates by the angle β, the direction of the first leg A is the same as Figure 3 The line segments OA shown are perpendicular. Based on geometric relationships, ∠AOB = β; if ∠PBA = α, then ∠POB = 2α.
[0091] Assuming the target distance between the second leg B and the target point P is d1, based on the sine theorem, we can get:
[0092]
[0093] Since sin2α=2sinαcosα, we can get: It can be understood that the target distance d1 can be specifically based on the position coordinates (x2, y2) of the second leg B and the position coordinates (x p ,y p ) calculated and determined.
[0094] If the distance between the front and rear legs of the legged robot is L, that is, the wheelbase between the first leg A and the second leg B is L, then the rotation angle β satisfies: Therefore
[0095] Substitution We can get:
[0096] Continue to see Figure 3 As shown, let the lateral distance between the legged robot and the target point P be e1, that is, the distance between the target point P and the straight line AB (the straight line corresponding to the legged robot) be e1, then
[0097] therefore,
[0098] Where L represents the wheelbase between the first leg A and the second leg B, d1 represents the distance between the second leg B and the target point P, and e1 represents the lateral distance between the leg robot and the target point P. Moreover, the equation of the straight line AB can be determined based on the position coordinates of the first leg A and the second leg B, and then based on the position coordinates of the target point P (x p ,y p ) can be used to calculate the distance from point P to line AB, which is the horizontal distance e1.
[0099] In this embodiment, controlling the steering of the first leg A with the first desired steering angle β can not only help the first leg better align with the path to reduce path deviation and achieve path-following front leg control, but also drive the second leg B to move toward the target point P, which is conducive to the second leg B moving as close to the target path as possible and can reduce the deviation between the footed robot and the target path.
[0100] Step S203: Determine the deviation error of the second leg from the target path, and determine a second expected steering angle of the second leg according to the deviation error.
[0101] For details, please see Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0102] In some optional embodiments, the deviation error includes a lateral error and a heading error; the lateral error is the distance between the second leg and the target path, and the heading error is the angular deviation between the current orientation of the second leg and the trajectory direction of the target path.
[0103] The above-mentioned step S203 of “determining the second expected steering angle of the second leg according to the deviation error” may specifically include steps b1 to b2.
[0104] Step b1, determining a deflection angle of the second leg for reducing the lateral error according to the lateral error;
[0105] Step b2: Determine the second expected steering angle of the second leg by combining the deflection angle and heading error of the second leg.
[0106] In this embodiment, the distance between the second leg and the target path can be determined based on the second position of the second leg, and the corresponding deflection angle can be determined. This allows the second leg to reduce the lateral error when turning according to the deflection angle, allowing the second leg to move along the target path. Furthermore, since the target path is generally not a straight line, the angular deviation between the current orientation of the second leg and the trajectory direction of the target path can represent the error in the second leg's heading, and is therefore referred to as a heading error.
[0107] Combined with the deflection angle and heading error of the second leg, the second expected steering angle of the second leg is determined, so that when the second leg is subsequently steered based on the second expected steering angle, the lateral error and heading error of the second leg can be reduced, thereby providing an adjustment basis for the stability control of the second leg, so that the legged robot can maintain an ideal posture along the trajectory, achieve posture adjustment, and effectively avoid posture instability.
[0108] Optionally, the second desired steering angle is:
[0109] Wherein, γ represents the second desired steering angle, θ1 represents the heading error, e2 represents the lateral error, and d2 represents the preset correction distance.
[0110] In this embodiment, Figure 4 As shown, point A represents the first leg and point B represents the second leg. Based on the second position of second leg B, the lateral distance between second leg B and the target path can be determined. This distance can represent the lateral error between the two. In this embodiment, this is referred to as the lateral error and is represented by e2. Specifically, the minimum distance between second leg B and the target path can be used as the lateral error e2.
[0111] Furthermore, for the second leg B, the target path corresponds to a corresponding trajectory direction (or path direction); wherein the trajectory direction may specifically be a tangent direction corresponding to the trajectory point closest to the second leg B in the target path. Figure 4 As shown, the distance between the trajectory point C in the target path and the second leg B is the smallest, then the tangent direction corresponding to the trajectory point C ( Figure 4 The direction of CQ in the figure is the trajectory direction, and the distance between the trajectory point C and the second leg B is also the lateral error e2.
[0112] For the second leg B, it currently also has a certain orientation. There is a certain angular deviation between the current orientation of the second leg B and the trajectory direction of the target path. This angular deviation is the heading error (that is, the error in the heading angle of the second leg). By correcting the heading error, the second leg B can be moved along the trajectory direction.
[0113] like Figure 4 As shown, assuming that the current orientation of the second leg B is the overall orientation of the footed robot, that is, the direction corresponding to the line segment BA, the heading error of the second leg B at this time is Figure 4 The angle θ1 in .
[0114] Furthermore, if the second leg B is not currently on the target trajectory, that is, the lateral error e2 is not zero, the lateral error e2 needs to be corrected. In this embodiment, a correction distance d2 is set for correcting the lateral error e2, and the position of the second leg B to be tracked can be determined based on the correction distance d2.
[0115] Continue to see Figure 4 As shown, a correction point Q is determined along the trajectory direction of the target path to correct the lateral error e2. The distance CQ is the correction distance d2. In order to eliminate the lateral error e2, the second leg B needs to move toward the correction point Q. That is, based on the heading error θ1, it continues to deviate by a certain angle θ2. This angle θ2 is the deflection angle used to reduce the lateral error e2. Figure 4 As shown, the deflection angle θ2 is:
[0116]
[0117] In summary, combining the deflection angle θ2 of the second leg and the heading error θ1, the second desired steering angle γ of the second leg can be determined, and
[0118] The correction distance d2 may be pre-set and is related to the current speed of the legged robot. The greater the current speed, the greater the correction distance d2, so that adaptive adjustment can be made based on the speed of the legged robot.
[0119] It should be noted that in the field of legged robots, the right-hand rule is generally used to define the coordinate system. Figure 2 or Figure 4 Taking the coordinate system shown as an example, the angle of deflection to the left (counterclockwise) is positive, and the angle of deflection to the right (clockwise) is negative. Since each angle has positive and negative values, the second desired steering angle γ can be directly determined by γ=θ1+θ2.
[0120] In this embodiment, the steering angle of the second leg is adjusted based on the appropriate correction distance d2 to determine the optimal steering angle for the second leg, thereby reducing lateral error and correcting the movement direction (i.e., reducing heading error). This second desired steering angle ensures that the overall orientation of the legged robot is stable (both lateral error and heading error are small), ensuring that the posture of the legged robot is substantially consistent with its forward direction, effectively preventing posture instability.
[0121] Step S204: Control the first leg and the second leg to steer according to the first desired steering angle and the second desired steering angle.
[0122] Specifically, the above step S204 “controlling the first leg and the second leg to steer according to the first desired steering angle and the second desired steering angle” includes step S2041 and step S2042.
[0123] Step S2041: Correct the first desired steering angle according to the second desired steering angle to generate a first corrected steering angle, and control the first leg to turn according to the first corrected steering angle.
[0124] Step S2042: Correct the second desired steering angle according to the first desired steering angle to generate a second corrected steering angle, and control the second leg to turn according to the second corrected steering angle.
[0125] In this embodiment, the steering angle suitable for each leg is comprehensively determined based on the first expected steering angle and the second expected steering angle.
[0126] Specifically, taking the first leg as an example, after determining the first expected steering angle, the second expected steering angle of the second leg can be obtained, and the first expected steering angle of the second leg can be corrected based on the second expected steering angle. The corrected first expected steering angle is used as the final control quantity, that is, the first corrected steering angle, and the steering of the first leg is subsequently controlled based on the first corrected steering angle.
[0127] For example, the first desired steering angle and the second desired steering angle may be weighted, and the weighted processing result may be used as the first corrected steering angle.
[0128] Similarly, for the second leg, the second expected steering angle can be corrected by the first expected steering angle, and the steering of the second leg can be controlled according to the corrected second expected steering angle (ie, the second corrected steering angle).
[0129] For example, the first leg and the second leg can be controlled based on different control systems respectively. After the control system of the first leg calculates the first desired steering angle, it feeds it back to the control system of the second leg. After the control system of the second leg calculates the second desired steering angle, it feeds it back to the control system of the first leg, so that the control systems of each leg can adjust the steering angle based on the feedback mechanism. The rear part affects the control of the front part through feedback, and the front part will adjust the posture of the rear part for dynamic balance, so that the front and rear legs move synchronously, ensuring coordinated control of the front and rear legs and avoiding conflicts between the movements of the two.
[0130] Furthermore, if the first leg deviates from the target path, the second leg can quickly adjust its heading to ensure the stability of the overall movement of the legged robot. In addition, the adjustment of the second leg will help the first leg return to the correct trajectory to avoid excessive turns or errors.
[0131] In this embodiment, the first leg and the second leg of the legged robot are rigidly connected, so that the front and rear torsos of the legged robot can move together through the rigid connection. By separately controlling the steering of each leg, the front and rear can influence each other. Moreover, by utilizing feedback mechanisms and the like to achieve angle correction, the front and rear legs can be controlled synchronously. The legged robot has higher coordination and consistency, can enhance path following and posture stability, and achieve smooth and harmonious overall movement.
[0132] Optionally, the method further includes: adjusting the gait of the legged robot according to the current environment of the legged robot and / or the curvature radius of the target path.
[0133] In this embodiment, while controlling the front and rear legs based on different control strategies, the robot can also adjust its gait based on the current environment and / or the curvature radius of the target path, achieving appropriate slowdown or acceleration to ensure smooth movement in complex terrain. For example, it can switch from a trot to a walk, and in different gaits, the timing of the stance and swing phases of each leg can be adaptively controlled. This is not detailed in this embodiment.
[0134] Figure 5 The figure shows the overall control flow diagram of the antipodal robot. Figure 5 As shown, through coordinated control of the front and rear legs, the posture and speed of the legged robot can be adjusted, and the lateral and heading errors can be corrected in real time. It can also be combined with gait control to adapt to more complex environments.
[0135] This embodiment provides a path tracking method for a legged robot. During the path tracking process, different control strategies are employed for the front and rear legs. The first leg is guided by a target point to ensure the robot can flexibly and accurately track its path. The second leg controls the robot's heading and lateral deviation to eliminate errors and maintain a stable posture, thereby maintaining overall robot stability. By adjusting the steering of the robot's four legs to achieve omnidirectional movement and rapid self-centering during steering, the robot reduces left-right and front-back deviations, improving its overall performance and path tracking smoothness.
[0136] Compared to traditional control methods, this approach leverages the division and optimization of front and rear leg functions to enhance the overall performance of legged robots in terms of path tracking, stability, flexibility, and adaptability. The differentiated control strategies for the front and rear legs enable the robot to adapt to more changes, achieve higher robustness, better handle uncertainty and disturbances in complex environments, and better adapt to irregular or complex terrain, reducing the instability associated with a single control strategy. This reduces the risk of sudden turns or uncoordinated movements during movement, improving the robot's overall performance and smoothness. This allows the robot to efficiently and smoothly perform tasks in complex, dynamic, and unknown environments.
[0137] This embodiment also provides a path tracking device for a legged robot, which is used to implement the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0138] This embodiment provides a path tracking device for a legged robot. Figure 6 As shown, the legged robot includes a first leg and a second leg arranged in a front-to-back direction, and the device includes:
[0139] The target selection module 601 is used to select a target point from the target path;
[0140] A first processing module 602 is configured to determine a first desired steering angle of the first leg according to the position information of the legged robot and the target position of the target point;
[0141] A second processing module 603 is configured to determine a deviation error of the second leg from the target path, and determine a second expected steering angle of the second leg according to the deviation error;
[0142] The control module 604 is configured to control the first leg and the second leg to steer according to the first desired steering angle and the second desired steering angle.
[0143] In some optional embodiments, the position information of the legged robot includes a first position of the first leg and a second position of the second leg;
[0144] The first processing module 602 determines a first expected steering angle of the first leg according to the position information of the legged robot and the target position of the target point, including:
[0145] determining a lateral distance between the legged robot and the target point based on the position information of the legged robot and the target position of the target point;
[0146] determining a target distance between the second leg and the target point based on the second position of the second leg and the target position of the target point;
[0147] A first desired steering angle of the first leg is determined based on the lateral distance and the target distance.
[0148] In some optional embodiments, the first desired steering angle is used to drive the second leg to move toward the target point, and the first desired steering angle is:
[0149]
[0150] Wherein, β represents the first desired steering angle, L represents the wheelbase between the first leg and the second leg, d1 represents the target distance between the second leg and the target point, and e1 represents the lateral distance between the legged robot and the target point.
[0151] In some optional embodiments, the deviation error includes a lateral error and a heading error; the lateral error is the distance between the second leg and the target path, and the heading error is the angular deviation between the current orientation of the second leg and the trajectory direction of the target path;
[0152] The second processing module 603 determines a second expected steering angle of the second leg according to the deviation error, including:
[0153] determining a deflection angle of the second leg for reducing the lateral error according to the lateral error;
[0154] A second desired steering angle of the second leg is determined by combining the yaw angle of the second leg and the heading error.
[0155] In some optional implementations, the second desired steering angle is:
[0156]
[0157] Wherein, γ represents the second desired steering angle, θ1 represents the heading error, e2 represents the lateral error, and d2 represents the preset correction distance.
[0158] In some optional implementations, the control module 604 controls the first leg and the second leg to turn according to the first desired turning angle and the second desired turning angle, including:
[0159] Correcting the first desired steering angle according to the second desired steering angle to generate a first corrected steering angle, and controlling the first leg to steer according to the first corrected steering angle;
[0160] The second expected steering angle is corrected according to the first expected steering angle to generate a second corrected steering angle, and the second leg is controlled to steer according to the second corrected steering angle.
[0161] In some optional implementations, the control module 604 is further configured to adjust the gait of the legged robot according to the current environment of the legged robot and / or the curvature radius of the target path.
[0162] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0163] The path tracking device of the legged robot in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, including a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0164] The embodiment of the present invention also provides a foot-type robot having the above Figure 6 The path tracking device of the legged robot is shown.
[0165] See also Figure 7 , Figure 7 : is a schematic structural diagram of a legged robot provided by an optional embodiment of the present invention, such as Figure 7 As shown, the legged robot includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the legged robot, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used with multiple memories. Similarly, multiple legged robots can be connected, with each device providing part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.
[0166] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.
[0167] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0168] The memory 20 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function; the data storage area may store data generated based on the use of the legged robot. Furthermore, the memory 20 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and such remote memory may be connected to the legged robot via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0169] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0170] The legged robot further includes a communication interface 30 for the legged robot to communicate with other devices or a communication network.
[0171] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.
[0172] A portion of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by the computer.
[0173] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations should all be included in the scope of protection of the present invention.
Claims
1. A path tracking method for a legged robot, characterized in that: The legged robot includes a first leg and a second leg arranged in a front-to-back direction, and the method includes: Select the target point from the target path; determining a first desired steering angle of the first leg according to the position information of the legged robot and the target position of the target point; determining a deviation error of the second leg from the target path, and determining a second expected steering angle of the second leg according to the deviation error; The first leg and the second leg are controlled to steer according to the first desired steering angle and the second desired steering angle.
2. The method according to claim 1, characterized in that The position information of the legged robot includes a first position of the first leg and a second position of the second leg; The determining, based on the position information of the legged robot and the target position of the target point, a first expected steering angle of the first leg includes: determining a lateral distance between the legged robot and the target point based on the position information of the legged robot and the target position of the target point; determining a target distance between the second leg and the target point based on the second position of the second leg and the target position of the target point; A first desired steering angle of the first leg is determined based on the lateral distance and the target distance.
3. The method according to claim 2, characterized in that The first desired steering angle is used to drive the second leg to move toward the target point, and the first desired steering angle is: Wherein, β represents the first desired steering angle, L represents the wheelbase between the first leg and the second leg, d1 represents the target distance between the second leg and the target point, and e1 represents the lateral distance between the legged robot and the target point.
4. The method according to claim 1, wherein The deviation error includes a lateral error and a heading error; the lateral error is the distance between the second leg and the target path, and the heading error is the angular deviation between the current orientation of the second leg and the trajectory direction of the target path; Determining a second expected steering angle of the second leg according to the deviation error includes: determining a deflection angle of the second leg for reducing the lateral error according to the lateral error; A second desired steering angle of the second leg is determined by combining the yaw angle of the second leg and the heading error.
5. The method according to claim 4, characterized in that The second desired steering angle is: Wherein, γ represents the second desired steering angle, θ1 represents the heading error, e2 represents the lateral error, and d2 represents the preset correction distance.
6. The method according to claim 1, characterized in that The controlling the first leg and the second leg to steer according to the first desired steering angle and the second desired steering angle includes: Correcting the first desired steering angle according to the second desired steering angle to generate a first corrected steering angle, and controlling the first leg to steer according to the first corrected steering angle; The second expected steering angle is corrected according to the first expected steering angle to generate a second corrected steering angle, and the second leg is controlled to steer according to the second corrected steering angle.
7. The method according to claim 1, characterized in that Also includes: The gait of the legged robot is adjusted according to the current environment of the legged robot and / or the curvature radius of the target path.
8. A path tracking device for a legged robot, characterized in that: The legged robot comprises a first leg and a second leg arranged in a front-to-back direction, and the device comprises: Target selection module, used to select target points from the target path; a first processing module, configured to determine a first desired steering angle of the first leg according to the position information of the legged robot and the target position of the target point; a second processing module, configured to determine a deviation error of the second leg from the target path, and determine a second expected steering angle of the second leg according to the deviation error; A control module is configured to control the first leg and the second leg to steer according to the first desired steering angle and the second desired steering angle.
9. A legged robot, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the path tracking method of the legged robot according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the path tracking method for a legged robot according to any one of claims 1 to 7.