Strategy network training method, robot control method, device and equipment

By adjusting the dynamic parameters and state vectors during policy network training to enhance its robustness, it solves the problem of policy network migration failure caused by the difference between the simulator and the real world state, achieving stable migration and reducing training costs.

CN116619349BActive Publication Date: 2024-10-29TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202210130264.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-11
Publication Date
2024-10-29
Estimated Expiration
2042-02-11

AI Technical Summary

Technical Problem

Existing robot control methods based on deep simulation algorithms often fail when migrating from the simulator to the real world. This is mainly due to the large error between the robot's forward dynamics simulation in the simulator and the real world, resulting in the policy network being unable to effectively adapt to the real environment. Status changes.

Method used

During the training process of the policy network, the state vector is adjusted based on the modified dynamic parameters and real-world data to increase the coverage of the state space distribution, and the reinforcement learning method is used to train the policy network so that it can operate in a wider range of states. The ideal torque command can be calculated, thereby improving robustness.

Benefits of technology

The robustness of the policy network is enhanced, allowing it to be stably migrated from the simulator to the real world, reducing the cost of policy network training and improving the efficiency of robot gait planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116619349B_ABST
    Figure CN116619349B_ABST
Patent Text Reader

Abstract

The present application provides a policy network training method, a robot control method, a device and equipment, and relates to the field of artificial intelligence technology. The method includes: for the i-th moment among k moments, based on the corrected dynamic parameters of the robot at the i-1th moment, and / or, the first state vector of the robot at the i-th moment determined based on the uncorrected dynamic parameters of the robot at the i-1th moment is corrected, and the second state vector of the robot at the i-th moment is determined; the third state vector at the i+1th moment is obtained; the bias vector at the i-th moment is obtained; based on the k second state vectors corresponding to the k moments, the k third state vectors corresponding to the k moments, and the k labeled bias vectors corresponding to the k moments, the policy network is trained using a reinforcement learning method; the method can broaden the state distribution in the policy network training set, thereby making the trained policy network have strong robustness, so as to stably migrate to the real robot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of artificial intelligence (AI) technology, and more specifically, to a strategy network training method, a robot control method, a device and an apparatus. Background Art

[0002] With the continuous development of AI technology, how to control robots to make beautiful, elegant, natural and smooth movements has attracted attention; currently, robot control algorithms can be divided into three categories: open-loop gait generators, model prediction-based control algorithms (MPC), and data-driven control algorithms. Among them, for data-driven control algorithms, it is mainly through collecting the performance data of the robot in the environment, adjusting the parameters in the machine learning model, using the fitted model, and completely or partially replacing or fitting the nonlinear parts of the traditional algorithm to achieve the control of the robot to complete high-dynamic movements. Among the data-driven control algorithms, the deep simulation (DM) algorithm is currently more common; this algorithm collects action data from real animal dogs, and then uses deep reinforcement learning, a data-driven method, to calculate the control strategy, so that the robot can imitate the actions of real animal dogs as much as possible.

[0003] However, since there is a large error between the simulation of the robot's positive dynamics in the simulator and the real-world robot system or there is an error in the way the policy network obtains the state, the policy network trained in the simulator will generally fail when transferred to the real robot: usually manifested as the robot falling down immediately after taking the first step. Summary of the invention

[0004] The present application provides a policy network training method, a robot control method, an apparatus and a device, which can broaden the state distribution in the policy network training set, thereby making the trained policy network more robust, thereby stably migrating to a real robot.

[0005] In a first aspect, a policy network training method is provided, comprising:

[0006] For the i-th moment among the k moments, based on the corrected dynamic parameters of the robot at the i-1th moment, and / or, correcting the first state vector of the robot at the i-th moment determined based on the uncorrected dynamic parameters of the robot at the i-1th moment, determine the second state vector of the robot at the i-th moment, k>0, k≥i≥1;

[0007] Obtain the third state vector that the robot is expected to imitate at the i+1th moment;

[0008] Obtaining a marked bias vector for correcting the third state vector that the robot is expected to imitate at the i+1th moment;

[0009] The policy network is trained using a reinforcement learning method based on the k second state vectors corresponding to the k moments, the k third state vectors corresponding to the k moments, and the k labeled bias vectors corresponding to the k moments.

[0010] In a second aspect, a robot control method is provided, comprising:

[0011] Get the second state vector of the robot at time t, t>0;

[0012] Obtain the third state vector that the robot is expected to imitate at time t+1;

[0013] Taking the second state vector of the robot at the tth moment and the third state vector that the robot is expected to imitate at the t+1th moment as input, using a policy network trained based on a reinforcement learning method, a bias vector for correcting the third state vector that the robot is expected to imitate at the t+1th moment is obtained;

[0014] The strategy network is trained based on the method of the first aspect;

[0015] Based on the bias vector, the joint torque of the robot at the t-th moment is determined, and the joint torque of the robot at the t-th moment is used to control the motor of the robot to achieve the gait of the robot at the t-th moment.

[0016] In a third aspect, a strategy network training device is provided, comprising:

[0017] a determining unit, for determining a second state vector of the robot at the i-th moment among the k moments, based on the corrected dynamic parameters of the robot at the i-th moment and / or, correcting a first state vector of the robot at the i-th moment determined based on the uncorrected dynamic parameters of the robot at the i-th moment, k>0, k≥i≥1;

[0018] A first acquisition unit is used to acquire a third state vector that the robot is expected to imitate at the i+1th moment;

[0019] A second acquisition unit is used to acquire a marked bias vector for correcting the third state vector that the robot is expected to imitate at the i+1th moment;

[0020] A training unit is used to train the policy network using a reinforcement learning method based on the k second state vectors corresponding to the k moments, the k third state vectors corresponding to the k moments, and the k labeled bias vectors corresponding to the k moments.

[0021] In a fourth aspect, a robot control device is provided, characterized in that it includes:

[0022] A first acquisition unit, used for acquiring a second state vector of the robot at time t;

[0023] A second acquisition unit is used to acquire a third state vector that the robot is expected to imitate at time t+1;

[0024] an output unit, for taking the second state vector of the robot at the tth moment and the third state vector that the robot is expected to imitate at the t+1th moment as input, and using a policy network trained based on a reinforcement learning method to obtain a bias vector for correcting the third state vector that the robot is expected to imitate at the t+1th moment;

[0025] The strategy network is trained based on the method of the first aspect;

[0026] A determination unit is used to determine the joint torque of the robot at the t-th moment based on the bias vector, and the joint torque of the robot at the t-th moment is used to control the motor of the robot to realize the gait of the robot at the t-th moment.

[0027] In a fifth aspect, an electronic device is provided, including:

[0028] a processor adapted to execute a computer program;

[0029] A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the method of the first aspect or the second aspect is implemented.

[0030] In a sixth aspect, a computer-readable storage medium is provided for storing a computer program, wherein the computer program enables a computer to execute the method of the first aspect or the second aspect.

[0031] In a seventh aspect, a computer program product is provided, comprising a computer program / instruction, which implements the method of the first aspect or the second aspect when executed by a processor.

[0032] Based on the above technical solution, the second state vector of the robot at the i-th moment is determined based on the corrected dynamic parameters of the robot at the i-th moment, which is equivalent to, in the process of collecting policy network training data, by transforming the dynamic parameters at the i-th moment, the policy network obtains a different state at the i-th moment under the same state and torque command at the i-th moment, so that the policy network can explore a wider range of state space distributions during reinforcement learning training to cover situations that may be encountered in the real world, thereby overcoming the errors in the positive dynamics of the robot in the simulator; in addition, due to the correction of the dynamic parameters, the calculated state of the robot at the i-th moment is disturbed, so that the speed at the i-th moment is also disturbed, and the speed at the i-th moment affects the inertia force vector of the robot, so the state of the robot at the i-th moment after the disturbance will not only be used for the next controller to calculate the torque command, but also be used to construct the input vector during the next forward operation of the policy network. In this way, the uncertainty of the positive dynamics in the simulator is increased, the distribution of the input of the policy network is enriched, and the robustness of the policy network is enhanced.

[0033] The second state vector of the robot at the i-th moment is determined by correcting the first state vector of the robot at the i-th moment determined based on the uncorrected dynamic parameters of the robot at the i-1th moment. This is equivalent to, in the process of collecting strategy network training data, taking into account the error between the data read by the sensor on the real robot and the data read in the simulator, correcting the state vector of the i-th moment calculated by the simulator at the i-1th moment so that the corrected state vector can cover the situations that may be encountered in the real world, thereby overcoming the error between the data read by the sensor on the real robot and the data read in the simulator.

[0034] The policy network is trained using a reinforcement learning method based on the k second state vectors corresponding to the k moments, the k third state vectors corresponding to the k moments, and the k labeled bias vectors corresponding to the k moments, so that the policy network can calculate the most ideal torque command under a wider state distribution, thereby achieving the successful migration of the policy network trained to imitate expert data in the simulator to the real robot.

