A quadruped robot gait scheduling method, device and equipment
By constructing the input sequence and calculating the foot contact force to update the gait schedule of the quadruped robot, the stability problem caused by sensor dependence is solved, and stable gait scheduling is achieved when the sensor is faulty.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG UNIV OF TECH
- Filing Date
- 2023-10-31
- Publication Date
- 2026-04-17
AI Technical Summary
Existing gait scheduling methods for legged robots rely too heavily on sensors, causing quadruped robots to be unable to maintain a stable state when sensors give incorrect signals.
By constructing the input sequence corresponding to the quadruped robot, gait updates are performed based on the current mode running time and preset time intervals. Foot contact force is calculated, and the gait scheduling table is updated when the contact force is greater than a preset threshold and the running times are not equal, thereby reducing the dependence on sensors.
It improves the stability of gait scheduling in quadruped robots, enabling them to maintain a stable state even when sensors malfunction, thus reducing reliance on sensors.
Smart Images

Figure CN117401057B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robot control technology, and in particular to a method, apparatus and equipment for gait scheduling of a quadruped robot. Background Technology
[0002] With the continuous development of intelligent robots, legged robots are gradually coming into view. Legged animals walk by coordinating the movement of their multiple legs, with each leg switching between a support phase and a swinging phase. During the support phase, the force exerted on the external environment creates a reaction force on the robot's body, thus enabling free movement. Legged robots learn from the locomotion of these legged animals, structurally possessing multiple legs, and using motors or hydraulic systems to drive the movement of each leg, achieving biomimetic motion.
[0003] To achieve coordinated control between legs, legged robots need to plan a unified gait and synchronously switch each leg according to the current gait. This is generally done by giving the swing phase and support phase times, and when the current time reaches the maximum time of the swing phase, it is considered to have touched the ground and the gait is switched. This is a feedback-free open-loop control. Alternatively, it can be done by detecting the state of the swing leg, and when the swing leg touches the ground, an event is triggered and the gait is switched. This is a feedback-based closed-loop control.
[0004] Existing gait scheduling methods for legged robots require additional sensor support, which must be installed on the soles of the feet. The contact state of these sensors depends entirely on the sensors, making the gait scheduling process overly reliant on them. If the sensors produce erroneous signals, the quadruped robot will be unable to maintain a stable state. Summary of the Invention
[0005] This invention provides a method, apparatus, and device for gait scheduling of quadruped robots, which solves the technical problem that existing gait scheduling methods for legged robots rely too heavily on sensors, and that if the sensors give incorrect signals, the quadruped robot will be unable to maintain a stable state.
[0006] The first aspect of this invention provides a gait scheduling method for a quadruped robot, comprising:
[0007] In response to scheduling requests, multiple input sequences corresponding to the quadruped robot are constructed using programming language data.
[0008] Based on the current mode running time and preset time interval of the quadruped robot, the initial gait schedule table of the quadruped robot is updated sequentially using each of the input sequences, and the initial sequence data in the initial gait schedule table is deleted.
[0009] When the update duration of the input sequence is greater than the preset duration, an intermediate gait scheduling table is output.
[0010] The contact force at the foot end is calculated using the real-time state data of the quadruped robot.
[0011] When the foot contact force is greater than a preset contact force threshold and the real-time mode running time of the quadruped robot is not equal to the intermediate mode running time in the corresponding intermediate gait scheduling table, the intermediate gait scheduling table is updated using the real-time mode running time, and the target gait scheduling table is output.
[0012] Optionally, the preset time interval includes a preset first time interval and a preset second time interval; the step of updating the initial gait schedule table of the quadruped robot sequentially using each of the input sequences based on the current mode running time corresponding to the quadruped robot and the preset time interval, and deleting the initial sequence data in the initial gait schedule table, includes:
[0013] The first target time is determined by adding the current mode running time with a preset first time interval.
[0014] The second target time is determined by subtracting the current mode running time from a preset second time interval.
[0015] At the first target time, after deleting the initial sequence data in the initial gait scheduling table after the first target time, the initial gait scheduling table of the quadruped robot is updated with each of the input sequences in sequence.
[0016] Delete the initial sequence data in the initial gait scheduling table prior to the second target time.
[0017] Optionally, the real-time status data includes length data, angle data, and joint torque data; the step of calculating the foot contact force using the real-time status data of the quadruped robot includes:
[0018] Using length and angle data, the Jacobian matrix of the legs corresponding to the quadruped robot is constructed.
[0019] The foot contact force is calculated using the aforementioned leg Jacobian matrix and joint torque data.
[0020] Optionally, the leg Jacobian matrix is specifically:
[0021]
[0022] Where l2 is the thigh length in the length data; for The angle data contains the sinusoidal second joint angle value; θ3 is the angle of the third joint of the quadruped robot's leg in the angle data; l1 is the length of the leg arm in the length data; for The cosine first joint angle value in the angle data; for The first joint angle value of the sinusoidal angle data; for The cosine of the second joint angle in the angle data; l3 is the lower leg length in the length data; θ2 is the second joint angle of the quadruped robot's leg in the angle data; θ1 is the first joint angle of the quadruped robot's leg in the angle data.
[0023] The formula for calculating the foot contact force is as follows:
[0024]
[0025] Where F is the contact force at the foot tip; J T This is the transpose of the Jacobian matrix for the legs; This refers to the joint torque of joint θ1 in the joint torque data; This refers to the joint torque of joint θ2 in the joint torque data; This refers to the joint torque of joint θ3 in the joint torque data.
[0026] Optionally, it also includes:
[0027] When the foot contact force is greater than a preset contact force threshold and the real-time mode running time of the quadruped robot is equal to the intermediate mode running time in the corresponding intermediate gait scheduling table, the trajectory height data, foot point data and running time data of the quadruped robot are obtained.
[0028] Based on the runtime data, determine the scaling factor;
[0029] Calculate the scaled trajectory height data using the scaling factor and the trajectory height data;
[0030] Calculate the scaled foot data using the scaling factor and the foot data;
[0031] Substitute the foot point data, the scaled foot point data, and the scaled trajectory height data into the preset swing curve equation set, and perform calculations in conjunction with preset constraints to output the first swing curve and the second swing curve.
[0032] Using the runtime data, the first oscillation curve, and the second oscillation curve, a scaled oscillation trajectory curve is constructed;
[0033] Linear interpolation is performed on the scaling swing trajectory curve to determine the expected foot position data corresponding to the quadruped robot.
[0034] A second aspect of the present invention provides a quadruped robot gait scheduling device, comprising:
[0035] The response module is used to respond to scheduling requests and construct multiple input sequences corresponding to the quadruped robot using programming language data.
[0036] The update module is used to update the initial gait schedule table of the quadruped robot sequentially using each of the input sequences based on the current mode running time and the preset time interval corresponding to the quadruped robot.
[0037] The output module is used to output an intermediate gait schedule table when the update duration of the input sequence is greater than a preset duration.
[0038] The calculation module is used to calculate the contact force at the foot end using the real-time state data of the quadruped robot;
[0039] The judgment module is used to update the intermediate gait schedule table and output the target gait schedule table when the foot contact force is greater than a preset contact force threshold and the real-time mode running time of the quadruped robot is not equal to the intermediate mode running time in the corresponding intermediate gait schedule table.
[0040] Optionally, the preset time interval includes a preset first time interval and a preset second time interval; the update module includes:
[0041] The first determining submodule is used to perform an addition operation between the current mode running time and a preset first time interval to determine the first target time.
[0042] The second determining submodule is used to perform a subtraction operation between the current mode running time and a preset second time interval to determine the second target time.
[0043] The deletion submodule is used to delete the initial sequence data in the initial gait scheduling table after the first target time and the initial sequence data in the initial gait scheduling table before the second target time.
[0044] The first submodule is used to update the initial gait schedule table of the quadruped robot sequentially using each of the input sequences at the first target time.
[0045] Optionally, the real-time status data includes length data, angle data, and joint torque data; the calculation module includes:
[0046] A submodule is constructed to use length and angle data to construct the Jacobian matrix of the legs of the quadruped robot.
[0047] The second submodule is used to calculate the foot contact force using the leg Jacobian matrix and joint torque data.
[0048] Optionally, the leg Jacobian matrix is specifically:
[0049]
[0050] Where l2 is the thigh length in the length data; for The angle data contains the sinusoidal second joint angle value; θ3 is the angle of the third joint of the quadruped robot's leg in the angle data; l1 is the length of the leg arm in the length data; for The cosine first joint angle value in the angle data; for The first joint angle value of the sinusoidal angle data; for The cosine of the second joint angle in the angle data; l3 is the lower leg length in the length data; θ2 is the second joint angle of the quadruped robot's leg in the angle data; θ1 is the first joint angle of the quadruped robot's leg in the angle data.
[0051] The formula for calculating the foot contact force is as follows:
[0052]
[0053] Where F is the contact force at the foot tip; J T This is the transpose of the Jacobian matrix for the legs; This refers to the joint torque of joint θ1 in the joint torque data; This refers to the joint torque of joint θ2 in the joint torque data; This refers to the joint torque of joint θ3 in the joint torque data.
[0054] A third aspect of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of the quadruped robot gait scheduling method as described in any of the preceding claims.
[0055] As can be seen from the above technical solutions, the present invention has the following advantages:
[0056] The above-mentioned technical solution of the present invention provides a gait scheduling method for a quadruped robot. First, in response to a scheduling request, multiple input sequences corresponding to the quadruped robot are constructed using programming language data. Based on the current mode running time and a preset time interval corresponding to the quadruped robot, the initial gait scheduling table of the quadruped robot is updated sequentially using each input sequence, and the initial sequence data in the initial gait scheduling table is deleted. When the update duration of the input sequence is greater than the preset duration, an intermediate gait scheduling table is output. Next, the foot contact force is calculated using the real-time state data of the quadruped robot. Finally, when the foot contact force is greater than a preset contact force threshold and... When the real-time running time of the quadruped robot is not equal to the intermediate running time in the corresponding intermediate gait schedule, the intermediate gait schedule is updated using the real-time running time, and the target gait schedule is output. The above scheme calculates the foot contact force using the real-time state data of the quadruped robot and compares it with a preset contact force threshold. It also compares the real-time running time of the quadruped robot with the intermediate running time in the intermediate gait schedule to output the target gait schedule. This process reduces the dependence on sensors and enables the quadruped robot to maintain a stable state, thereby improving the stability of the quadruped robot's gait scheduling. Attached Figure Description
[0057] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0058] Figure 1 A flowchart illustrating the steps of a quadruped robot gait scheduling method provided in this embodiment of the invention;
[0059] Figure 2 This is a schematic diagram of the initial gait scheduling table of a quadruped robot provided in an embodiment of the present invention;
[0060] Figure 3 A flowchart illustrating the steps of another quadruped robot gait scheduling method provided in this embodiment of the invention;
[0061] Figure 4 A schematic diagram illustrating the input sequence to a quadruped robot according to an embodiment of the present invention;
[0062] Figure 5 This is a schematic diagram of the intermediate gait scheduling table of a quadruped robot provided in an embodiment of the present invention;
[0063] Figure 6A schematic diagram of the target gait scheduling table for a quadruped robot provided in an embodiment of the present invention;
[0064] Figure 7 A schematic diagram illustrating the scaling of the swing trajectory of a quadruped robot provided in an embodiment of the present invention;
[0065] Figure 8 This is a structural block diagram of a quadruped robot gait scheduling device provided in an embodiment of the present invention. Detailed Implementation
[0066] This invention provides a quadruped robot gait scheduling method, apparatus, and device to address the technical problem that existing legged robot gait scheduling methods rely too heavily on sensors, and that if the sensors produce erroneous signals, the quadruped robot will be unable to maintain a stable state.
[0067] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0068] Please see Figure 1 , Figure 1 The flowchart illustrates the steps of a quadruped robot gait scheduling method provided in this embodiment of the invention.
[0069] This invention provides a gait scheduling method for a quadruped robot, comprising:
[0070] Step 101: Respond to the scheduling request and construct multiple input sequences corresponding to the quadruped robot using programming language data.
[0071] It should be noted that the states of the quadruped robot's feet are mapped using numbers, as shown in Table 1:
[0072] Table 1. Foot state mapping of the quadruped robot
[0073]
[0074]
[0075] In this context, NULL indicates that none of the four feet are touching the ground, and LF, RF, LH, and RH indicate that the left foreleg, right foreleg, left hind leg, and right hind leg are in a supporting state, respectively.
[0076] Furthermore, the quadruped robot's input sequence is a gait pattern given by the user, which uses programming language data (C++'s std::map).<double,int> The data type is used to store the gait input by the user, and adopts the form of "switching time - grounding foot pair", as shown in Table 2. The switching time in Table 2 refers to the time point from one set of supporting feet to another set of supporting feet. It starts from 0 by default. Therefore, the time of the last item in the input sequence refers to the stepping cycle of the current gait. For example, in the trot gait, the 0-0.3 second stage is state 9, that is, the left front leg and right rear leg support, and the left rear leg and right front leg swing. The 0.3-0.6 second stage is state 6, that is, the left rear leg and right front leg support, and the left front leg and right rear leg swing. The cycle repeats in this manner.
[0077] Table 2 Representation of input sequences under different time states
[0078]
[0079] In this embodiment, in response to a scheduling request, multiple input sequences corresponding to the quadruped robot are constructed using programming language data.
[0080] Step 102: Based on the current mode running time and preset time interval of the quadruped robot, update the initial gait schedule table of the quadruped robot with each input sequence in turn, and delete the initial sequence data in the initial gait schedule table.
[0081] The initial sequence data includes the initial time series of the quadruped robot and the initial pattern sequence of the quadruped robot.
[0082] The current mode running time is the running time of the quadruped robot in the current mode state in the mode sequence.
[0083] It should be noted that the time series includes the time of each gait cycle switching of the quadruped robot; the pattern sequence is flattened with the input sequence as the unit length and contains several input sequences; the time series and pattern sequence can be considered to be bound together, and both are updated synchronously based on the inserted input sequence. Both are designed using double-ended sequences, where the length of the time series is N and the length of the pattern sequence is N+1. The representations of the time series and pattern sequence are shown in Table 3.
[0084] Table 3 Representation of Time Series and Pattern Series
[0085] Time series Pattern sequence 50.3 15 50.6 9 50.9 6 51.2 9 51.5 6 51.8 9 52.1 6 52.4 9 52.7 6 53.0 9 53.3 6 15
[0086] Further, please refer to Figure 2The gait schedule of a quadruped robot consists of a time series and a pattern sequence. The time range of the time series is variable, and its length changes dynamically. The current time (the current mode's running time) is usually in the middle of the quadruped robot's initial time series, thus obtaining gait information (initial sequence data) around the initial gait schedule at the current mode's running time. The principle of the pattern sequence is the same as that of the time series, and its length also changes dynamically. The start time of the nth pattern in the pattern sequence is the (n-1)th time point of the time series, and the end time is the nth time point of the time series. The first and last patterns are independent of the input sequence. By default, pattern 15, i.e., the state where all four legs are supporting the robot, is inserted at the beginning and end of the pattern sequence. This way, even if an incorrect time is input, the quadruped robot will stand up without falling.
[0087] In this embodiment, based on the current mode running time and preset time interval of the quadruped robot, the initial gait schedule table of the quadruped robot is updated sequentially using each input sequence, and the initial sequence data in the initial gait schedule table is deleted.
[0088] Step 103: When the update duration of the input sequence is greater than the preset duration, output the intermediate gait scheduling table.
[0089] It should be noted that when the update duration of the input sequence is greater than the preset duration, an intermediate gait scheduling table is output. The update duration is the duration for the quadruped robot to update its gait. The preset duration is set to be greater than the preset time interval. This can be set as needed, but no specific limitation is made here.
[0090] In this embodiment, when the update duration of the input sequence is greater than the preset duration, an intermediate gait scheduling table is output.
[0091] Step 104: Calculate the contact force at the foot end using the real-time status data of the quadruped robot.
[0092] Real-time status data includes length data, angle data, and joint torque data.
[0093] It should be noted that the length data includes the length of the quadruped robot's leg arm l1, thigh length l2, and lower leg length l3; the angle data includes the angles of the first joint θ1, second joint θ2, and third joint θ3 of the quadruped robot's leg, i.e., the angles of the three joints of the leg from top to bottom; and the joint torque data includes the joint torque of joint θ1 of the quadruped robot. Joint torque of joint θ2 Joint torque of joint θ3
[0094] In this embodiment, the real-time status data of the quadruped robot is used to calculate the contact force at the foot end.
[0095] Step 105: When the foot contact force is greater than the preset contact force threshold and the real-time mode running time of the quadruped robot is not equal to the intermediate mode running time in the corresponding intermediate gait scheduling table, update the intermediate gait scheduling table using the real-time mode running time and output the target gait scheduling table.
[0096] It should be noted that when the foot contact force is greater than the preset contact force threshold and the real-time mode running time of the quadruped robot is not equal to the intermediate mode running time in the corresponding intermediate gait schedule table, the intermediate gait schedule table is updated using the real-time mode running time, and the target gait schedule table is output. For example, suppose that mode 9 in the current mode sequence of the quadruped robot is displayed in the intermediate gait schedule table as having an intermediate mode running time of 50.6s-50.9s. If the real-time mode running time is 50.6s-50.8s, the two are not equal. In this case, the real-time mode running time of 50.6s-50.8s is used to replace the intermediate mode running time of 50.6s-50.9s, thereby outputting the target gait schedule table.
[0097] In this embodiment, when the foot contact force is greater than the preset contact force threshold and the real-time mode running time of the quadruped robot is not equal to the intermediate mode running time in the corresponding intermediate gait scheduling table, the intermediate gait scheduling table is updated using the real-time mode running time, and the target gait scheduling table is output.
[0098] In this embodiment of the invention, a gait scheduling method for a quadruped robot is provided. First, in response to a scheduling request, multiple input sequences corresponding to the quadruped robot are constructed using programming language data. Based on the current mode running time and a preset time interval corresponding to the quadruped robot, the initial gait scheduling table of the quadruped robot is updated sequentially using each input sequence, and the initial sequence data in the initial gait scheduling table is deleted. When the update duration of the input sequence is greater than the preset duration, an intermediate gait scheduling table is output. Next, the foot contact force is calculated using the real-time state data of the quadruped robot. Finally, when the foot contact force is greater than a preset contact force threshold and the real-time mode running time of the quadruped robot is not equal to the intermediate mode running time in the corresponding intermediate gait scheduling table, the real-time mode is used. The intermediate gait scheduling table is constantly updated, and the target gait scheduling table is output. The above scheme possesses a complete time series and pattern sequence, including previous and future times, enabling gait querying and insertion at any point in time. Gait switching times are updated in real time according to the foot contact state. Gait switching remains stable. The interface is rich and highly customizable. Furthermore, by using real-time state data of the quadruped robot, the foot contact force is calculated and compared with a preset contact force threshold. This is combined with a comparison of the quadruped robot's real-time mode running time with the intermediate mode running time in the intermediate gait scheduling table, thereby outputting the target gait scheduling table. This process reduces dependence on sensors, enabling the quadruped robot to maintain a stable state continuously, thus improving the stability of quadruped robot gait scheduling.
[0099] Please see Figure 3 , Figure 3 A flowchart illustrating the steps of another quadruped robot gait scheduling method provided in an embodiment of the present invention.
[0100] Step 301: Respond to the scheduling request and construct multiple input sequences corresponding to the quadruped robot using programming language data.
[0101] In this embodiment, in response to a scheduling request, multiple input sequences corresponding to the quadruped robot are constructed using programming language data.
[0102] Step 302: Based on the current mode running time and preset time interval of the quadruped robot, update the initial gait schedule table of the quadruped robot with each input sequence in turn, and delete the initial sequence data in the initial gait schedule table.
[0103] The preset time interval includes a preset first time interval and a preset second time interval.
[0104] Further, step 302 may include the following sub-steps:
[0105] S21. The current running time and the preset first time interval are added together to determine the first target time.
[0106] S22. Subtract the current running time from the preset second time interval to determine the second target time.
[0107] S23. At the first target time, after deleting the initial sequence data in the initial gait schedule table after the first target time, the initial gait schedule table of the quadruped robot is updated sequentially using each input sequence.
[0108] S24. Delete the initial sequence data in the initial gait scheduling table before the second target time.
[0109] It should be noted that you should refer to [link / reference]. Figure 4 First, the current mode running time is added to a preset first time interval to determine the first target time. Specifically, the time point when the input sequence is input into the quadruped robot is obtained, i.e., the gait insertion time point. For example, assuming the current mode running time is 51.6s and the preset first time interval is 1s, the time sequence and mode sequence after 52.6s are deleted from the initial gait scheduling table, and mode 15 is automatically inserted at the input sequence input (gait insertion) time point to ensure that the gait switch is performed while the robot is standing steadily. Next, according to the mode settings of each input sequence, they are added to the mode sequence in sequence. Then, according to the switching time of each input sequence, the gait insertion time is accumulated and added to the time sequence in sequence. Finally, mode 15 is inserted at the end of the mode sequence. Here, gait insertion is the process of converting the user's input sequence into a time sequence and a mode sequence. The insertion time point occurs after the current time (current mode running time), and the operation of inserting a new gait (new input sequence) is performed synchronously in the time sequence and the mode sequence. In this embodiment, the preset first time interval can be set as needed and is not specifically limited here.
[0110] Furthermore, gait updates include two aspects: firstly, a sliding update of the time series and pattern sequence, deleting outdated input sequences and inserting new ones, like a window sliding along the timeline; secondly, real-time updates of the mode switching time point based on foot contact status. Specifically, after each input sequence is input, i.e., after gait insertion, a sliding update (gait update) is performed on the completed pattern sequence and time series. During the sliding update process, the current mode running time is subtracted from a preset second time interval to determine the second target time. Initial sequence data in the initial gait scheduling table before the second target time is deleted. For example, assuming the current mode running time is 51.6s and the preset second time interval is 1s, the time series before 50.6s and its corresponding pattern sequence are deleted. New sequence data is continuously inserted and updated into the time series and pattern sequence based on the content of each input sequence. Through the above-mentioned ground contact signal-based time series proposed in this application, a complete timetable is available for gait query, and new gait can be inserted at any future time. In this embodiment, the preset second time interval can be set as needed, and no specific limitation is made here.
[0111] In this embodiment, based on the current mode running time and preset time interval of the quadruped robot, the initial gait schedule table of the quadruped robot is updated sequentially using each input sequence, and the initial sequence data in the initial gait schedule table is deleted.
[0112] Step 303: When the update duration of the input sequence is greater than the preset duration, output the intermediate gait scheduling table.
[0113] It should be noted that you should refer to [link / reference]. Figure 5 Based on the above steps, when the update duration of the input sequence is greater than the preset duration, an intermediate gait schedule table is output. For example, assuming the preset duration is 2s and the gait insertion time is 50s, then after 52s, the input of a new input sequence is stopped and an intermediate gait schedule table is output.
[0114] In this embodiment, when the update duration of the input sequence is greater than the preset duration, an intermediate gait scheduling table is output.
[0115] Step 304: Calculate the contact force at the foot end using the real-time status data of the quadruped robot.
[0116] Furthermore, step 304 may include the following sub-steps:
[0117] S41. Using length and angle data, construct the Jacobian matrix for the legs of the quadruped robot.
[0118] S42. Calculate the foot contact force using the leg Jacobian matrix and joint torque data.
[0119] It should be noted that after the quadruped robot's gait update stops, the length and angle data are used to construct the corresponding Jacobian matrix for the quadruped robot's legs.
[0120] The Jacobian matrix for the legs is as follows:
[0121]
[0122] Where l2 is the thigh length in the length data; for The angle data contains the sinusoidal second joint angle value; θ3 is the angle of the third joint of the quadruped robot's leg in the angle data; l1 is the length of the leg arm in the length data; for The cosine first joint angle value in the angle data; for The first joint angle value of the sinusoidal angle data; for The cosine of the second joint angle in the angle data; l3 is the lower leg length in the length data; θ2 is the second joint angle of the quadruped robot's leg in the angle data; θ1 is the first joint angle of the quadruped robot's leg in the angle data.
[0123] Furthermore, after obtaining the Jacobian matrix J of the leg, the foot contact force F can be calculated. The formula for calculating the foot contact force is as follows:
[0124]
[0125] Where F is the contact force at the foot tip; J T This is the transpose of the Jacobian matrix for the legs; This refers to the joint torque of joint θ1 in the joint torque data; This refers to the joint torque of joint θ2 in the joint torque data; This refers to the joint torque of joint θ3 in the joint torque data.
[0126] In this embodiment, the real-time status data of the quadruped robot is used to calculate the contact force at the foot end.
[0127] Step 305: When the foot contact force is greater than the preset contact force threshold and the real-time mode running time of the quadruped robot is not equal to the intermediate mode running time in the corresponding intermediate gait scheduling table, update the intermediate gait scheduling table using the real-time mode running time and output the target gait scheduling table.
[0128] It should be noted that you should refer to [link / reference]. Figure 6If the foot contact force is less than the preset contact force threshold, it is considered that the foot has not touched the ground and further adjustments are needed. When the foot contact force is greater than the preset contact force threshold and the real-time mode running time of the quadruped robot is not equal to the intermediate mode running time in the corresponding intermediate gait schedule table, the intermediate gait schedule table is updated using the real-time mode running time, and the target gait schedule table is output. Specifically, when the norm (norm(F)) of the foot contact force F is greater than the preset contact force threshold, it is considered that the foot has touched the ground and the mode in the mode sequence updated in the previous step is inherited. At the same time, if the foot of mode 6 is detected to have touched the ground at the current time, that is, the right front leg and the left hind leg have entered the support state, and the time point at this time is not equal to the predicted time point, the time series in the intermediate gait schedule table will be updated and corrected to conform to the actual state time series, thereby outputting the target gait schedule table.
[0129] In this embodiment, when the foot contact force is greater than the preset contact force threshold and the real-time mode running time of the quadruped robot is not equal to the intermediate mode running time in the corresponding intermediate gait scheduling table, the intermediate gait scheduling table is updated using the real-time mode running time, and the target gait scheduling table is output.
[0130] Step 306: When the foot contact force is greater than the preset contact force threshold and the real-time mode running time of the quadruped robot is equal to the intermediate mode running time in the corresponding intermediate gait scheduling table, acquire the trajectory height data, foot point data and running time data of the quadruped robot.
[0131] It should be noted that a stable transition between gaits of a quadruped robot requires two conditions: first, the robot body should be in a stable state, such as standing, when transitioning between gaits; second, when transitioning between gaits, the transition time of a certain mode will inevitably be brought forward. At this time, the swing leg of this mode should not swing according to the originally planned swing trajectory, but should be appropriately scaled. Otherwise, when the transition time is reached, the swing leg will still be in a swinging state, and a direct transition at this time will lead to instability of the robot body.
[0132] Further, please refer to Figure 7 The first stable transition condition for the quadruped robot is achieved by inserting standing mode 15 during gait updates, thus ensuring the quadruped robot is in a stable state. The second stable transition condition is achieved by scaling the swing trajectory of the swing leg using the corresponding trajectory height data, foot point data, and runtime data. The trajectory height data is the set original swing trajectory height as h; the foot point data includes the foot origin x. start midpoint of the foot x mid Foot landing point x end Scaling the starting point x′ of the foot startThe runtime data includes the start time t from the time series in the initial gait schedule table. start End time t end And the scaled start time t′ in the time series of the target gait scheduling table start Scaling end time t′ end Among them, by Figure 7 It can be seen that the foot starting point x start And scaling the starting point x′ of the foot start At the same position, foot starting point x start With scaling the starting point x′ of the foot start Equal; midpoint x mid Starting point x start and foot landing point x end The center point between them, if the original swing trajectory height is h and the foot starting point is x xtart and foot landing point x end If this is determined, then the midpoint x of the foot can be determined. mid .
[0133] In this embodiment, when the foot contact force is greater than a preset contact force threshold and the real-time mode running time of the quadruped robot is equal to the intermediate mode running time in the corresponding intermediate gait scheduling table, the trajectory height data, foot point data and running time data of the quadruped robot are obtained.
[0134] Step 307: Determine the scaling factor based on runtime data.
[0135] It should be noted that the start time t in the time series of the initial gait scheduling table is used. start End time t end And the scaled start time t′ in the time series of the target gait scheduling table. start The scaling end time is t′ end Calculate the scaling factor, specifically:
[0136]
[0137] In the formula, k is the scaling factor; t′ end t′ is the scaled end time in the time series of the target gait scheduling table. start t is the scaled start time in the time series of the target gait scheduling table; end t represents the end time in the time series of the initial gait scheduling table. start This represents the start time in the time series of the initial gait schedule table.
[0138] In this embodiment, the scaling factor is determined based on runtime data.
[0139] Step 308: Calculate the scaled trajectory height data using the scaling factor and trajectory height data.
[0140] It should be noted that a scaling factor is used to scale the original swing trajectory height (trajectory height data), specifically as follows:
[0141] h′=k·h;
[0142] In the formula, h′ is the scaled trajectory height data; k is the scaling factor; and h is the trajectory height data.
[0143] In this embodiment, the scaling factor and trajectory height data are used to calculate the scaled trajectory height data.
[0144] Step 309: Calculate the scaled foot data using the scaling factor and foot data.
[0145] It should be noted that the original swing trajectory step distance is scaled, that is, the foot origin x in the foot point data is used. start Foot landing point x end Scaling the starting point x′ of the foot start And the scaling factor, thereby determining the scaled foot point data, that is, the scaled foot landing point x′. end And the midpoint x′ of the scaled foot mid Among them, the scaled trajectory height data h′ and the scaled foot origin x′ are determined. start And scaling the landing point x′ of the hind foot end Then, the center point between these two points is determined as the midpoint x′ of the scaled foot. mid .
[0146] Furthermore, scaling the hind foot landing point x′ end The calculation process is as follows:
[0147] x′ end =k·(x end -x start )-x′ start ;
[0148] In the formula, x′ end This represents the scaled foot data; k is the scaling factor; x end x represents the foot landing point in the foot placement data. start For the foot point x in the foot point data start ;x′ start This refers to the scaled starting point of the foot in the foot data.
[0149] In this embodiment, scaling factor and foot point data are used to calculate scaled foot point data.
[0150] Step 310: Substitute the foot point data, scaled foot point data, and scaled trajectory height data into the preset swing curve equation set, and perform calculations in conjunction with preset constraints to output the first swing curve and the second swing curve.
[0151] It should be noted that the scaled foot origin x′ in the foot data... start The scaled foot point data and scaled trajectory height data are used as target data. They are then substituted into a preset swing curve equation set and calculated in combination with preset constraints. The eight coefficients corresponding to the swing curve are output, and the first swing curve and the second swing curve are determined. The preset swing curve equation set is as follows.
[0152]
[0153] The predefined constraints are as follows:
[0154]
[0155] The set of equations output by combining the preset oscillation curve equations with preset constraints is as follows:
[0156]
[0157] Where f1(x) is the oscillation curve during the ascending phase (first oscillation curve); a1 is the first coefficient of the first oscillation curve; b1 is the second coefficient of the first oscillation curve; c1 is the third coefficient of the first oscillation curve; d1 is the fourth coefficient of the first oscillation curve; f2(x) is the oscillation curve during the descending phase (second oscillation curve); a2 is the first coefficient of the second oscillation curve; b2 is the second coefficient of the second oscillation curve; c2 is the third coefficient of the second oscillation curve; d2 is the fourth coefficient of the second oscillation curve; x is the target data, which includes scaled back foot data and trajectory height data; x′ start x′ is the starting point of the scaled hind foot; mid h′ represents the midpoint of the scaled foot; h′ represents the scaled trajectory height data; x′ represents the midpoint of the scaled foot. end This is for scaling the landing point of the hind foot.
[0158] In this embodiment, the scaled foot point data and trajectory height data are substituted into a preset swing curve equation set, and calculations are performed in combination with preset constraints to output the first swing curve and the second swing curve.
[0159] Step 311: Using runtime data, the first swing curve, and the second swing curve, construct a scaled swing trajectory curve.
[0160] It should be noted that after obtaining the first and second oscillation curves, based on t′ in the running time data... start and t′ endBy assigning a time series to the trajectory, a scaled oscillating trajectory f(t) is constructed (scaled oscillating trajectory curve).
[0161] In this embodiment, the scaling swing trajectory curve is constructed using runtime data, the first swing curve, and the second swing curve.
[0162] Step 312: Perform linear interpolation on the scaling swing trajectory curve to determine the expected position data of the foot end of the quadruped robot.
[0163] It should be noted that after obtaining the scaled swing trajectory curve, linear interpolation is then used to query the desired position of the current foot (desired foot position data) in real time, thereby ensuring that the swing is completed within a specified time and that the foot touches the ground during gait switching. The scaling algorithm for the foot swing trajectory provided in this application ensures the stability of gait switching and possesses versatility and scalability, making it suitable for various types of legged robots, such as bipedal and hexaped robots. Technicians can make corresponding improvements according to system requirements.
[0164] In this embodiment, linear interpolation is performed on the scaling swing trajectory curve to determine the expected position data of the foot end of the quadruped robot.
[0165] For comparison of technical effects, existing technologies can be referenced. One existing robot gait scheduling method directly retrieves the desired gait without a time series, making it impossible to query past or future gaits. Gait insertion is limited to the current time, lacking delay switching capabilities and exhibiting low robustness. Furthermore, this time-triggered gait update method lacks feedback on foot contact status, easily leading to desynchronization with reality. Another existing method requires additional sensor support, necessitating the installation of four foot sensors, significantly increasing costs. Contact status is entirely dependent on the sensors; erroneous signals from the sensors cause instability in the quadruped robot. Since the sensors are mounted on the foot soles, they require waterproofing and rustproofing, and are subjected to significant pressure over extended periods, necessitating robust casing protection. A third existing method directly addresses the contact problem at the software level, which differs from the method proposed in this application. The Jacobi matrix method is similar, but more complex, requiring an accurate quadruped robot dynamics model and high Kalman loop computation costs. The quadruped robot gait scheduling method proposed in this application, however, constructs a timestamped gait sequence, enabling the control system to query the current gait and insert new gaits in real time. This achieves time synchronization between the gait and the upper layer, and stable switching between gaits. Specifically, through sequence insertion (input of the input sequence) and sequence updating (gait update), when the control system requests a gait switch, the new gait is inserted into the current pattern sequence. At the beginning of each control cycle, the foot contact force is calculated based on the Jacobi matrix to determine whether the foot is in contact with the ground, and the time and pattern sequences are further updated. This ensures that the control algorithm obtains accurate gait patterns during operation. It has a complete gait sequence, allowing gait queries and insertions at any time point. Furthermore, gait switching is event-triggered, forming a closed-loop control that guarantees the current gait is the actual gait.
[0166] In this embodiment of the invention, a gait scheduling method for a quadruped robot is provided. First, in response to a scheduling request, multiple input sequences corresponding to the quadruped robot are constructed using programming language data. Based on the current mode running time and a preset time interval corresponding to the quadruped robot, the initial gait scheduling table of the quadruped robot is updated sequentially using each input sequence, and the initial sequence data in the initial gait scheduling table is deleted. When the update duration of the input sequence is greater than the preset duration, an intermediate gait scheduling table is output. Next, the foot contact force is calculated using the real-time state data of the quadruped robot. Finally, when the foot contact force is greater than a preset contact force threshold and the real-time mode running time of the quadruped robot is not equal to the intermediate mode running time in the corresponding intermediate gait scheduling table, the intermediate gait scheduling table is updated using the real-time mode running time, and the target gait scheduling table is output. In the above scheme, this application constructs multiple sequences by combining the ideas of time-triggered and event-triggered methods, inserting gait based on time, and updating the time sequence and mode sequence based on the foot contact state, thereby achieving real-time switching and stable scheduling of gait.
[0167] Please see Figure 8 , Figure 8 This is a structural block diagram of a quadruped robot center of mass position estimation device provided in an embodiment of the present invention.
[0168] The response module 801 is used to respond to scheduling requests and construct multiple input sequences corresponding to the quadruped robot using programming language data.
[0169] The update module 802 is used to update the initial gait schedule table of the quadruped robot sequentially using each input sequence based on the current mode running time and preset time interval corresponding to the quadruped robot.
[0170] Output module 803 is used to output an intermediate gait schedule table when the update duration of the input sequence is greater than a preset duration;
[0171] The calculation module 804 is used to calculate the contact force at the foot end using the real-time state data of the quadruped robot;
[0172] The judgment module 805 is used to update the intermediate gait schedule table and output the target gait schedule table when the foot contact force is greater than the preset contact force threshold and the real-time mode running time of the quadruped robot is not equal to the intermediate mode running time in the corresponding intermediate gait schedule table.
[0173] Furthermore, update module 802 includes:
[0174] The first determining submodule is used to perform an addition operation between the current mode running time and a preset first time interval to determine the first target time.
[0175] The second determination submodule is used to perform a subtraction operation between the current mode running time and a preset second time interval to determine the second target time.
[0176] The delete submodule is used to delete the initial sequence data in the initial gait scheduling table after the first target time and the initial sequence data in the initial gait scheduling table before the second target time.
[0177] The first submodule is used to update the initial gait schedule table of the quadruped robot sequentially using each input sequence at the first target time.
[0178] Furthermore, the computing module 804 includes:
[0179] A submodule is constructed to use length and angle data to build the Jacobian matrix for the legs of the quadruped robot.
[0180] The second submodule is used to calculate the foot contact force using the leg Jacobian matrix and joint torque data.
[0181] Furthermore, the Jacobian matrix for the legs is as follows:
[0182]
[0183] Where l2 is the thigh length in the length data; for The angle data contains the sinusoidal second joint angle value; θ3 is the angle of the third joint of the quadruped robot's leg in the angle data; l1 is the length of the leg arm in the length data; for The cosine first joint angle value in the angle data; for The first joint angle value of the sinusoidal angle data; for The cosine of the second joint angle in the angle data; l3 is the lower leg length in the length data; θ2 is the second joint angle of the quadruped robot's leg in the angle data; θ1 is the first joint angle of the quadruped robot's leg in the angle data.
[0184] The formula for calculating the contact force at the foot is as follows:
[0185]
[0186] Where F is the contact force at the foot tip; J T This is the transpose of the Jacobian matrix for the legs; This refers to the joint torque of joint θ1 in the joint torque data; This refers to the joint torque of joint θ2 in the joint torque data; This refers to the joint torque of joint θ3 in the joint torque data.
[0187] Optionally, it also includes:
[0188] The acquisition module is used to acquire the trajectory height data, foot point data and running time data of the quadruped robot when the foot contact force is greater than the preset contact force threshold and the real-time mode running time of the quadruped robot is equal to the intermediate mode running time in the corresponding intermediate gait scheduling table.
[0189] The runtime module is used to determine the scaling factor based on runtime data;
[0190] The height module is used to calculate the scaled trajectory height data using a scaling factor and trajectory height data.
[0191] The foot point module is used to calculate scaled foot point data using a scaling factor and foot point data.
[0192] The curve module is used to substitute foot point data, scaled foot point data, and scaled trajectory height data into a preset swing curve equation set, and perform calculations in combination with preset constraints to output the first swing curve and the second swing curve.
[0193] A scaling module is constructed to use runtime data, the first swing curve, and the second swing curve to construct a scaled swing trajectory curve.
[0194] The linear interpolation module is used to perform linear interpolation on the scaled swing trajectory curve to determine the expected position data of the feet of the quadruped robot.
[0195] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, modules, and sub-modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0196] This invention also provides an electronic device, which includes a processor and a memory:
[0197] The memory is used to store program code and transfer the program code to the processor;
[0198] The processor is used to execute the quadruped robot gait scheduling method of the present invention according to the instructions in the program code.
[0199] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0200] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0201] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for gait scheduling of a quadruped robot, the method comprising: include: In response to scheduling requests, multiple input sequences corresponding to the quadruped robot are constructed using programming language data. Based on the current mode running time and preset time interval of the quadruped robot, the initial gait schedule table of the quadruped robot is updated sequentially using each of the input sequences, and the initial sequence data in the initial gait schedule table is deleted. When the update duration of the input sequence is greater than the preset duration, an intermediate gait scheduling table is output. The contact force at the foot end is calculated using the real-time state data of the quadruped robot. When the foot contact force is greater than a preset contact force threshold and the real-time mode running time of the quadruped robot is not equal to the intermediate mode running time in the corresponding intermediate gait scheduling table, the intermediate gait scheduling table is updated using the real-time mode running time, and the target gait scheduling table is output.
2. The quadruped robot gait scheduling method according to claim 1, characterized in that, The preset time interval includes a preset first time interval and a preset second time interval; the step of updating the initial gait schedule table of the quadruped robot by sequentially using each of the input sequences based on the current mode running time corresponding to the quadruped robot and the preset time interval, and deleting the initial sequence data in the initial gait schedule table, includes: The first target time is determined by adding the current mode running time with a preset first time interval. The second target time is determined by subtracting the current mode running time from a preset second time interval. At the first target time, after deleting the initial sequence data in the initial gait scheduling table after the first target time, the initial gait scheduling table of the quadruped robot is updated with each of the input sequences in sequence. Delete the initial sequence data in the initial gait scheduling table prior to the second target time.
3. The quadruped robot gait scheduling method according to claim 1, characterized in that, The real-time status data includes length data, angle data, and joint torque data; the step of calculating the foot contact force using the real-time status data of the quadruped robot includes: Using length and angle data, the Jacobian matrix of the legs corresponding to the quadruped robot is constructed. The foot contact force is calculated using the aforementioned leg Jacobian matrix and joint torque data.
4. The quadruped robot gait scheduling method according to claim 3, characterized in that, The Jacobian matrix for the legs is specifically as follows: Where l2 is the thigh length in the length data; for The angle data contains the sinusoidal second joint angle value; θ3 is the angle of the third joint of the quadruped robot's leg in the angle data; l1 is the length of the leg arm in the length data; for The cosine first joint angle value in the angle data; for The first joint angle value of the sinusoidal angle data; for The cosine of the second joint angle in the angle data; l3 is the lower leg length in the length data; θ2 is the second joint angle of the quadruped robot's leg in the angle data; θ1 is the first joint angle of the quadruped robot's leg in the angle data. The formula for calculating the foot contact force is as follows: Where F is the contact force at the foot tip; J T This is the transpose of the Jacobian matrix for the legs; This refers to the joint torque of joint θ1 in the joint torque data; This refers to the joint torque of joint θ2 in the joint torque data; This refers to the joint torque of joint θ3 in the joint torque data.
5. The quadruped robot gait scheduling method according to claim 1, characterized in that, Also includes: When the foot contact force is greater than a preset contact force threshold and the real-time mode running time of the quadruped robot is equal to the intermediate mode running time in the corresponding intermediate gait scheduling table, the trajectory height data, foot point data and running time data of the quadruped robot are obtained. Based on the runtime data, determine the scaling factor; Calculate the scaled trajectory height data using the scaling factor and the trajectory height data; Calculate the scaled foot data using the scaling factor and the foot data; Substitute the foot point data, the scaled foot point data, and the scaled trajectory height data into the preset swing curve equation set, and perform calculations in conjunction with preset constraints to output the first swing curve and the second swing curve. Using the runtime data, the first oscillation curve, and the second oscillation curve, a scaled oscillation trajectory curve is constructed; Linear interpolation is performed on the scaling swing trajectory curve to determine the expected foot position data corresponding to the quadruped robot.
6. A gait scheduling device for a quadruped robot, characterized in that, include: The response module is used to respond to scheduling requests and construct multiple input sequences corresponding to the quadruped robot using programming language data. The update module is used to update the initial gait schedule table of the quadruped robot sequentially using each of the input sequences based on the current mode running time and the preset time interval corresponding to the quadruped robot. The output module is used to output an intermediate gait schedule table when the update duration of the input sequence is greater than a preset duration. The calculation module is used to calculate the contact force at the foot end using the real-time state data of the quadruped robot; The judgment module is used to update the intermediate gait schedule table and output the target gait schedule table when the foot contact force is greater than a preset contact force threshold and the real-time mode running time of the quadruped robot is not equal to the intermediate mode running time in the corresponding intermediate gait schedule table.
7. The quadruped robot gait scheduling device according to claim 6, characterized in that, The preset time interval includes a preset first time interval and a preset second time interval; the update module includes: The first determining submodule is used to perform an addition operation between the current mode running time and a preset first time interval to determine the first target time. The second determining submodule is used to perform a subtraction operation between the current mode running time and a preset second time interval to determine the second target time. The deletion submodule is used to delete the initial sequence data in the initial gait scheduling table after the first target time and the initial sequence data in the initial gait scheduling table before the second target time. The first submodule is used to update the initial gait schedule table of the quadruped robot sequentially using each of the input sequences at the first target time.
8. The quadruped robot gait scheduling device according to claim 6, characterized in that, The real-time status data includes length data, angle data, and joint torque data; the calculation module includes: A submodule is constructed to use length and angle data to construct the Jacobian matrix of the legs of the quadruped robot. The second submodule is used to calculate the foot contact force using the leg Jacobian matrix and joint torque data.
9. The quadruped robot gait scheduling device according to claim 8, characterized in that, The Jacobian matrix for the legs is specifically as follows: Where l2 is the thigh length in the length data; for The angle data contains the sinusoidal second joint angle value; θ3 is the angle of the third joint of the quadruped robot's leg in the angle data; l1 is the length of the leg arm in the length data; for The cosine first joint angle value in the angle data; for The first joint angle value of the sinusoidal angle data; for The cosine of the second joint angle in the angle data; l3 is the lower leg length in the length data; θ2 is the second joint angle of the quadruped robot's leg in the angle data; θ1 is the first joint angle of the quadruped robot's leg in the angle data. The formula for calculating the foot contact force is as follows: Where F is the contact force at the foot tip; J T This is the transpose of the Jacobian matrix for the legs; This refers to the joint torque of joint θ1 in the joint torque data; This refers to the joint torque of joint θ2 in the joint torque data; This refers to the joint torque of joint θ3 in the joint torque data.
10. An electronic device, characterized in that, The system includes a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor causes the processor to perform the steps of the quadruped robot gait scheduling method as described in any one of claims 1-5.
Citation Information
Patent Citations
State correction method and device of quadruped robot, electronic equipment and storage medium
CN116483108A
Four-foot walking type bionic design device
CN212290080U