[0035] In addition, compared with the traditional method of training a policy network on a real robot, the method provided in this application is used to complete the robot gait planning in a simulator, reducing the training cost of the policy network.

[0036] In short, the network model training method provided in this application can broaden the state distribution in the policy network training set, thereby making the trained policy network more robust and thus stably migrating to a real robot. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0038] Figure 1 It is a schematic block diagram of the depth simulation algorithm provided in an embodiment of the present application.

[0039] Figure 2 It is a schematic flowchart of the strategy network training method provided in an embodiment of the present application.

[0040] Figure 3 It is a schematic block diagram of the improved depth simulation algorithm provided in the embodiment of the present application.

[0041] Figures 4 to 6 It is a schematic diagram of how to obtain expert fragments provided in an embodiment of the present application.

[0042] Figure 7 It is a schematic diagram of the robot in the simulator provided in the embodiment of the present application and the real robot exploring gait using the trained strategy network.

[0043] Figure 8 It is a schematic flow chart of the robot control method provided in an embodiment of the present application.

[0044] Fig. 9 It is a schematic block diagram of a strategy network training device provided in an embodiment of the present application.

[0045] Fig.10 It is a schematic block diagram of a robot control device provided in an embodiment of the present application.

[0046] Fig.11 It is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0048] Before introducing the technical field to which the embodiments of the present application are applied, the open-loop gait generator and the model prediction-based control algorithm (MPC) proposed above are briefly introduced respectively: the open-loop gait generator, that is, planning the walking trajectory of each leg in advance, and then periodically outputting control signals to drive the robot to walk; this method allows experts to design the robot's walking method based on experience and the actual environment, but the disadvantage is that it often requires a lot of debugging time and expert knowledge in the field. The model prediction-based control algorithm (MPC) is also the main algorithm previously open-sourced by MIT; after the algorithm models the environment, it solves the optimization problem at each time step to find the optimal control signal, but the problem with this algorithm is that its effect depends on the modeling accuracy of the environmental model, and it takes a lot of computing power to solve the optimal control signal during the actual deployment process, and because the online calculation is slow, and the calculation error will increase in nonlinear high-dynamic actions, it is difficult to be used in high-dynamic action planning.

[0049] The technical field to which the present application is applied will be described below.

[0050] The solution provided in this application may involve artificial intelligence technology.

[0051] Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0052] It should be understood that artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, and mechatronics. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0053] With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, drones, robots, smart medical care, smart customer service, etc. I believe that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.

[0054] The embodiments of the present application relate to machine learning (ML) in artificial intelligence technology. ML is a multi-disciplinary cross-discipline involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all fields of artificial intelligence. Machine learning and deep learning generally include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning by teaching. Specifically, the solutions provided in the embodiments of the present application relate to the robotics technology of artificial intelligence.

[0055] The following will be combined Figure 1 The deep mimic (DM) algorithm, which is relatively common in current data-driven control algorithms, is exemplified.

[0056] Figure 1 100 is a schematic block diagram of a depth simulation algorithm provided in an embodiment of the present application.

[0057] It should be understood that the deep simulation algorithm can be implemented in a simulator, which can be a pybullet simulator.

[0058] like Figure 1 As shown, the block diagram 100 includes an expert fragment module 101, a policy network module 102, a PD controller module 103, a robot positive dynamics module 104 and a state sequence cache module 105.

[0059] The expert segment module 101 is used to provide data corresponding to the action segments to be imitated by the robot in the future. The data can be captured and collected from real animals or artificially designed.

[0060] The strategy network module 102 is used to correct the data in the robot imitating expert segment module 101 so as to make the robot's movements closer to the expert segments.

[0061] The PD controller module 103 is used to calculate the joint torque of the robot.

[0062] The robot positive dynamics module 104 is used to: on the one hand, save the state of the robot at the current moment calculated by the robot positive dynamics equation at the previous moment; on the other hand, calculate the state of the robot at the next moment by the robot positive dynamics equation.

[0063] The state sequence buffer module 105 is used to store the state of the robot calculated by the forward dynamics equation of the robot.

[0064] The operation process of each module is explained below.

[0065] Exemplarily, the expert segment module 101 and the state sequence buffer module 105 respectively store the data corresponding to the action segment that the robot is expected to imitate at the next moment at a frequency of 25 Hz. t+1 The current state of the robot s t Send to the policy network module 102, the policy network module 102 receives g t+1 and t Then make a prediction and output the bias vector a used to correct the action segment that the robot is expected to imitate at the next moment t , the bias vector a t The motor joint angles sent by the expert segment module 101 The result of weighted average is As the reference signal of the PD controller, the robot positive dynamics module 104 calculates the motor rotation angle of the robot in the augmented state at the current moment by the robot positive dynamics equation at the previous moment. Sent to the PD controller, the PD controller receives the reference signal and motor joint angle Calculate the robot's current joint torque τ t , and the joint torque τ t The command is sent to the robot's motor to execute, realizing the robot's current gait and at the same time setting the joint torque τ t Sent to the robot positive dynamics module 104.

[0066] Exemplarily, the bias vector a t Joint angle with motor When taking weighted average, a t and The ratio can be 1:3, and of course it can be other ratios, and this application does not make any specific limitation on this.

[0067] In addition, in the simulator, the robot positive dynamics module 104 receives the motor torque τ sent by the PD controller module 103 t After that, according to the augmented state of the robot at the current moment and the motor torque τ saved by itself t, simulate and calculate the augmented state of the robot at the next moment, and convert the state s in the augmented state of the next moment t+1 Stored in the state sequence cache module 105.

[0068] Specifically, taking a quadruped robot as an example, the robot's positive dynamics equation is the following equation (1)

[0069]

[0070] Among them, q is an 18-dimensional augmented state vector (12-dimensional motor angle vector, 3-dimensional chassis position, 3-dimensional chassis attitude Euler angle); is the velocity vector (12-dimensional motor angular velocity, 3-dimensional chassis translation velocity, 3-dimensional chassis Euler angular velocity); is the acceleration vector; M(q) is the inertia matrix of the robot; is the inertial force vector of the robot; G(q) is the gravity vector of the robot; τ int , τ ext They are the robot’s 12-dimensional joint torque and the 4-dimensional ground friction torque (friction torque caused by the contact between the toes and the ground); S T is the conversion matrix, which is used to convert the 12-dimensional joint torque into 18 dimensions; is the Jacobian matrix, which is used to convert the 4-dimensional ground friction torque into 18 dimensions.

[0071] It should be understood that at any time step, q and They are the first augmented state vector and velocity vector corresponding to the current state at the current moment. The acceleration vector at the current moment can be calculated by the above positive dynamics equation Then, by calculating the acceleration vector at the current moment Integrate to get the next moment Then for the next moment Integrate to get q at the next moment.

[0072] It should be noted that the input of the policy network does not include the position of the robot chassis, so the input of the policy network at the next moment s t+1 is the part of q at the next moment.

[0073] However, the policy network trained in the simulator using the above-mentioned deep simulation algorithm will generally fail when transferred to a real robot: usually the robot falls down immediately after taking the first step.

[0074] After research, it was found that the failure of the above-mentioned policy network to be transferred to the real robot is that there is always a slight error between the state transfer of the robot positive dynamics simulation in the simulator and the state transfer of the robot in reality at each time step. After a period of accumulation, it may cause a large error, so that the real robot enters a state that has not been processed by the policy network in the simulator. At this time, the policy network may not be able to produce ideal output, which leads to the failure of the policy network to migrate from the simulator to reality. That is, in the reinforcement learning training of the policy network, the state distribution in the data set collected using a robot positive dynamics module that deviates from reality will be greatly different from reality. When the policy network is transferred to the real world, the robot system state can easily enter a state that has not been seen in the simulator reinforcement learning training. At this time, the policy network cannot correct the error. Therefore, the algorithm can currently control the robot well in the simulator, but it is difficult to reproduce the same performance on the Max quadruped robot in the real world.

[0075] Or the failure of the above-mentioned policy network to be migrated to a real robot is due to the way the policy network obtains state input. Specifically. In the simulation of the simulator, the robot state at any time can be accurately extracted from the memory; in the real world, the robot state required by the control algorithm is obtained by direct or indirect measurement of sensors. For example, the motor angle is measured by a code disc sensor, the chassis posture is measured by an IMU sensor, the chassis position is calculated by the motor angle and the first two quantities of posture and measured with an external camera, and the speed, angular velocity, etc. are obtained by differentiating the position and posture. There will be certain errors in the measurement, so the various calculated speeds also have certain errors. However, the simulator always assumes that the state is absolutely accurate, and the policy network trained in this way will obviously be difficult to give ideal control commands in the operation of a real robot. Therefore, if Figure 1 The deep learning algorithm shown can control the robot well in the simulator, but it is difficult to reproduce the same performance on the real-world Max quadruped robot.

[0076] In order to solve the above problems, the present application provides a policy network training method, which can enhance the robustness of the policy network, so that the control strategy output by the policy network can be more stably transferred to the real robot.

[0077] The robot control scheme provided by this application will be described in detail through the following embodiments:

[0078] Figure 2It is a schematic flow chart of the strategy network training method 200 provided in an embodiment of the present application; it should be noted that the method 200 can be executed by intelligent devices such as simulators, desktop computers, laptops, personal computers (PCs), etc., and the technical solution of the present application is exemplarily described below using the simulator as the execution body of the method 200.

[0079] like Figure 2 As shown, the method 200 may include some or all of the following:

[0080] S201, for the i-th moment among the k moments, based on the corrected dynamic parameters of the robot at the i-1th moment, and / or, correcting the first state vector of the robot at the i-th moment determined based on the uncorrected dynamic parameters of the robot at the i-1th moment, to determine the second state vector of the robot at the i-th moment, k>0, k≥i≥1;

[0081] S202, obtaining a third state vector that the robot is expected to imitate at the i+1th moment;

[0082] S203, obtaining a marked bias vector for correcting the third state vector that the robot is expected to imitate at the i+1th moment;

[0083] S204: Based on the k second state vectors corresponding to the k moments, the k third state vectors corresponding to the k moments, and the k labeled bias vectors corresponding to the k moments, the policy network is trained using a reinforcement learning method.

[0084] Based on the above technical solution, the second state vector of the robot at the i-th moment is determined based on the corrected dynamic parameters of the robot at the i-th moment, which is equivalent to, in the process of collecting policy network training data, by transforming the dynamic parameters at the i-th moment, the policy network obtains a different state at the i-th moment under the same state and torque command at the i-th moment, so that the policy network can explore a wider range of state space distributions during reinforcement learning training to cover situations that may be encountered in the real world, thereby overcoming the errors in the positive dynamics of the robot in the simulator; in addition, due to the correction of the dynamic parameters, the calculated state of the robot at the i-th moment is disturbed, so that the speed at the i-th moment is also disturbed, and the speed at the i-th moment affects the inertia force vector of the robot, so the state of the robot at the i-th moment after the disturbance will not only be used for the next controller to calculate the torque command, but also be used to construct the input vector during the next forward operation of the policy network. In this way, the uncertainty of the positive dynamics in the simulator is increased, the distribution of the input of the policy network is enriched, and the robustness of the policy network is enhanced.

[0085] The second state vector of the robot at the i-th moment is determined by correcting the first state vector of the robot at the i-th moment determined based on the uncorrected dynamic parameters of the robot at the i-1th moment. This is equivalent to, in the process of collecting strategy network training data, taking into account the error between the data read by the sensor on the real robot and the data read in the simulator, correcting the state vector of the i-th moment calculated by the simulator at the i-1th moment so that the corrected state vector can cover the situations that may be encountered in the real world, thereby overcoming the error between the data read by the sensor on the real robot and the data read in the simulator.

[0086] The policy network is trained using a reinforcement learning method based on the k second state vectors corresponding to the k moments, the k third state vectors corresponding to the k moments, and the k labeled bias vectors corresponding to the k moments, so that the policy network can calculate the most ideal torque command under a wider state distribution, thereby achieving the successful migration of the policy network trained to imitate expert data in the simulator to the real robot.

[0087] In addition, compared with the traditional method of training a policy network on a real robot, the method provided in this application is used to complete the robot gait planning in a simulator, reducing the training cost of the policy network.

[0088] In short, the network model training method provided in this application can broaden the state distribution in the policy network training set, thereby making the trained policy network more robust and thus stably migrating to a real robot.

[0089] It should be understood that the expert data proposed in this application includes the above-mentioned third state vector.

[0090] The following will be combined Figure 3 The process of determining the second state vector of the robot at the i-th moment is exemplified.

[0091] Figure 3 It is a schematic block diagram 300 of the improved depth simulation algorithm provided in an embodiment of the present application.

[0092] It should be understood that the improved depth simulation algorithm can be implemented in a simulator.

[0093] like Figure 3 As shown, the block diagram 300 includes an expert fragment module 301, a policy network module 302, a PD controller module 303, a robot positive dynamics module 304 and a state sequence cache module 305, a state observer module 306, and a dynamic parameter correction module 307.

[0094] It should be understood that Figure 3The functions and features of the expert segment module 301, the policy network module 302, the PD controller module 303, the robot positive dynamics module 304 and the state sequence cache module 305 in the embodiment of the present invention are shown in FIG. Figure 1 The expert fragment module 101, the policy network module 102, the PD controller module 103, the robot positive dynamics module 104 and the state sequence cache module 105 are the same.

[0095] The state observer module 306 is used to correct the first state vector of the robot at the i-th moment determined based on the uncorrected dynamic parameters of the robot at the i-1th moment.

[0096] The dynamic parameter correction module 307 is used to provide correction parameters of the robot's dynamic parameters at the i-1th moment.

[0097] Specifically, the robot is a quadruped robot as an example: The flowchart of deep reinforcement learning training of the quadruped robot Max model in the simulator can be referred to Figure 3 .and Figure 1 The difference is that when the robot positive dynamics module 304 calculates the positive dynamics simulation result of the robot at the i-th moment, it receives the random number sent by the dynamics parameter correction module 307, and the random number can be evenly distributed within a preset range. The robot positive dynamics module 304 uses the received random number to correct the dynamic parameters of the robot at the current moment to obtain the corrected dynamic parameters. The robot positive dynamics module 304 calculates the state of the robot at the i-th moment (the second state vector of the robot at the i-th moment) based on the corrected dynamic parameters. It should be understood that the preset range can be obtained through preliminary experiments on a real robot.

[0098] Specifically, the robot is a quadruped robot as an example: The flowchart of deep reinforcement learning training of the quadruped robot Max model in the simulator can be referred to Figure 3 .and Figure 1 The difference is that after calculating the robot's positive dynamics simulation at the i-th moment, the simulator does not directly extract the robot state required for the policy network input from the state sequence cache module 305, but uses the state observer module 306 to correct the state after calculating the robot's positive dynamics simulation at the i-th moment, and uses the corrected state (the second state vector of the robot at the i-th moment) to simulate the measured value of the state on the real robot. It should be understood that the randomized parameters included in the state observer module 306 can be obtained by processing pre-experimental measurement data on the real robot.

[0099] It should be noted that the reason why deep reinforcement learning is performed in the simulator to train the policy network is to migrate the policy network trained in the simulator to the real robot. This is because tens of millions of data need to be collected in the process of deep reinforcement learning. If collected on a real machine, it will cost a huge amount of money. Therefore, the reinforcement learning process can only be carried out through a simulator. However, the state observation of the robot in the simulator is different from reality. Therefore, the policy network training method provided in the embodiment of the present application is to collect a small amount of data on a real robot, use these data to construct a statistical relationship between the true value and the measured value of the measured quantity, and simulate such a statistical relationship in the simulator, and then perform deep reinforcement learning training in the simulator. In order to build the state observer module 306, a small amount of data is collected on the real robot, and this cost is completely acceptable.

[0100] By improving the deep simulation algorithm through the above two methods, the state distribution in the policy network training set can be broadened, and then the policy network can be trained based on the broadened state distribution, which can enhance the robustness of the policy network.

[0101] After explaining how to determine the second state vector of the robot at the i-th moment, let's take a quadruped robot as an example. Figures 4 to 6 An example explanation is given on how to obtain expert fragments.

[0102] Specific combination Figure 4 For example, first, with the help of motion capture equipment, in a professional motion capture venue, motion capture data of the puppy performing various actions are obtained; secondly, the acquired motion capture data is processed to obtain the position and posture of any joint of the puppy in space in each frame of the motion capture data; finally, the position and posture of any joint of the puppy in space in each frame are mapped to the robot.

[0103] Exemplarily, the motion capture data format can be in fbx format. After obtaining the motion capture data in fbx format, maya software can be used to convert the motion capture data in fbx format into motion capture data in bvh format; then the motion capture data in bvh format is processed to obtain the position and posture of any joint of the puppy in space in each frame.

[0104] Figure 5 It shows the skeletal state of the puppy when the bvh format motion capture data is played to a certain frame.

[0105] Combination Figure 5 For example, first, in this frame, the positions of the four shoulders / hips and the four toes of the puppy in space are obtained by calculation; secondly, based on the positions of the four shoulders / hips and the four toes of the puppy in space, a plane is linearly regressed, and based on this plane, the chassis position and posture of the robot are determined.

[0106] Exemplarily, the average of the three-dimensional position coordinates of the four shoulders / hips of the puppy is taken to obtain the corresponding three-dimensional coordinates of the chassis position; exemplary, the sum of the three-dimensional position coordinates of the first two shoulders / hips and the sum of the three-dimensional position coordinates of the last two shoulders / hips of the puppy are determined, and then the sum of the three-dimensional position coordinates of the last two shoulders / hips is subtracted from the sum of the three-dimensional position coordinates of the first two shoulders / hips, and the data obtained after the subtraction is normalized into a unit vector, that is, the right direction of the chassis is obtained; similarly, the sum of the three-dimensional position coordinates of the two shoulders / hips on the left side of the puppy is subtracted from the sum of the three-dimensional position coordinates of the two shoulders / hips on the right side, and the data obtained after the subtraction is normalized into a unit vector, that is, the left direction of the chassis is obtained, and the left direction is cross-multiplied by the right direction to obtain the upper direction of the chassis; based on the chassis attitude direction determined above, the rotation matrix of the chassis attitude can be obtained.

[0107] It should be understood that the joint data collected from the real puppy has a high degree of freedom (about 40 joints), and each joint is treated as a ball joint, each ball joint has 3 degrees of freedom, so the degree of freedom is extremely high; while for a quadruped robot, there are generally only 12 motors simulating 12 axis joints, only 12 degrees of freedom. Therefore, mapping the joints of the puppy in the motion capture data to the robot will be a process of reducing the dimensionality and reducing the degrees of freedom.

[0108] Figure 6 The 12 motor angles of the robot's 12 axis joints are shown.

[0109] Combination Figure 6 For example, if the position and posture of the chassis in space are known, and the three-dimensional position of the end of the left front leg of the quadruped robot (the end of L5) in space is known, the rotation angles (θ1, θ2, θ3) of the three motors of the robot's leg can be calculated. Similarly, the corresponding rotation angles of the 12 motors on the four legs of the quadruped robot can be calculated.

[0110] It should be noted that if Figure 6 As shown, the local coordinates of the center of the first motor shaft on the left front leg in the chassis coordinate system are (L1, L2, 0), the local coordinates of the center of the second motor shaft in the first motor coordinate system are (0, L3, 0), the local coordinates of the center of the third motor shaft in the second motor coordinate system are (0, 0, -L4), and the local coordinates of the end of the left front leg in the third motor coordinate system are (0, 0, -L5).

[0111] Based on this, the 12 motor angles, chassis position, and chassis posture of the quadruped robot are obtained, that is, each frame of motion capture data is mapped to the quadruped robot, which is equivalent to a 19-dimensional vector (12-dimensional motor angle, 3-dimensional chassis position, 4-dimensional chassis posture); it should be noted that the posture of the chassis in the 19-dimensional vector is represented by posture quaternion. If the chassis posture is represented by Euler angles, then each frame of motion capture data is mapped to the quadruped robot, which is equivalent to an 18-dimensional vector; it should be understood that all motion capture data is mapped to the quadruped robot, which is equivalent to an N*19 matrix.

[0112] After determining the second state vector of the robot at the i-th moment and obtaining the third state vector that the robot is expected to imitate at the i+1-th moment, the policy network is trained based on the k second state vectors corresponding to the k moments and the k third state vectors corresponding to the k moments using the reinforcement learning method. This can make the trained policy network more robust and thus stably migrated to the real robot.

[0113] Next, we will use the improved deep simulation algorithm to train the policy network of the quadruped robot Max in the simulator, and combine it with Figure 7 The effect of the improved depth simulation algorithm is illustrated by way of example.

[0114] Figure 7 It is a schematic diagram of the robot in the simulator provided in the embodiment of the present application and the real robot exploring gait using the trained strategy network.

[0115] like Figure 7 As shown on the left, in the simulator, the part pointed by arrow 1 is the action clip that the user expects the robot to imitate, and the part pointed by arrow 2 is the robot model with dynamic simulation, which is exploring how to better imitate the expert data. After the simulator training is completed, the policy network is migrated to Figure 7 On the real robot shown on the right, it is also possible to stably control the robot to follow the gait that the robot is expected to imitate.

[0116] In some embodiments of the present application, the dynamic parameter includes chassis mass, and S201 may include:

[0117] Obtaining a first random number within a first preset range;

[0118] Using the first random number to correct the chassis mass to obtain a corrected chassis mass;

[0119] Using the corrected chassis mass, an inertia matrix and a gravity vector corresponding to the corrected chassis mass are obtained;

[0120] Based on the inertia matrix and the gravity vector, the second state vector of the robot at the i-th moment is obtained using the positive dynamics equation of the robot.

[0121] Exemplarily, the first preset range may be obtained based on experience, and the first random number may satisfy a uniform distribution between 0.9 and 1.1.

[0122] Taking into account the mass in the dynamic parameters, which affects the inertia matrix and gravity vector of the robot, before using the positive dynamics equation of the robot to calculate the first augmented state vector of the robot at the i-th moment, the chassis mass at the i-1th moment is corrected using the first random number, and then the first augmented state vector of the robot at the i-th moment is calculated based on the corrected mass. This allows the simulator to obtain a different state at the i-th moment under the same current state and torque command at the i-1th moment, so that the policy network can explore a wider range of state space distributions during reinforcement learning training to cover situations that may be encountered in the real world, thereby overcoming the errors in the positive dynamics of the robot in the simulator.

[0123] It should be noted that the second state vector of the robot at the i-th moment includes other components of the augmented state vector of the robot at the i-th moment except the chassis position.

[0124] Taking the robot as a quadruped robot as an example, combined with the above equation (1), after correcting the chassis mass, it is equivalent to that the M(q) inertia matrix and the G(q) gravity vector in the positive dynamic equation change, that is, under the same current state and torque command at the i-1th moment, the simulator can obtain a different state at the i-th moment.

[0125] In an implementable manner provided in the present application, the product of the first random number and the chassis mass is determined as the corrected chassis mass.

[0126] Of course, in other alternative implementations, the first random number may be added to or multiplied by a preset value, and then multiplied by the chassis mass to determine the corrected chassis mass, and this application does not impose any specific restrictions on this.

[0127] In some embodiments of the present application, the dynamic parameter includes a joint friction coefficient, and S201 may also include:

[0128] Obtain a second random number within a second preset range;

[0129] Using the second random number to correct the joint friction coefficient of the robot at the i-1th moment to obtain a corrected joint friction coefficient;

[0130] Based on the corrected joint friction coefficient, determine the joint friction torque of the robot at the i-1th moment;

[0131] Based on the joint friction torque, determine the joint torque of the robot at the i-1th moment;

[0132] Based on the joint torque of the robot at the i-1th moment and using the positive dynamics equation of the robot, the second state vector of the robot at the i-th moment is obtained.

[0133] Exemplarily, the second preset range may be obtained based on experience, and the second random number may satisfy a uniform distribution between 0.6 and 1.2.

[0134] Since the joint friction coefficient in the dynamic parameters affects the joint torque of the robot, before using the positive dynamics equation of the robot to calculate the first augmented state vector of the robot at the i-th moment, the joint friction coefficient at the i-1th moment is corrected by the second random number, and then the first augmented state vector of the robot at the i-th moment is calculated based on the corrected joint friction coefficient. This allows the simulator to obtain a different state at the i-th moment under the same current state and torque command at the i-1th moment.

[0135] Taking the robot as a quadruped robot as an example, combined with the above equation (1), after correcting the joint friction coefficient, it is equivalent to τ in the positive dynamic equation int The purpose of the simulator to obtain a different state at the i-th moment is to change the current state and torque command at the i-1th moment. It should be understood that the τ that finally participates in the calculation of the equation int It is equal to the difference between the joint torque in the torque command given at time i-1 and the above-mentioned joint friction torque.

[0136] It should be noted that the joint friction coefficient is the friction coefficient between joints.

[0137] In an implementable manner provided in the present application, the second random number is determined as the corrected joint friction coefficient.

[0138] Of course, in other alternative implementations, the second random number may be added to or multiplied by a preset value to obtain a new value, and then the new value obtained is determined as the corrected joint friction coefficient. This application does not impose any specific restrictions on this.

[0139] In some embodiments of the present application, the dynamic parameter includes a ground friction coefficient, and S201 may further include:

[0140] Obtain a third random number within a third preset range;

[0141] The third random number is determined as a corrected ground friction coefficient;

[0142] Based on the corrected ground friction coefficient, determining the ground friction torque;

[0143] Based on the ground friction torque and using the positive dynamics equation of the robot, the second state vector of the robot at the i-th moment is obtained.

[0144] It should be noted that the third preset range may be obtained based on experience. Exemplarily, the third random number may satisfy a uniform distribution between 0.6 and 1.2.

[0145] Since the ground friction coefficient in the dynamic parameters affects the ground friction torque of the robot, before using the positive dynamics equation of the robot to calculate the first augmented state vector of the robot at the i-th moment, the ground friction coefficient at the i-1th moment is corrected by the third random number, and then the first augmented state vector of the robot at the i-th moment is calculated based on the corrected ground friction coefficient. This allows the simulator to obtain a different state at the i-th moment under the same current state and torque command at the i-1th moment.

[0146] Taking the robot as a quadruped robot as an example, combined with the above equation (1), after correcting the ground friction coefficient, it is equivalent to τ in the positive dynamic equation ext The purpose of the change is to enable the simulator to obtain a different state at the i-th moment when the current state and torque command are the same at the i-1th moment.

[0147] It should be noted that the ground friction coefficient is the friction coefficient between the robot end effector and the ground.

[0148] Of course, in other alternative embodiments, τ in the above equation (1) can also be replaced by ext Corrections are made and random numbers are added to disturb the state of the robot at the next moment. The present application does not impose any specific restrictions on the corrected dynamic parameters. As long as they conform to the inventive concept provided in the present application, they are within the scope of protection of the present application.

[0149] In some embodiments of the present application, S201 may further include:

[0150] Acquire a first random vector within a fourth preset range;

[0151] The motor angle component in the first state vector of the robot at the i-th moment is corrected by using the first random vector to obtain the second state vector of the robot at the i-th moment, and the dimension of the first random vector is the same as the dimension of the motor angle component.

[0152] It should be noted that the first random vector is used to characterize the error between the real value and the measured value of the motor angle of the robot, that is, the error of the motor angle sensor; the fourth preset range is the range of the error between the real value and the measured value of the motor angle of the robot. The real value of the motor angle is the value of the motor angle read in the simulator; the measured value of the motor angle is the value obtained by measuring the motor angle with a sensor in the real world.

[0153] In reinforcement learning training, the simulator avoids directly reading the robot's next state from the memory. Instead, it obtains the first random vector within a preset range in the simulator to simulate the effect of the real-world state observer. This enables the policy network trained by deep reinforcement learning to be anti-interference to state measurements with errors, thereby making the trained policy neural network more robust and able to stably migrate to the real robot.

[0154] In one implementable method, the sum of the first random vector and the motor angle component in the first state vector of the robot at the i-th moment is determined as the motor angle component in the second state vector of the robot at the i-th moment, and the first random vector obeys a Gaussian distribution with the standard deviation of the error of the motor angle sensor of the robot at the first moment as the standard deviation and the motor angle component in the first augmented state vector of the robot at the first moment as the mean.

[0155] Of course, in other alternative implementations, the first random vector may be added to or multiplied by a certain coefficient to obtain a new first random vector, and then the sum of the new first random vector and the motor angle component in the first state vector of the robot at the i-th moment is determined as the motor angle component in the second state vector of the robot at the i-th moment.

[0156] Considering that there is an error between the state of the robot at the next moment obtained by the simulator and the state of the real robot at the next moment, and the state vector of the robot at the next moment includes the motor angle component, in the reinforcement learning training, the first random vector is added to the first state vector at the i-1th moment calculated to simulate the effect of the real-world state observer, so that the policy network trained by deep reinforcement learning has the ability to resist interference with erroneous state measurements, and thus the trained policy neural network has strong robustness and can be stably migrated to the real robot.

[0157] It should be noted that the first moment may be any moment before the i-th moment, and this application does not impose any specific limitation on this.

[0158] In some embodiments of the present application, before obtaining the second state vector of the robot at the i-th moment, the method further includes:

[0159] The fourth preset range is determined by the following method:

[0160] Using the same controller as the traditional deep simulation algorithm, the robot is made to perform the same twisting, walking, running, turning and other actions in the simulator and in the real world. Then, the following data are recorded at the first moment:

[0161] The target motor angle vector q at the first moment in the simulator sim-ref ;

[0162] The real motor angle vector q of the robot at the first moment in the simulator sim ;

[0163] The target motor angle vector q of the robot at the first moment in the real world real-ref ;

[0164] The real motor angle vector q of the robot at the first moment in the real world real ;

[0165] It should be noted that the target motor angle vector q sim-ref Equivalent to Figure 1 The reference signal shown The real motor angle vector q sim Equivalent to Figure 1 shown

[0166] Based on the parameters obtained above, the expression of the motor angle sensor error Δq can be defined as formula (1):

[0167] Δq t =q real -q real-ref +q sim-ref -q sim Formula (1);

[0168] Based on the above formula (1), determine the standard deviation of Δq;

[0169] Based on this, the error of the robot's motor angle sensor is determined to obey the standard deviation of Δq and the standard deviation of q. sim is a Gaussian distribution with a mean value; that is, the fourth preset range is determined to be a standard deviation of Δq, with q sim is a Gaussian distribution with a mean.

[0170] In some embodiments of the present application, S201 may further include:

[0171] Acquire a second random vector within a fifth preset range;

[0172] The second random vector is used to correct the posture component in the first state vector of the robot at the i-th moment to obtain the second state vector of the robot at the i-th moment. The dimension of the second random vector is the same as the dimension of the posture component.

[0173] It should be noted that the second random vector is used to characterize the error between the true value and the measured value of the robot's posture Euler angle, that is, the error of the posture Euler angle sensor; the fifth preset range is the error range between the true value and the measured value of the robot's posture Euler angle; wherein the true value of the posture Euler angle is the numerical value of the posture Euler angle determined in the simulator; the measured value of the posture Euler angle is the numerical value obtained by measuring the posture Euler angle with a sensor in the real world.

[0174] In reinforcement learning training, the simulator avoids directly reading the robot's state at the next moment from the memory. Instead, it obtains a second random vector within a preset range in the simulator to simulate the effect of a real-world state observer. This enables the policy network trained by deep reinforcement learning to be anti-interference with state measurements with errors, thereby making the trained policy neural network more robust and able to stably migrate to the real robot.

[0175] In one implementable method, the sum of the second random vector and the posture component in the first state vector is determined as the posture component in the second state vector, and the second random vector obeys a Gaussian distribution with the standard deviation of the error of the posture sensor of the robot at the second moment as the standard deviation and the posture component in the first augmented state vector of the robot at the second moment as the mean.

[0176] Of course, in other alternative implementations, the second random vector may be added to or multiplied by a certain coefficient to obtain a new second random vector, and then the sum of the new second random vector and the posture component in the first state vector is determined as the posture component in the second state vector.

[0177] Considering that there is an error between the state of the robot at the next moment obtained by the simulator and the state of the real robot at the next moment, and the state vector of the robot at the next moment includes the Euler angle component of the posture, in the reinforcement learning training, a second random vector is added to the first state vector at the i-th moment calculated at the i-1th moment to simulate the effect of the real-world state observer, so that the policy network trained by deep reinforcement learning has the ability to resist interference with erroneous state measurements, and thus the trained policy neural network has strong robustness and can be stably migrated to the real robot.

[0178] It should be noted that the second moment may be any moment before the i-th moment, and this application does not impose any specific limitation on this.

[0179] In some embodiments of the present application, before obtaining the second state vector of the robot at the i-th moment, the method further includes:

[0180] The fifth preset range is determined by the following method:

[0181] Using the same controller as the traditional deep simulation algorithm, the robot is made to perform the same twisting, walking, running, turning and other actions in the simulator and in the real world. Then, the following data at the second moment are recorded respectively:

[0182] The Euler angle vector o of the second moment in the simulator sim ;

[0183] The robot's posture Euler angle vector o at the second moment in the real world real ;

[0184] Based on the parameters obtained above, the expression of the attitude Euler angle sensor error Δo can be defined as formula (2):

[0185] Δo=o real -o sim Formula (2);

[0186] Based on the above formula (2), determine the standard deviation of Δo;

[0187] Based on this, the error of the robot's posture Euler angle sensor is determined to obey the standard deviation of Δo and the standard deviation of o sim That is, the fourth preset range is determined to be a Gaussian distribution with a standard deviation of Δo as the standard deviation and a standard deviation of o sim is a Gaussian distribution with a mean.

[0188] In some embodiments of the present application, before S201, method 200 may further include:

[0189] Obtain the first augmented state vector of the robot at the i-1th moment;

[0190] Determine the joint torque of the robot at the i-1th moment;

[0191] Based on the first augmented state vector of the robot at the i-1th moment and the joint torque of the robot at the i-1th moment, using the positive dynamics equation of the robot, obtain the first augmented state vector of the robot at the i-th moment;

[0192] Determine a first state vector of the robot at the i-th moment based on the first augmented state vector of the robot at the i-th moment;

[0193] Combined with the above Figure 1For example, first, the first augmented state vector of the robot at the i-1th moment is obtained from the robot positive dynamics module 104; secondly, based on the bias vector output by the strategy network at the i-1th moment and the third state vector that the robot is expected to imitate at the i-1th moment, the controller is used to output the joint torque of the robot at the i-1th moment; finally, the first augmented state vector of the robot at the i-1th moment and the joint torque of the robot at the i-1th moment are substituted into the above equation (1), so as to obtain the first augmented state vector at the i-th moment, and other components of the chassis position are removed from the first augmented state vector at the i-th moment to determine it as the first state vector of the robot at the i-th moment.

[0194] When calculating the first augmented state vector of the robot at the i-th moment, the first augmented state vector of the robot at the i-1th moment is substituted into the above equation (1) for calculation, instead of substituting the second augmented state vector corresponding to the second state vector of the robot at the i-1th moment after correction into the above equation (1). This is equivalent to using the robot's positive dynamics equation to calculate the state at the i-th moment, and the state value without adding the random vector is still involved in the calculation, which can avoid the error caused by the inaccurate sensor measurement of the robot in the real world.

[0195] Combination Figure 1 For example, if the robot is a quadruped robot, then the first augmented state vector of the robot at the i-1th moment is the 18-dimensional augmented state vector calculated by the above equation (1) at the i-2th moment.

[0196] The above describes in detail how to determine the training set in the policy network training method. Specifically, the training set includes k second state vectors corresponding to k moments, k third state vectors corresponding to k moments, and k labeled bias vectors corresponding to k moments. The following is an exemplary description of the training process of the policy network.

[0197] To facilitate understanding, reinforcement learning is explained below.

[0198] Reinforcement learning is a mapping mechanism that maximizes numerical reward signals. It can adaptively learn optimal control strategies in random environments without relying on prior knowledge of controlling robots. The robot interacts with the environment through the state of the robot at the current moment and the state that the expert expects the robot to be at the next moment to update the weight parameters of the policy network. It should be understood that the state of the robot at the current moment in this application is determined by randomly modifying the dynamic parameters of the robot at the previous moment or randomly modifying the first state vector of the robot at the previous moment.

[0199] The following will use the reinforcement learning method to briefly describe the training process of the policy network using one moment (the i-th moment) among the K moments. It should be understood that the training process at other moments is the same as the training process at the i-th moment.

[0200] Specifically, the second state vector corresponding to the i-th moment, the third state vector corresponding to the i-th moment, the bias vector corresponding to the i-th moment and the reward of the bias vector, and the second state vector corresponding to the i+1-th moment are used as a training sample to train the policy network using the reinforcement learning method.

[0201] Exemplarily, the reward function for each step in the policy network training process can be defined as the following formula (3):

[0202]

[0203] in, is the motor angle vector of the robot at time t, is the motor angle vector of the robot expected at time t in the expert segment, is the actual position of the robot chassis at time t, is the expected position of the robot chassis at time t in the expert segment, is the Euler angle of the robot's chassis posture at time t, is the Euler angle of the chassis posture of the robot at time t in the expert segment.

[0204] It should be noted that the execution subject of the training process can be the same as the execution subject in the above method 200. The following is an example of the execution subject of the training process being a simulator. It should be understood that the training framework of the policy network can be as follows: Figure 3 The depth simulation algorithm framework shown.

[0205] Specifically, combined Figure 3 For example, the strategy network module 302 obtains the second state vector corresponding to the robot from the t-2th moment to the tth moment from the state sequence cache module 305 at a frequency of 25 Hz as part of the strategy network input, and obtains the third state vector corresponding to the t+1th moment to the t+4th moment from the expert fragment module 301 as part of the strategy network input. The strategy network module 302 outputs a 12-dimensional bias vector corresponding to the tth moment. The output 12-dimensional bias vector is weighted averaged with the motor angle vector in the third state vector corresponding to the t+1th moment at a certain ratio to obtain a reference signal for the PD controller.

[0206] The following will provide an exemplary description of the input and output of the policy network in conjunction with Table 1.

[0207] Table 1

[0208]

[0209] Exemplarily, the second state vector from the t-2th moment to the tth moment may be the second state vector corresponding to the last 80ms of the current moment, the second state vector corresponding to the last 40ms of the current moment, and the second state vector of the current moment; correspondingly, the third state vector from the t+1th moment to the t+4th moment may be the third state vector corresponding to the 40th ms, the third state vector corresponding to the 80th ms, the third state vector corresponding to the 120th ms, and the third state vector corresponding to the 160th ms. It should be understood that the current moment is the 0th moment, and the number of second state vectors and third state vectors input into the policy network embodied in Table 1 is only schematic.

[0210] After completing the training process of the above-mentioned policy network in the simulator, the obtained policy network, in conjunction with the simulated expert segment data, can control the robot to complete the gait and trajectory that are basically completely consistent with the expert segment. If the programming language used to train the policy network is Python, the policy network and the interface for loading expert segment data are translated from Python into C++ and deployed in the test simulator to test the robustness of the policy network and the switching and connection between the neural network controller and other traditional controllers. After the test is correct, the strategy can be migrated to the real robot with the same interface to work. It should be noted that the test simulator can be a gazebo simulator, and this application does not specifically limit the type of simulator.

[0211] The following will be combined Figure 8 The application process of the policy network is illustrated by way of example.

[0212] Figure 8 It is a schematic flow chart of the robot control method 400 provided in an embodiment of the present application; it should be noted that the method 400 can be executed by intelligent devices such as simulators, desktop computers, laptop computers, personal computers (PC), robot controllers, etc., and the technical solution of the present application is exemplarily explained below using the robot controller as the execution subject of the method 800.

[0213] like Figure 8 As shown, the method 400 may include some or all of the following:

[0214] S401, obtaining the second state vector of the robot at time t;

[0215] S402, obtaining a third state vector that the robot is expected to imitate at time t+1;

[0216] S403, taking the second state vector of the robot at the tth moment and the third state vector that the robot is expected to imitate at the t+1th moment as input, using a policy network trained based on a reinforcement learning method, to obtain a bias vector for correcting the third state vector that the robot is expected to imitate at the t+1th moment;

[0217] The strategy network is trained based on the strategy network training method provided in any of the above embodiments;

[0218] S404, determining the joint torque of the robot at the t-th moment based on the bias vector, wherein the joint torque of the robot at the t-th moment is used to control the motor of the robot to realize the gait of the robot at the t-th moment.

[0219] By using the above-mentioned trained strategy network to obtain the bias vector corresponding to the t-th moment, and then based on the bias vector, determining the joint torque of the robot at the t-th moment, the joint torque of the robot at the t-th moment can be made closer to the joint torque of the real robot. On the one hand, it not only avoids the failure problem of migrating the deep simulation algorithm to the real robot, but also helps to achieve smooth and simulated operation of the robot.

[0220] The preferred embodiments of the present application are described in detail above in conjunction with the accompanying drawings. However, the present application is not limited to the specific details in the above embodiments. Within the technical concept of the present application, the technical solution of the present application can be subjected to a variety of simple modifications, and these simple modifications all belong to the protection scope of the present application. For example, the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present application will not further describe various possible combinations. For another example, the various different embodiments of the present application can also be combined arbitrarily, as long as they do not violate the idea of ​​the present application, they should also be regarded as the contents disclosed in the present application. It should also be understood that in the various method embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0221] The above describes the method provided in the embodiment of the present application. The following describes the strategy network training device and robot control device provided in the embodiment of the present application.

[0222] Fig. 9 It is a schematic block diagram of a strategy network training device 500 provided in an embodiment of the present application.

[0223] It should be noted that the strategy network training device is a simulator.

[0224] like Fig. 9 As shown, the strategy network training device 500 may include some or all of the following contents:

[0225] a determining unit 510, for determining a second state vector of the robot at the i-th moment among the k moments, based on the corrected dynamic parameters of the robot at the i-th moment and / or by correcting the first state vector of the robot at the i-th moment determined based on the uncorrected dynamic parameters of the robot at the i-th moment, k>0, k≥i≥1;

[0226] A first acquisition unit 520 is used to acquire a third state vector that the robot is expected to imitate at the i+1th moment;

[0227] A second acquisition unit 530 is used to acquire a marked bias vector for correcting the third state vector that the robot is expected to imitate at the i+1th moment;

[0228] The training unit 540 is used to train the policy network using a reinforcement learning method based on the k second state vectors corresponding to the k moments, the k third state vectors corresponding to the k moments, and the k labeled bias vectors corresponding to the k moments.

[0229] In some embodiments of the present application, the dynamic parameter includes chassis mass; the determination unit 510 is specifically used to:

[0230] Obtaining a first random number within a first preset range;

[0231] Using the first random number to correct the chassis mass to obtain a corrected chassis mass;

[0232] Using the corrected chassis mass, an inertia matrix and a gravity vector corresponding to the corrected chassis mass are obtained;

[0233] Based on the inertia matrix and the gravity vector, the second state vector of the robot at the i-th moment is obtained using the positive dynamics equation of the robot.

[0234] In some embodiments of the present application, the determining unit 510 is further specifically configured to:

[0235] The product of the first random number and the chassis mass is determined as the corrected chassis mass.

[0236] In some embodiments of the present application, the dynamic parameter includes a joint friction coefficient; the determination unit 510 is further specifically used for:

[0237] Wherein, based on the corrected dynamic parameters of the robot at the i-1th moment, and / or, correcting the first state vector of the robot at the i-th moment determined based on the uncorrected dynamic parameters of the robot at the i-1th moment, to determine the second state vector of the robot at the i-th moment, comprises:

[0238] Obtain a second random number within a second preset range;

[0239] Using the second random number to correct the joint friction coefficient of the robot at the i-1th moment to obtain a corrected joint friction coefficient;

[0240] Based on the corrected joint friction coefficient, determine the joint friction torque of the robot at the i-1th moment;

[0241] Based on the joint friction torque, determine the joint torque of the robot at the i-1th moment;

[0242] Based on the joint torque of the robot at the i-1th moment and using the positive dynamics equation of the robot, the second state vector of the robot at the i-th moment is obtained.

[0243] In some embodiments of the present application, the determining unit 510 is further specifically configured to:

[0244] The second random number is determined as the corrected joint friction coefficient.

[0245] In some embodiments of the present application, the dynamic parameter includes a ground friction coefficient; the determination unit 510 is further specifically configured to:

[0246] Obtain a third random number within a third preset range;

[0247] The third random number is determined as a corrected ground friction coefficient;

[0248] Based on the corrected ground friction coefficient, determining the ground friction torque;

[0249] Based on the ground friction torque and using the positive dynamics equation of the robot, the second state vector of the robot at the i-th moment is obtained.

[0250] In some embodiments of the present application, the determining unit 510 is further specifically configured to:

[0251] Acquire a first random vector within a fourth preset range;

[0252] The motor angle component in the first state vector of the robot at the i-th moment is corrected by using the first random vector to obtain the second state vector of the robot at the i-th moment, and the dimension of the first random vector is the same as the dimension of the motor angle component.

[0253] In some embodiments of the present application, the determining unit 510 is further specifically configured to:

[0254] The sum of the first random vector and the motor angle component in the first state vector of the robot at the i-th moment is determined as the motor angle component in the second state vector of the robot at the i-th moment. The first random vector obeys a Gaussian distribution with the standard deviation of the error of the motor angle sensor of the robot at the first moment as the standard deviation and the motor angle component in the first augmented state vector of the robot at the first moment as the mean.

[0255] In some embodiments of the present application, the determining unit 510 is further specifically configured to:

[0256] Acquire a second random vector within a fifth preset range;

[0257] The second random vector is used to correct the posture component in the first state vector of the robot at the i-th moment to obtain the second state vector of the robot at the i-th moment. The dimension of the second random vector is the same as the dimension of the posture component.

[0258] In some embodiments of the present application, the determining unit 510 is further specifically configured to:

[0259] The sum of the second random vector and the posture component in the first state vector is determined as the posture component in the second state vector, and the second random vector obeys a Gaussian distribution with the standard deviation of the error of the posture sensor of the robot at the second moment as the standard deviation and the posture component in the first augmented state vector of the robot at the second moment as the mean.

[0260] In some embodiments of the present application, the first acquisition unit 520 is specifically used to:

[0261] Obtain the first augmented state vector of the robot at the i-1th moment;

[0262] Determine the joint torque of the robot at the i-1th moment;

[0263] Based on the first augmented state vector of the robot at the i-1th moment and the joint torque of the robot at the i-1th moment, using the positive dynamics equation of the robot, obtain the first augmented state vector of the robot at the i-th moment;

[0264] Based on the first augmented state vector of the robot at the i-th moment, the first state vector of the robot at the i-th moment is determined.

[0265] Fig.10 It is a schematic block diagram of a robot control device 600 provided in an embodiment of the present application.

[0266] like Fig.10As shown, the robot control device 600 may include some or all of the following:

[0267] A first acquisition unit 610 is used to acquire a second state vector of the robot at time t;

[0268] A second acquisition unit 620 is used to acquire a third state vector that the robot is expected to imitate at time t+1;

[0269] The output unit 630 is used to use the second state vector of the robot at the tth time and the third state vector that the robot is expected to imitate at the t+1th time as input, and use the policy network trained based on the reinforcement learning method to obtain a bias vector for correcting the third state vector that the robot is expected to imitate at the t+1th time;

[0270] The strategy network is trained based on the strategy network training method provided in any of the above embodiments;

[0271] The determination unit 640 is used to determine the joint torque of the robot at the t-th moment based on the bias vector, and the joint torque of the robot at the t-th moment is used to control the motor of the robot to achieve the gait of the robot at the t-th moment.

[0272] It should be noted that the expert data and expert fragments proposed in this application have the same meaning and can be replaced with each other.

[0273] It should be understood that the embodiments of the policy network training device 500 and the robot control device 600 may correspond to the method embodiments, and similar descriptions may refer to the method embodiments. To avoid repetition, they will not be repeated here. Specifically, the policy network training device 500 and the robot control device 600 may correspond to the corresponding subjects in the method 200 and the method 400 of the embodiment of the present application, and the various units in the policy network training device 500 and the robot control device 600 are respectively for implementing the corresponding processes in the method 200 and the method 400, which will not be repeated here for the sake of brevity.

[0274] It should also be understood that the various units in the policy network training device 500 and the robot control device 600 involved in the embodiments of the present application can be separately or completely combined into one or several other units to constitute, or one (some) of the units can also be split into multiple smaller units in function to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present application. The above-mentioned units are divided based on logical functions. In practical applications, the function of one unit can also be implemented by multiple units, or the functions of multiple units can be implemented by one unit. In other embodiments of the present application, the policy network training device 500 and the robot control device 600 may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented by the collaboration of multiple units. According to another embodiment of the present application, the policy network training device 500 and the robot control device 600 involved in the embodiment of the present application can be constructed by running a computer program (including program code) capable of executing each step involved in the corresponding method on a general computing device of a general-purpose computer including processing elements and storage elements such as a central processing unit (CPU), a random access storage medium (RAM), and a read-only storage medium (ROM), so as to implement the policy network training method and the robot control method of the embodiment of the present application. Among them, the computer program can be recorded on, for example, a computer-readable storage medium, and loaded into an electronic device through a computer-readable storage medium, and run therein to implement the corresponding method of the embodiment of the present application.

[0275] In other words, the units mentioned above can be implemented in hardware form, can be implemented in software form, or can be implemented in the form of a combination of software and hardware. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form of the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software combination in the decoding processor can be executed. Optionally, the software can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an electrically erasable programmable memory, a register, etc. The storage medium is located in a memory, and the processor reads the information in the memory, and completes the steps in the above method embodiment in combination with its hardware.

[0276] Fig.11 It is a schematic structural diagram of an electronic device 700 provided in an embodiment of the present application.

[0277] like Fig.11As shown, the electronic device 700 at least includes a processor 710 and a computer-readable storage medium 720. The processor 710 and the computer-readable storage medium 720 may be connected via a bus or other means. The computer-readable storage medium 720 is used to store a computer program 721, which includes computer instructions, and the processor 710 is used to execute the computer instructions stored in the computer-readable storage medium 720. The processor 710 is the computing core and control core of the electronic device 700, which is suitable for implementing one or more computer instructions, and is specifically suitable for loading and executing one or more computer instructions to implement the corresponding method flow or corresponding function.

[0278] As an example, the processor 710 may also be referred to as a central processing unit (CPU). The processor 710 may include, but is not limited to, a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like.

[0279] As an example, the computer-readable storage medium 720 may be a high-speed RAM memory, or a non-volatile memory (Non-Volatile Memory), such as at least one disk memory; optionally, it may also be at least one computer-readable storage medium located away from the aforementioned processor 710. Specifically, the computer-readable storage medium 720 includes, but is not limited to: a volatile memory and / or a non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0280] In one implementation, the electronic device 700 may be Fig. 9 and Fig.10 The strategy network training device 500 and the robot control device 600 shown in the figure; the computer readable storage medium 720 stores computer instructions; the processor 710 loads and executes the computer instructions stored in the computer readable storage medium 720 to implement Figure 2 and Figure 8 The corresponding steps in the method embodiment shown; in the specific implementation, the computer instructions in the computer-readable storage medium 720 are loaded by the processor 710 and execute the corresponding steps. To avoid repetition, they are not repeated here.

[0281] According to another aspect of the present application, an embodiment of the present application further provides a computer-readable storage medium (Memory), which is a memory device in the electronic device 700 for storing programs and data. For example, a computer-readable storage medium 720. It can be understood that the computer-readable storage medium 720 here can include both the built-in storage medium in the electronic device 700 and the extended storage medium supported by the electronic device 700. The computer-readable storage medium provides a storage space, which stores the operating system of the electronic device 700. In addition, one or more computer instructions suitable for being loaded and executed by the processor 710 are also stored in the storage space, and these computer instructions can be one or more computer programs 721 (including program codes).

[0282] The electronic device 700 may further include a transceiver 730 , which may be connected to the processor 710 or the computer-readable storage medium 720 .

[0283] The computer-readable storage medium 720 can control the transceiver 730 to communicate with other devices, specifically, to send information or data to other devices, or to receive information or data sent by other devices. The transceiver 730 may include a transmitter and a receiver. The transceiver 730 may further include an antenna, and the number of antennas may be one or more.

[0284] According to another aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. For example, a computer program 721. At this time, the electronic device 700 may be a computer, the processor 710 reads the computer instructions from the computer-readable storage medium 720, and the processor 710 executes the computer instructions, so that the computer executes the policy network training method or the robot control method provided in the above-mentioned various optional modes.

[0285] In other words, when implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process of the embodiment of the present application is run in whole or in part or the function of the embodiment of the present application is implemented. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center.

[0286] Those of ordinary skill in the art will appreciate that the units and process steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0287] Finally, it should be noted that the above embodiments are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application.

Claims

1. A strategy network training method, characterized in that: include: For the i-th moment among the k moments, based on the corrected dynamic parameters of the robot at the i-1th moment, and / or, correcting the first state vector of the robot at the i-th moment determined based on the uncorrected dynamic parameters of the robot at the i-1th moment, to determine the second state vector of the robot at the i-th moment, k>0, k≥i≥1; Obtaining a third state vector that the robot is expected to imitate at the i+1th moment; Obtaining a marked bias vector for correcting a third state vector that the robot is expected to imitate at the i+1th moment; The policy network is trained using a reinforcement learning method based on the k second state vectors corresponding to the k moments, the k third state vectors corresponding to the k moments, and the k labeled bias vectors corresponding to the k moments.

2. The method according to claim 1, characterized in that The dynamic parameters include chassis mass; Wherein, the determining of the second state vector of the robot at the i-th moment based on the corrected dynamic parameters of the robot at the i-1th moment and / or correcting the first state vector of the robot at the i-th moment determined based on the uncorrected dynamic parameters of the robot at the i-1th moment includes: Obtain a first random number within a first preset range; Using the first random number to correct the chassis mass to obtain a corrected chassis mass; Using the corrected chassis mass, obtaining an inertia matrix and a gravity vector corresponding to the corrected chassis mass; Based on the inertia matrix and the gravity vector, and using the positive dynamics equation of the robot, a second state vector of the robot at the i-th moment is obtained.

3. The method according to claim 2, characterized in that The method of using the first random number to correct the chassis mass of the robot to obtain the corrected chassis mass includes: The product of the first random number and the chassis mass is determined as the corrected chassis mass.

4. The method according to claim 1, characterized in that: The dynamic parameters include the coefficient of joint friction; Wherein, the determining of the second state vector of the robot at the i-th moment based on the corrected dynamic parameters of the robot at the i-1th moment and / or correcting the first state vector of the robot at the i-th moment determined based on the uncorrected dynamic parameters of the robot at the i-1th moment includes: Obtain a second random number within a second preset range; Using the second random number to correct the joint friction coefficient of the robot at the i-1th moment to obtain a corrected joint friction coefficient; Based on the corrected joint friction coefficient, determining the joint friction torque of the robot at the i-1th moment; Based on the joint friction torque, determining the joint torque of the robot at the i-1th moment; Based on the joint torque of the robot at the i-1th moment and using the positive dynamics equation of the robot, the second state vector of the robot at the i-th moment is obtained.

5. The method according to claim 4, characterized in that The method of using the second random number to correct the joint friction coefficient of the robot at the i-1th moment to obtain the corrected joint friction coefficient includes: The second random number is determined as the corrected joint friction coefficient.

6. The method according to claim 1, characterized in that The dynamic parameters include ground friction coefficient; Wherein, the determining of the second state vector of the robot at the i-th moment based on the corrected dynamic parameters of the robot at the i-1th moment and / or correcting the first state vector of the robot at the i-th moment determined based on the uncorrected dynamic parameters of the robot at the i-1th moment includes: Obtain a third random number within a third preset range; Determine the third random number as the corrected ground friction coefficient; Determining the ground friction torque based on the corrected ground friction coefficient; Based on the ground friction torque and using the positive dynamics equation of the robot, a second state vector of the robot at the i-th moment is obtained.

7. The method according to claim 1, characterized in that The method of determining the second state vector of the robot at the i-th moment based on the corrected dynamic parameters of the robot at the i-th moment and / or correcting the first state vector of the robot at the i-th moment determined based on the uncorrected dynamic parameters of the robot at the i-th moment comprises: Acquire a first random vector within a fourth preset range; The motor angle component in the first state vector of the robot at the i-th moment is corrected by using the first random vector to obtain the second state vector of the robot at the i-th moment, and the dimension of the first random vector is the same as the dimension of the motor angle component.

8. The method according to claim 7, characterized in that The method of using the first random vector to correct the motor angle component in the first state vector of the robot at the i-th moment to obtain the second state vector of the robot at the i-th moment includes: The sum of the first random vector and the motor angle component in the first state vector of the robot at the i-th moment is determined as the motor angle component in the second state vector of the robot at the i-th moment, and the first random vector obeys a Gaussian distribution with the standard deviation of the error of the motor angle sensor of the robot at the first moment as the standard deviation and the motor angle component in the first augmented state vector of the robot at the first moment as the mean.

9. The method according to claim 1, characterized in that: The method of determining the second state vector of the robot at the i-th moment based on the corrected dynamic parameters of the robot at the i-th moment and / or correcting the first state vector of the robot at the i-th moment determined based on the uncorrected dynamic parameters of the robot at the i-th moment comprises: Acquire a second random vector within a fifth preset range; The posture component in the first state vector of the robot at the i-th moment is corrected by using the second random vector to obtain the second state vector of the robot at the i-th moment, and the dimension of the second random vector is the same as the dimension of the posture component.

10. The method according to claim 9, characterized in that The method of using the second random vector to correct the posture component in the first state vector of the robot at the i-th moment to obtain the second state vector of the robot at the i-th moment includes: The sum of the second random vector and the posture component in the first state vector is determined as the posture component in the second state vector, and the second random vector obeys a Gaussian distribution with the standard deviation of the error of the posture sensor of the robot at the second moment as the standard deviation and the posture component in the first augmented state vector of the robot at the second moment as the mean.

11. The method according to any one of claims 7 to 10, characterized in that Before determining the second state vector of the robot at the i-th moment based on the corrected dynamic parameters of the robot at the i-1th moment, and / or correcting the first state vector of the robot at the i-th moment determined based on the uncorrected dynamic parameters of the robot at the i-1th moment, the method further comprises: Obtaining the first augmented state vector of the robot at the i-1th moment; Determine the joint torque of the robot at the i-1th moment; Based on the first augmented state vector of the robot at the i-1th moment and the joint torque of the robot at the i-1th moment, using the positive dynamics equation of the robot, obtaining the first augmented state vector of the robot at the i-1th moment; Based on the first augmented state vector of the robot at the i-th moment, a first state vector of the robot at the i-th moment is determined.

12. A robot control method, characterized in that: include: Obtaining the second state vector of the robot at time t, t>0; Obtaining a third state vector that the robot is expected to imitate at time t+1; Taking the second state vector of the robot at the tth time and the third state vector that the robot is expected to imitate at the t+1th time as input, using a policy network trained based on a reinforcement learning method, a bias vector for correcting the third state vector that the robot is expected to imitate at the t+1th time is obtained; Wherein, the policy network is trained based on the method according to any one of claims 1 to 11; Based on the bias vector, the joint torque of the robot at the t-th moment is determined, and the joint torque of the robot at the t-th moment is used to control the motor of the robot to achieve the gait of the robot at the t-th moment.

13. A strategy network training device, characterized in that: include: a determining unit, for determining a second state vector of the robot at the i-th moment among the k moments, based on the corrected dynamic parameters of the robot at the i-th moment and / or correcting the first state vector of the robot at the i-th moment determined based on the uncorrected dynamic parameters of the robot at the i-th moment, k>0, k≥i≥1; A first acquisition unit, used for acquiring a third state vector that the robot is expected to imitate at the i+1th moment; A second acquisition unit, used for acquiring a marked bias vector for correcting a third state vector that the robot is expected to imitate at the i+1th moment; A training unit is used to train the policy network using a reinforcement learning method based on the k second state vectors corresponding to the k moments, the k third state vectors corresponding to the k moments, and the k labeled bias vectors corresponding to the k moments.

14. A robot control device, characterized in that: include: A first acquisition unit, used for acquiring a second state vector of the robot at time t; A second acquisition unit, used for acquiring a third state vector that the robot is expected to imitate at time t+1; an output unit, configured to take the second state vector of the robot at the t-th time and the third state vector that the robot is expected to imitate at the t+1-th time as input, and use a policy network trained based on a reinforcement learning method to obtain a bias vector for correcting the third state vector that the robot is expected to imitate at the t+1-th time; Wherein, the policy network is trained based on the method according to any one of claims 1 to 11; A determination unit is used to determine the joint torque of the robot at the t-th moment based on the bias vector, wherein the joint torque of the robot at the t-th moment is used to control the motor of the robot to realize the gait of the robot at the t-th moment.

15. An electronic device, characterized in that: include: a processor adapted to execute a computer program; A computer-readable storage medium having a computer program stored therein, wherein when the computer program is executed by the processor, the method according to any one of claims 1 to 11 or the method according to claim 12 is implemented.

16. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program causes a computer to execute the method according to any one of claims 1 to 11 or the method according to claim 12.

17. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 11 or the method according to claim 12 is implemented.

Citation Information

Patent Citations

  • Proximal strategy optimization-based high-speed gait generation method for underwater snakelike robot

    CN112140098A

  • Gait training method and device of quadruped robot based on deep reinforcement learning, electronic equipment and medium

    CN112596534A

  • Control method and device of multi-legged robot, electronic equipment and storage medium

    CN113515135A

  • Controlling robots using entropy constraints

    WO2020113228A1

  • Generating a robot control policy from demonstrations

    WO2020160431A1