Robot control method and device, electronic equipment and storage medium

By acquiring the motion trajectory and obstacle information of the bipedal robot, and combining kinematics and environmental constraints, the input state parameters are determined using a dynamic model, thus solving the problem of poor navigation stability of the bipedal robot and achieving more efficient and stable navigation control.

CN119871432BActive Publication Date: 2026-01-02UBTECH ROBOTICS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510232844.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2026-01-02
Estimated Expiration
2045-02-26

AI Technical Summary

Technical Problem

Existing autonomous navigation methods based on geometry result in poor navigation stability in bipedal robots, failing to effectively consider their motion models and constraints.

Method used

By acquiring the robot's preset motion trajectory, obstacle information, and output state parameters, and combining kinematic and environmental constraints, the robot's input state parameters for the next moment are determined using a pre-built dynamic model, and then controlled.

Benefits of technology

It improves the robot's navigation stability and control precision, ensuring that the robot accurately avoids obstacles during movement, reduces unnecessary detours, and improves navigation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119871432B_ABST
    Figure CN119871432B_ABST
Patent Text Reader

Abstract

The application provides a robot control method and device, electronic equipment and a storage medium. The method comprises the following steps: obtaining a preset motion trajectory of a robot, obstacle information in a current environment and output state parameters of the robot at a first time; determining kinematic constraint information and environment constraint information of the robot in the current environment based on the preset motion trajectory and the obstacle information; calling a pre-constructed dynamics model, and determining input state parameters of the robot at a second time based on the output state parameters at the first time, the kinematic constraint information and the environment constraint information; the second time is adjacent to the first time and later than the first time; and controlling the robot at the second time based on the input state parameters at the second time. The application can improve the stability of robot navigation by controlling the robot according to the input state parameters determined based on the kinematic constraint information and the environment constraint information of the robot in the current environment.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of robots, and particularly relates to a robot control method and device, electronic equipment and a storage medium. BACKGROUND

[0002] The popularity of mobile robots has been steadily increasing, and more and more mobile robots are used to perform tasks that were previously completed by humans. With the rapid development of biped robots, users hope that biped robots can achieve the same autonomous navigation effect as mobile robots.

[0003] In the related art, an autonomous navigation method applied to a mobile robot from a purely geometric perspective is applied to a biped robot, but the autonomous navigation method from the geometric perspective does not consider the motion model of the biped robot and the condition constraints, so that the navigation stability of the biped robot is poor. SUMMARY

[0004] The embodiments of the present application provide a robot control method and device, electronic equipment and a storage medium, which control the robot by input state parameters determined according to the kinematic constraint information and environmental constraint information of the robot in the current environment, so as to improve the stability of robot navigation.

[0005] The technical solutions of the embodiments of the present application are implemented as follows:

[0006] The embodiments of the present application provide a robot control method, which comprises: acquiring a preset motion trajectory of a robot, obstacle information in a current environment and an output state parameter of the robot at a first time; determining kinematic constraint information and environmental constraint information of the robot in the current environment based on the preset motion trajectory and the obstacle information; calling a pre-constructed dynamic model to determine an input state parameter of the robot at a second time based on the output state parameter at the first time, the kinematic constraint information and the environmental constraint information; the second time is adjacent to the first time and later than the first time; and controlling the robot at the second time based on the input state parameter at the second time.

[0007] The embodiment of the present application provides a robot control device, comprising: an acquisition module, configured to acquire a preset motion trajectory of a robot, obstacle information in a current environment and an output state parameter of the robot at a first time; a first determination module, configured to determine kinematic constraint information and environment constraint information of the robot in the current environment based on the preset motion trajectory and the obstacle information; a second determination module, configured to call a pre-constructed dynamic model, and determine an input state parameter of the robot at a second time based on the output state parameter at the first time, the kinematic constraint information and the environment constraint information; the second time is adjacent to the first time and later than the first time; and a control module, configured to control the robot at the second time based on the input state parameter at the second time.

[0008] In the above scheme, the first determination module is further configured to: acquire position information of the robot at the first time; determine position information of the robot at the second time based on the preset motion trajectory; call a first preset equation to solve the position information at the first time and the position information at the second time, and obtain the kinematic constraint information of the robot in the current environment; and determine the environment constraint information of the robot in the current environment based on the obstacle information.

[0009] In the above scheme, the first determination module is further configured to: determine a feasible region of the robot in the current environment based on the obstacle information; and determine the feasible region and an input preset speed interval as the environment constraint information of the robot in the current environment.

[0010] In the above scheme, the obstacle in the obstacle information comprises a static obstacle and a dynamic obstacle; the first determination module is further configured to: in response to the obstacle being the static obstacle, acquire a first preset safety margin and a second preset equation; call the second preset equation to solve the obstacle information and the first safety margin, and obtain the feasible region of the robot in the current environment; in response to the obstacle being the dynamic obstacle, construct a motion model of the dynamic obstacle based on the obstacle information; determine position information of the dynamic obstacle at a future time through the motion model; the future time is later than the first time; dynamically adjust a second preset safety margin based on the position information of the dynamic obstacle at the future time, and obtain an adjusted second safety margin; and determine a region formed by positions with a distance greater than the adjusted second safety margin from the dynamic obstacle as the feasible region of the robot in the current environment.

[0011] In the scheme, the second determining module is further configured to: discretize the dynamic model to obtain a discretized dynamic model; construct an optimization objective function based on the discretized dynamic model and the output state parameter at the first time; and solve the optimization objective function based on the kinematic constraint information and the environmental constraint information to obtain the input state parameter of the robot at the second time.

[0012] In the scheme, the second determining module is further configured to: obtain an initial input state parameter sequence, a convergence threshold and a preset iteration number; determine a gradient value of each initial input state parameter in the initial input state parameter sequence and an optimization objective function value of each initial input state parameter in the initial input state parameter sequence through the optimization objective function; determine an updated state parameter of each initial input state parameter based on the gradient value of the initial input state parameter, the optimization objective function value, the convergence threshold and the preset iteration number; determine an initial input state parameter corresponding to a minimum optimization objective function value as a target initial input state parameter; and determine an updated state parameter of the target initial input state parameter as the input state parameter of the robot at the second time.

[0013] In the scheme, the second determining module is further configured to: in response to the optimization objective function value of the initial input state parameter being greater than the convergence threshold, perform a first iteration update on the initial input state parameter based on the gradient value of the initial input state parameter to obtain a first input state parameter; the optimization objective function value of the first input state parameter is less than the convergence threshold; and in response to the first input state parameter not satisfying a kinematic constraint condition corresponding to the kinematic constraint information and an environmental constraint condition corresponding to the environmental constraint information, perform a second iteration update on the first input state parameter based on the gradient value according to the preset iteration number to obtain the updated state parameter.

[0014] In the scheme, the control module is further configured to: perform parameter conversion on the input state parameter at the second time through a preset controller to obtain a joint torque of the robot; convert the joint torque into a motor driving signal; and control movement of the robot at the second time based on the motor driving signal.

[0015] In the scheme, the acquisition module is further configured to: acquire speed information and an azimuth angle of the robot at a first time; determine a center of gravity position of the robot based on a mass distribution of the robot; and determine the speed information, the azimuth angle and the center of gravity position as the output state parameter of the robot at the first time.

[0016] The embodiment of the present application provides a kind of electronic equipment, comprising: memory, for storing computer executable instruction;Processor, for executing the computer executable instruction stored in the memory, realize the robot control method provided by the embodiment of the present application.

[0017] The embodiment of the present application provides a kind of computer readable storage medium, computer program or executable instruction is stored, the computer program or computer executable instruction is executed by processor, realize the robot control method provided by the embodiment of the present application.

[0018] The embodiment of the present application provides a kind of computer program product, the computer program product includes computer executable instruction, computer executable instruction is stored in computer readable storage medium;Wherein, the processor of electronic equipment reads computer executable instruction from computer readable storage medium, and executes computer executable instruction, realize the robot control method provided by the embodiment of the present application.

[0019] The embodiment of the present application has the following beneficial effects:

[0020] The robot control method provided by the embodiment of the present application determines the kinematic constraint information and environmental constraint information of robot in current environment by preset motion trajectory and obstacle information, can make robot accurately avoid obstacle in motion process, improve self safety, and, by determining constraint information, can make robot move in reasonable range, reduce unnecessary detour, to improve the navigation efficiency of robot;In addition, by pre-constructed dynamics model, can accurately determine the input state parameter of robot at second time according to output state parameter and constraint information at first time, controls robot according to input state parameter at second time, can improve the control precision of robot, and improve the navigation stability of robot. BRIEF DESCRIPTION OF DRAWINGS

[0021] Figure 1 It is an optional flowchart of the robot control method provided by the embodiment of the present application;

[0022] Figure 2 It is the flowchart of determining the feasible region of robot in current environment provided by the embodiment of the present application;

[0023] Figure 3 It is the flowchart of determining the input state parameter of robot at second time provided by the embodiment of the present application;

[0024] Figure 4 It is the framework diagram of model predictive control provided by the embodiment of the present application;

[0025] Figure 5is a structural block diagram of a robot control device provided by an embodiment of the present application.

[0026] Figure 6 is a structural schematic diagram of a robot provided by an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings, and the described embodiments should not be regarded as limiting the present application. All other embodiments obtained by those of ordinary skill in the art without making creative labor fall within the scope of protection of the present application.

[0028] In the following description, "some embodiments" are described, which describe a subset of all possible embodiments, but it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.

[0029] If the similar description of "first / second" appears in the application file, the following description is added. In the following description, the terms "first\second\third" referred to only distinguish similar objects, and do not represent a specific order of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0030] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined target, and can be implemented entirely or partially by using software, hardware (such as a processing circuit or a memory) or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an integral module or unit that includes the functions of the module or unit.

[0031] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meanings as those commonly understood by those skilled in the art. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application, and are not intended to limit the present application.

[0032] The robot control method provided in the embodiments of the present application can be applied to electronic devices such as robots, notebook computers, tablet computers, desktop computers, smart home appliances and smart vehicle devices, and the embodiments of the present application do not limit the specific types of electronic devices.

[0033] The robot control method provided in the embodiments of the present application can be applied to electronic devices such as robots, notebook computers, tablet computers, desktop computers, smart home appliances and smart vehicle devices, and the embodiments of the present application do not limit the specific types of electronic devices.

[0034] The robot control method provided in the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0035] Figure 1 is an optional flowchart of the robot control method provided in the embodiments of the present application, and the method can be applied to an electronic device. In the following, an electronic device will be taken as an example to illustrate the robot control method. As shown in Figure 1 The method includes the following steps S101 to S104.

[0036] In step S101, a preset motion trajectory of a robot, obstacle information in a current environment and an output state parameter of the robot at a first time are acquired.

[0037] Here, the robot can be a biped robot, a wheeled robot or a multi-legged robot. The biped robot can be applied to the service industry as a customer service personnel or a guide robot, and can also be applied to the medical field for patient rehabilitation training or assisting the elderly with difficulty in movement to complete daily activities. The wheeled robot can be applied to extreme working environments such as working in a small space or cleaning the outer wall of a high-rise building due to its simple structure. The multi-legged robot can be applied to geological surveying due to its better stability and multi-terrain adaptability, and can be used for geological investigation and sample collection in mountainous areas and jungles, and can also be applied to agricultural work such as planting, fertilizing or picking tasks in complex terrain.

[0038] The preset motion trajectory refers to a desired path or motion trajectory prepared for the robot in advance. In general, the preset motion trajectory includes information such as the position, speed or acceleration of the robot at different time steps. The preset motion trajectory is usually generated by a path planning algorithm or a trajectory generation algorithm. Common generation algorithms include rapid extended random tree, A-star algorithm and spline interpolation, and the specific generation algorithm is not limited herein.

[0039] The current environment refers to the physical environment in which the robot is located and the external factors related to the physical environment when the robot is executing a task. For example, when the robot is walking on the street, the current environment can include pedestrians, vehicles, traffic signals and weather conditions on the road.

[0040] The obstacle refers to an object or obstacle existing in the current environment. The obstacle includes static obstacles and dynamic obstacles, and the obstacle can hinder the robot from moving along the predetermined path. The obstacle information includes the position, shape and size of the obstacle. When the obstacle is a dynamic obstacle, the obstacle information can further include dynamic characteristics (such as speed and acceleration) of the obstacle. The obstacle information is used to provide specific information about the environment around the robot, helping the robot to avoid collision and ensuring the safety of the robot. The obstacle information is usually obtained by sensors (laser radar, ultrasonic sensor, inertial measurement unit, etc.) installed on the robot.

[0041] The first time refers to the current time. The output state parameter at the first time refers to the state variable of the robot at the current time. The output state parameter usually includes the speed, center of gravity position and body orientation angle of the robot at the current time. The output state parameter describes the current physical state of the robot and is used to calculate the control input for the robot at the next time.

[0042] In some embodiments, the output state parameter of the robot at the first time in step S101 can be achieved by the following method: first, collecting the speed information and the orientation angle of the robot at the first time; then, determining the center of gravity position of the robot based on the mass distribution of the robot; finally, determining the speed information, the orientation angle and the center of gravity position as the output state parameter of the robot at the first time.

[0043] Here, the speed information of the robot refers to the motion speed of the robot at the current time. The speed information can include linear speed and angular speed, and is used to describe the current motion state of the robot. The speed information can be collected by a speed sensor (such as an encoder, an inertial measurement unit, etc.).

[0044] The azimuth angle refers to the direction angle of the robot relative to a certain reference coordinate system (usually a global coordinate system or a local map coordinate system), usually expressed in degrees or radians, for a 2D robot, the azimuth angle is the orientation of the robot body, for a 3D robot, the azimuth angle can be a combination of multiple rotation angles (such as pitch angle, yaw angle, and roll angle, etc.). The azimuth angle is used to describe the orientation information of the robot, which helps the robot to determine the direction of movement. The azimuth angle can be collected by a gyroscope or a vision sensor.

[0045] The mass distribution of the robot refers to the distribution of the mass of each component of the robot in the overall frame of the robot. The mass distribution of the robot affects the center of gravity of the robot. The center of gravity refers to the weighted average position of all mass elements of the robot. If the robot is a rigid object (referring to an object whose shape and size do not change under the action of external force), the center of gravity of the robot can be determined by the mass and geometric position of each component of the robot. If it is a multi-degree-of-freedom robot, the center of gravity can be calculated by formula 1:

[0046]

[0047] wherein, m i represents the mass of the i-th component; r i represents the center of mass position of the i-th component; r cg represents the center of gravity of the robot.

[0048] In some embodiments, after determining the velocity information, the azimuth angle and the center of gravity of the robot at the first time, the velocity information, the azimuth angle and the center of gravity can be determined as the output state parameters of the robot at the first time, wherein the output state parameters at the first time can be represented by formula 2:

[0049]

[0050] wherein, x k represents the output state parameters of the k-th step; (p x , p y ) represents the center of gravity of the robot at the k-th step; (v x , v y ) represents the velocity information of the robot at the k-th step; θ represents the azimuth angle of the robot at the k-th step; T represents the matrix transpose.

[0051] Step S102, based on the preset motion trajectory and the obstacle information, determine the kinematic constraint information and the environmental constraint information of the robot in the current environment.

[0052] Here, the kinematic constraint information refers to the restriction on the robot during movement, and the kinematic constraint information in the embodiments of the present application refers to the distance difference between the landing position of the robot at the next moment and the landing position of the robot at the current moment. The environmental constraint information refers to the safe operating range of the robot in the current environment determined based on the obstacle information, and the speed limit of the robot.

[0053] In some embodiments, step S102 can be implemented by the following method: first, obtaining the position information of the robot at the first moment; then, determining the position information of the robot at the second moment based on the preset motion trajectory; then, calling the first preset equation to solve the position information at the first moment and the position information at the second moment to obtain the kinematic constraint information of the robot in the current environment; finally, determining the environmental constraint information of the robot in the current environment based on the obstacle information.

[0054] The position information at the first moment refers to the position of the robot at the current moment, which is usually described according to the coordinate system, and the position information includes the position coordinates and the azimuth angle of the robot. The position information at the second moment refers to the target position of the robot at the second moment recorded in the preset motion trajectory. The second moment is adjacent to the first moment and later than the first moment, for example, the first moment is 10:00, and the second moment can be 10:01.

[0055] The first preset equation refers to a mathematical equation preset for determining the kinematic constraint information of the robot in the current environment. Solving refers to the process of calculating unknown parameters or results through a preset equation.

[0056] As an example of step S102, it is assumed that the position information of the robot at the first moment is (3, 5, 15°), where 3 is the coordinate of the robot on the x-axis, 5 is the coordinate of the robot on the y-axis, and 15° is the azimuth angle of the robot; then, according to the preset motion trajectory, the position information of the robot at the second moment is determined to be (5, 8, 18°), and the first preset equation is used to solve the position information at the first moment and the position information at the second moment to obtain the kinematic constraint information of the robot in the current environment, where the first preset equation is shown in Equation 3:

[0057]

[0058] where e represents the kinematic constraint information of the robot in the current environment; (x, y, θ) represents the position information of the robot at the first moment; (x t , y t , θ t) represents the position information of the robot at the second time; ω1 and ω2 represent preset weights, which can be set according to the importance of different position information, and ω1 and ω2 are both 0.5.

[0059] According to the example of the above step S102, the position information of the robot at the first time and the position information of the robot at the second time are substituted into the first preset equation, and the kinematic constraint information of the robot in the current environment is obtained as 3.3. The kinematic constraint information of the robot in the current environment indicates that the value obtained by substituting the predicted landing position of the robot at the second time according to the input state parameter at the second time and the landing position of the robot at the first time into the first preset equation is less than the value of the kinematic constraint information. Finally, the environmental constraint information of the robot in the current environment is determined according to the obstacle information.

[0060] It should be noted that, by presetting the motion trajectory to obtain the position information of the robot at the second time, and combining the position information of the robot at the first time, the kinematic constraint of the robot can be accurately determined by the first preset equation. At the same time, the environmental constraint is determined in combination with the obstacle information, so as to ensure that the robot can avoid obstacles in a dynamic environment and improve the safety of the robot. By comprehensively considering the kinematic constraint and the environmental constraint, the robot can make intelligent decisions under various conditions, enhance the autonomy and adaptability of the robot, and improve the overall navigation and control performance.

[0061] In some embodiments, based on the obstacle information, the environmental constraint information of the robot in the current environment can be determined by the following method: first, based on the obstacle information, the feasible region of the robot in the current environment is determined; and then, the feasible region and the input preset speed interval are determined as the environmental constraint information of the robot in the current environment.

[0062] Here, the feasible region refers to a region in the current environment in which the robot can safely walk, i.e., the robot will not collide with obstacles when walking in the feasible region. The preset speed interval refers to the maximum and minimum speed range of the robot, and the preset speed interval defines the speed range that can be adopted by the robot when running, i.e., the speed of the robot cannot exceed the preset speed interval when the robot is controlled.

[0063] It should be noted that, by determining the feasible region of the robot based on the obstacle information and forming the environmental constraint in combination with the preset speed interval, the robot can effectively ensure movement in a safe region, avoid collision and improve operation safety. At the same time, the robot can control the motion performance in combination with the speed interval, so as to ensure that the robot can efficiently and stably perform tasks.

[0064] In some embodiments, the obstacles in the obstacle information include static obstacles and dynamic obstacles, and in this case, referring to Figure 2 , Figure 2 is a flowchart of a process for determining a feasible region of a robot in a current environment according to an embodiment of the present application, Figure 2 determining a feasible region of a robot in a current environment based on obstacle information can be implemented by the following steps S201 to S206:

[0065] In step S201, in response to the obstacle being a static obstacle, a first preset safety margin and a second preset equation are obtained.

[0066] A static obstacle refers to an object whose position does not change in the robot's motion environment, such as a building, furniture, a wall, etc. The first safety margin refers to a minimum distance preset between the robot and the static obstacle. The second preset equation refers to a preset mathematical equation used to determine the feasible region of the robot in the current environment.

[0067] In some embodiments, step S201 can be implemented by the following method: the robot detects the obstacle through a sensor, and after determining that the obstacle is a static obstacle, obtains the first preset safety margin and the second preset equation related to the static obstacle in a database.

[0068] In step S202, the second preset equation is called to solve the obstacle information and the first safety margin to obtain the feasible region of the robot in the current environment.

[0069] Here, the obstacle information and the first safety margin are substituted into the second preset equation to calculate the feasible region of the robot in the current environment.

[0070] In some embodiments, the obstacle includes a circular obstacle and a polygonal obstacle, and when the obstacle is a circular obstacle, step S202 can be implemented by the following method: first, the second preset equation is called, and the second preset equation is as shown in formula 4:

[0071] d1 min ≥r i +r1 safe Formula 4

[0072] wherein d1 min represents the shortest distance between the robot and the obstacle when the obstacle is a circular obstacle; r i represents the radius of the circular obstacle; and r1 safe represents the first safety margin.

[0073] Then, the radius of the circular obstacle is obtained in the obstacle information, and a first safety margin is obtained, for example, the first safety margin is 3 meters, and the radius of the circular obstacle is 1 meter; then, the radius of the circular obstacle and the first safety margin are substituted into a second preset equation to obtain d1 min ≥ 4, that is, the area more than 4 meters away from the obstacle is a safe area of the robot in the current environment.

[0074] In some embodiments, when the obstacle is a polygonal obstacle, only the first safety margin needs to be obtained, and the area where the distance between the robot and the polygonal obstacle is greater than the first safety margin is determined as the feasible area of the robot in the current environment.

[0075] It should be noted that when the obstacle is a circular obstacle, the first safety margin represents the distance between the robot and the center of the circular obstacle; when the obstacle is a polygonal obstacle, the first safety margin represents the distance between the robot and the edge of the polygonal obstacle closest to the robot.

[0076] Step S203, in response to the obstacle being a dynamic obstacle, constructing a motion model of the dynamic obstacle based on the obstacle information.

[0077] Here, the dynamic obstacle refers to an object whose position or shape changes over time in the current environment, such as a moving vehicle, a walking pedestrian, etc. The motion model of the dynamic obstacle is a mathematical description used to represent the motion state of the dynamic obstacle changing over time.

[0078] In some embodiments, step S203 can be implemented by the following method: first, when it is determined that the obstacle is a dynamic obstacle, the position information, speed and acceleration of the dynamic obstacle are obtained through the sensor to determine the motion state of the dynamic obstacle, and when the dynamic obstacle is a uniform straight line motion, the motion model of the dynamic obstacle is constructed according to the position information and speed of the dynamic obstacle, as shown in formula 5:

[0079]

[0080] Where x0, y0 represent the initial position of the dynamic obstacle at the current time; v x , v y represent the speed components of the dynamic obstacle in the x-axis and y-axis; Δt represents the time change; x(t), y(t) represent the position information of the dynamic obstacle at the next time.

[0081] In some embodiments, when the dynamic obstacle does uniform acceleration motion, the motion model of the dynamic obstacle is constructed according to the position information, speed and acceleration of the dynamic obstacle, as shown in formula 6:

[0082]

[0083] wherein a x , a y represents the acceleration of the dynamic obstacle in the x-axis and y-axis directions, and other parameters have the same meaning as formula 5, which will not be repeated here.

[0084] Step S204, determining the position information of the dynamic obstacle at a future time through the motion model; the future time is later than the first time.

[0085] Here, the future time refers to a certain time point after the current time, for example, two seconds after the current time.

[0086] In some embodiments, step S204 can be implemented by the following method: first, after the motion model of the dynamic obstacle is constructed, the time point of the next motion of the robot is determined, and the time difference is determined according to the time point of the next motion of the robot and the current time; then, the determined time difference is substituted into the motion model to obtain the position of the dynamic obstacle at the future time.

[0087] Step S205, dynamically adjusting the preset second safety margin based on the position information of the dynamic obstacle at the future time to obtain the adjusted second safety margin.

[0088] Here, the preset second safety margin refers to the minimum distance between the robot and the dynamic obstacle.

[0089] In some embodiments, step S205 can be implemented by the following method: according to the position information of the dynamic obstacle at the future time and the position information of the robot at the current time, the relative position between the robot and the dynamic obstacle is determined; then, the motion trend of the dynamic obstacle is determined according to the attribute information of the dynamic obstacle, the motion trend including the motion direction and the motion speed of the dynamic obstacle; finally, the preset second safety margin is dynamically adjusted according to the motion trend of the dynamic obstacle and the relative position between the robot and the dynamic obstacle at the current time, wherein if the speed of the dynamic obstacle is fast, the relative position between the dynamic obstacle and the robot is close, and the dynamic obstacle is moving towards the robot, the second safety margin needs to be increased to ensure that the robot has enough space to avoid the obstacle, if the relative position between the dynamic obstacle and the robot is far, or the dynamic obstacle is moving in the same direction as the robot, the second safety margin can be reduced to avoid the robot moving too much.

[0090] Step S206, determining the area formed by the positions with a distance between the robot and the dynamic obstacle greater than the adjusted second safety margin as the feasible area of the robot in the current environment.

[0091] In some embodiments, after adjusting the second safety margin, a region formed by positions with a distance greater than the adjusted second safety margin is determined as the feasible region of the robot in the current environment according to the distance between the robot and the dynamic obstacle. It should be noted that after the kinematic safety constraints and the environmental constraint information of the robot in the current environment are determined, a discrete-time control barrier function can be further used to ensure that the robot always satisfies the constraint conditions in the current environment.

[0092] It should be noted that through steps S201 to S206, the embodiments of the present application determine the feasible region for static obstacles and dynamic obstacles respectively, ensuring that the robot can safely move in different environmental conditions. In the case of static obstacles, the first safety margin and the second preset equation are combined to calculate the feasible region; while in the case of dynamic obstacles, the future position is predicted by constructing a motion model, and the safety margin is dynamically adjusted, so as to ensure that the robot avoids collision. By adjusting the feasible region in real time, the robot can flexibly respond to environmental changes, improve the flexibility, safety and efficiency of movement. In addition, the dynamic adjustment mechanism enhances the real-time performance and adaptability of the robot, optimizes the path planning and decision-making ability of the robot, so that the robot can efficiently and safely perform tasks in complex environments.

[0093] After step S102, the method further comprises the following steps:

[0094] Step S103, calling a pre-constructed dynamic model, determining the input state parameter of the robot at the second time based on the output state parameter at the first time, the kinematic constraint information and the environmental constraint information; the second time is adjacent to the first time and the second time is later than the first time.

[0095] Here, the dynamic model is used to describe the physical behavior of the robot system, including the mutual relationship of velocity, displacement, force, etc. The dynamic model is usually based on Newton-Euler equation, Lagrange equation or directly established according to actual physical parameters. The dynamic model can predict the state change (such as position, velocity and acceleration, etc.) of the robot under given input.

[0096] It should be noted that the pre-constructed dynamic model in the embodiments of the present application is a three-dimensional inverted pendulum model, wherein the pre-constructed dynamic model is as shown in formula 7:

[0097]

[0098] wherein, x(t+1) represents the next state; x(t) represents the current state; u(t) represents the control input; A represents the state transition matrix; B represents the control input matrix.

[0099] The input state parameter refers to an input variable of motion control of the robot, including a landing position and a landing angle of the robot, and the input state parameter is transmitted to the robot through a control system to control motion of the robot.

[0100] In some embodiments, in step S103, a pre-constructed dynamic model is called to determine the input state parameter of the robot at the second time based on the output state parameter at the first time, the kinematics constraint information and the environment constraint information, which can be achieved by the following method: first, discretize the dynamic model to obtain a discretized dynamic model; then, based on the discretized dynamic model and the output state parameter at the first time, an optimization objective function is constructed; finally, based on the kinematics constraint information and the environment constraint information, the optimization objective function is solved to obtain the input state parameter of the robot at the second time.

[0101] Discretization refers to discretizing a continuous dynamic model in time, so that the dynamic model is suitable for digital calculation. Specifically, the continuous dynamic model is converted into discrete variables by sampling time points, so that the discrete variables can be numerically calculated. Common discretization methods include Euler method, Runge-Kutta method, etc., and the specific discretization method is not limited herein.

[0102] The optimization objective function is a mathematical expression, usually involving performance indicators of the robot (such as time minimization, energy consumption minimization, distance minimization, etc.), and providing a judgment standard for optimization solution. The optimization objective function is usually a function related to the behavior of the robot (such as position, speed) and the control input (such as torque, force, etc.). The design of the optimization objective function is usually based on the goal to be achieved by the robot, such as minimizing energy consumption, shortest path, avoiding collision, etc. Through optimization solution of the objective function, the best control input can be obtained.

[0103] In some embodiments, step S103 can be achieved by the following method: first, the dynamic model is discretized by a common discretization method to obtain a discretized dynamic model, wherein the discretized dynamic model is shown in formula 8:

[0104]

[0105] wherein x k+1 represents the output of the k+1th step of the robot after discretization; x k represents the output of the kth step of the robot after discretization; u k represents the control input after discretization; A d represents an element of the state transition matrix after discretization; B d represents an element of the control input matrix after discretization.

[0106] Here, wherein, (f x ,f y ) represents the landing position of the robot at the next moment; ω represents the landing angle. wherein, h represents the distance from the robot centroid to the robot support point; T represents the swing period of the three-dimensional inverted pendulum; represents the swing frequency of the three-dimensional inverted pendulum.

[0107] Then, the target to be optimized is determined, assuming that the position error and the control input of the robot need to be minimized, an optimization objective function can be constructed according to the discretized dynamic model and the output state parameter at the first moment, and the optimization objective function is shown in formula 9:

[0108]

[0109] wherein, J represents the optimization objective function value; x k represents the state of the robot at the kth moment; x target is the state predicted by the discretized dynamic model according to the control input of the robot at the kth moment; u k represents the control input of the robot at the kth moment; N is a preset optimization step number; λ is a pre-set weight factor.

[0110] Finally, the optimization objective function is solved according to the kinematic constraint information and the environmental constraint information, and the input state parameter of the robot at the second moment is obtained.

[0111] It should be noted that in step S103, the present application embodiment converts the continuous system equation into a form suitable for digital calculation by discretizing the dynamic model, thereby improving the control accuracy of the robot. Based on the discretized model and the output state parameter at the first moment, the optimization objective function is constructed, which can realize intelligent optimization of the input state, and ensure efficient control of the robot in motion. Combined with the kinematic and environmental constraints, the optimization process of the input state not only ensures that the robot follows the physical law, but also avoids obstacles and utilizes the feasible region, thereby improving the safety and efficiency of the robot.

[0112] In some embodiments, referring to Figure 3 , Figure 3 is a flowchart of determining the input state parameter of the robot at the second moment provided by the present application embodiment, Figure 3 which shows that the input state parameter of the robot at the second moment is obtained by solving the optimization objective function based on the kinematic constraint information and the environmental constraint information, which can be determined by the following steps S301 to S305:

[0113] Step S301, obtaining an initial input state parameter sequence, a convergence threshold, and a preset iteration number.

[0114] Here, the initial input state parameter sequence refers to the first control input sequence relied on by the optimization algorithm at the beginning. The initial input state parameter sequence can be obtained in the following ways:

[0115] 1) Derivation from the control result of the previous moment: assuming that the control input sequence of the previous moment of the system has been given, the current initial input state parameter sequence can be derived according to the given control input sequence.

[0116] 2) Obtain the default value in the database: if there is no previous historical data or accurate model output, the initial input state parameter sequence can be the default value stored in the database.

[0117] The convergence threshold refers to the criterion for judging whether the optimization objective function has reached the optimal solution in the optimization process. When the output of the optimization objective function is less than the convergence threshold, it is considered that the optimal solution has been reached, and the iteration can be stopped.

[0118] The preset iteration number refers to the maximum number of iterations allowed for the optimization objective function without reaching the convergence threshold. The iteration number limit limits the calculation time of the optimization objective function to avoid long calculation period, and is used to ensure the calculation efficiency.

[0119] Step S302, determining the gradient value of each initial input state parameter in the initial input state parameter sequence through the optimization objective function, and determining the optimization objective function value of each initial input state parameter in the initial input state parameter sequence.

[0120] Here, the gradient value represents the rate of change of the optimization objective function with respect to the initial input state parameter. The optimization objective function value refers to the function value obtained by substituting each initial input state parameter in the initial input state parameter sequence into the optimization objective function.

[0121] In some embodiments, step S302 can be implemented by the following method: first, performing differential calculation on the optimization objective function and the initial input state parameter in the initial input state parameter sequence to obtain the gradient value of each initial input state parameter, and the gradient value calculation formula is shown in formula 10:

[0122]

[0123] wherein, represents the gradient value of the initial input state parameter; represents the partial derivative of the optimization objective function; represents the partial derivative of the initial input state parameter.

[0124] Then, the initial input state parameter is substituted into the kinematics model to obtain an output state parameter under the current input, and each initial input state parameter in the initial input state parameter sequence is substituted into the optimization objective function to obtain a function value.

[0125] In step S303, for each initial input state parameter, an updated state parameter of the initial input state parameter is determined based on the gradient value of the initial input state parameter, the optimization objective function value, the convergence threshold, and the preset number of iterations.

[0126] Here, the updated state parameter of the initial input state parameter refers to an input state parameter optimized by the gradient value. The updated state parameter can be determined by formula 11 as follows:

[0127]

[0128] wherein U k+1 represents the updated state parameter of the initial input state parameter; U k represents the initial input state parameter; represents the gradient value determined based on U k and a preset learning rate a used to control the update step.

[0129] In some embodiments, step S303 can be implemented by the following method: first, in response to the optimization objective function value of the initial input state parameter being greater than the convergence threshold, the initial input state parameter is updated by a first iteration based on the gradient value of the initial input state parameter to obtain a first input state parameter; the optimization objective function value of the first input state parameter is less than the convergence threshold; then, in response to the first input state parameter not satisfying the kinematic constraint condition corresponding to the kinematic constraint information and the environmental constraint condition corresponding to the environmental constraint information, the first input state parameter is updated by a second iteration based on the gradient value according to the preset number of iterations to obtain the updated state parameter.

[0130] The first iteration update refers to an iterative update based on the gradient value if the optimization objective function value of the initial input state parameter is greater than the convergence threshold. The first input state parameter refers to an input state parameter obtained by updating the initial input state parameter by the first iteration, and the optimization objective function value corresponding to the input state parameter at this time is less than the convergence threshold.

[0131] The kinematic constraint condition corresponding to the kinematic constraint information refers to a physical constraint condition corresponding to the kinematic constraint information that must be satisfied by the robot during the movement process. The environmental constraint condition corresponding to the environmental constraint information refers to a constraint condition related to external environmental factors that must be followed by the robot during the movement process.

[0132] The second iterative update refers to an iterative update based on the gradient value in the case where the first input state parameter does not satisfy the constraint condition. The updated state parameter refers to a parameter satisfying the constraint condition obtained after multiple iterations of the initial input state parameter.

[0133] Here, in the process of the first iterative update and the second iterative update, the gradient value of the input state parameter and the optimization objective function value need to be calculated every time.

[0134] As an example of step S303, assuming that the convergence threshold is 5, the initial input state parameter U0 is input into the optimization objective function, and the obtained optimization objective function value is 7, which is greater than the convergence threshold. Then, U0 is optimized according to the gradient value 1 corresponding to U0 to obtain U1, and the optimization objective function value corresponding to U1 is continuously judged. If it is still greater than 5, the gradient value is continuously calculated and gradient optimization is continuously performed until the optimization objective function value is less than 5, and the first input state parameter is obtained. Then, it is judged whether the first input state parameter satisfies the kinematic constraint condition corresponding to the kinematic constraint information and the environmental constraint condition corresponding to the environmental constraint information. If it has been satisfied, the first input state parameter is determined as the updated state parameter. If it is not satisfied, the gradient optimization is continuously performed according to the number of iterations and the gradient value. After each optimization, it is necessary to judge whether the constraint condition has been satisfied. Until the constraint condition is satisfied, or the preset number of iterations is reached, the iteration optimization is ended, and the final result is determined as the updated state parameter.

[0135] It should be noted that step S303 reduces the optimization objective function value based on the gradient update, ensures that the optimization objective function value gradually approaches the optimal solution, and guarantees the efficiency of the optimization process by setting the convergence threshold. After the convergence threshold is satisfied, if the input state parameter still does not meet the kinematic constraint and the environmental constraint, the iterative update is continuously performed to ensure that the robot can always perform the task safely and efficiently under the premise of satisfying the constraint.

[0136] Step S304 determines the initial input state parameter corresponding to the minimum optimization objective function value as the target initial input state parameter.

[0137] The target initial input state parameter refers to the final and optimal initial input state parameter.

[0138] In some embodiments, in the case where the optimization objective function value corresponding to the initial input state parameter is less than the convergence threshold and the constraint condition is satisfied, the initial input state parameter with the minimum final calculated target optimization function value is determined as the target initial input state parameter.

[0139] Step S305 determines the updated state parameter of the target initial input state parameter as the input state parameter of the robot at the second time.

[0140] In some embodiments, after determining the target initial input state parameter, the updated state parameter obtained after iterative optimization according to the target initial state parameter is determined as the input state parameter of the robot at the second time.

[0141] It should be noted that through steps S301 to S305, the embodiments of the present application obtain the initial input state parameter sequence, the convergence threshold and the preset iteration number, calculate the gradient value and the target function value based on the optimization target function, gradually optimize the input state parameter, and ensure the improvement of the robot control precision. By setting the convergence threshold and the iteration number, the optimization process ensures stability while avoiding resource waste and ensuring accurate convergence. Each iteration is adjusted according to the gradient and the target function value, gradually approaching the optimal solution, and finally determining the initial input state parameter corresponding to the minimum optimization target function value, so that the robot achieves optimal control, enhances the adaptive ability and intelligent performance of the robot, and especially in a dynamic environment, the input state of the robot can be flexibly adjusted to optimize the effect and efficiency of task execution.

[0142] After step S103, the method further includes the following steps:

[0143] Step S104, controlling the robot at the second time based on the input state parameter at the second time.

[0144] After determining the input state parameter at the second time, the robot is controlled according to the input state parameter at the second time, ensuring that the robot walks smoothly within the safety area and avoids colliding with obstacles.

[0145] In some embodiments, step S104 can be implemented by the following method: first, converting the input state parameter at the second time into a joint torque of the robot through a preset controller; then, converting the joint torque into a motor driving signal; and finally, controlling the robot to move at the second time based on the motor driving signal.

[0146] Here, the preset controller refers to a hardware or software system that is set in advance and used to control the robot, which usually plays a role in instruction calculation and conversion in the robot control system. Parameter conversion refers to the process of converting the input state parameter into the actual control instruction of the robot through the preset controller, and the instruction obtained by conversion is usually in the form of joint torque, and the specific parameter conversion method is not limited herein.

[0147] Joint torque refers to the torque required by each joint of the robot, and joint torque is a basic parameter of the motion of the robot. Joint torque controls the rotation of the joint to achieve the adjustment of the posture of the robot and the reaching of the target position.

[0148] The motor driving signal refers to a signal for controlling the operation of a motor (start / stop, speed, and direction of the motor, etc.), which is usually transmitted to the motor through a current, voltage, or pulse signal to drive the movement of the robot. Controlling the movement of the robot refers to using the motor signal to drive the motor of the robot to make the robot move according to a specified trajectory or target.

[0149] The robot control method provided by the embodiments of the present application can be widely applied to various scenes, for example, logistics, medical, and the like. In the logistics scene, the robot can be a warehouse logistics robot, which needs to transport goods according to a set path while avoiding static or dynamic obstacles (such as shelves, workers, other robots, etc.). Through the robot control method provided by the embodiments of the present application, the constraint condition in the movement process of the warehouse logistics robot can be determined, and the control input of the warehouse logistics robot at the next moment is determined according to the constraint condition to control the movement of the warehouse logistics robot. In the medical field, the robot can be a surgical robot, which needs to perform operations according to the path set by the doctor while avoiding touching the sensitive areas of the human body (such as blood vessels, nerves, etc.). Through the robot control method provided by the embodiments of the present application, the constraint condition in the movement process of the surgical robot can be determined, and the control input of the surgical robot at the next moment is determined according to the constraint condition to control the movement of the surgical robot.

[0150] The robot control method provided in the embodiments of the present application can accurately determine the kinematic constraints of the robot by combining the position information of the robot at different times and using a preset equation to perform kinematic calculation, thereby ensuring the stability and controllability of the robot during movement. Meanwhile, by combining the obstacle information, the environmental constraints are dynamically determined, so that the robot can flexibly avoid obstacles in a dynamic environment, thereby significantly improving the safety of the robot. In addition, the robot control method provided in the embodiments of the present application can determine the feasible region for different types of obstacles, respectively. This real-time adjustment mechanism enhances the flexibility and adaptability of the robot, so that the robot can efficiently and safely perform tasks in a complex environment. Furthermore, the robot control method provided in the embodiments of the present application converts the continuous system equation into a form suitable for digital calculation by discretizing the dynamic model, thereby improving the control accuracy of the robot. Based on the discretized model and the output state parameters, an optimization objective function is constructed to realize intelligent optimization of the input state, thereby ensuring efficient control of the robot during movement. By setting a convergence threshold and the number of iterations, the optimization process can ensure stability while avoiding resource waste and ensuring accurate convergence. Each iteration is adjusted according to the gradient value and the objective function value, gradually approaching the optimal solution, and finally determining the initial input state parameters corresponding to the minimum optimization objective function value, so that the robot achieves optimal control, thereby enhancing the adaptive ability and intelligent performance of the robot. In particular, in a dynamic environment, the input state of the robot can be flexibly adjusted to optimize the effect and efficiency of task execution.

[0151] In the following, an exemplary application of the embodiments of the present application in an actual application scenario will be described.

[0152] The embodiments of the present application propose to establish the movement of the two legs of the biped robot as a three-dimensional inverted pendulum (3D-LIP) model according to the characteristics of the biped robot in navigation movement, and to perform autonomous navigation according to the three-dimensional inverted pendulum model. Moreover, the embodiments of the present application use the 3D-LIP model to represent the biped robot movement, unify the path planning and gait planning of the biped robot in navigation, and simultaneously consider the kinematic safety constraints (the above-mentioned kinematic constraint information) and the environmental safety constraints (the above-mentioned environmental constraint information) to avoid obstacles, discretely output the foot landing point position of the biped robot, and ensure robust gait and safe navigation path.

[0153] In the following, the robot control method provided in the embodiments of the present application will be described:

[0154] Firstly, the movement of the biped robot is equivalent to a three-dimensional inverted pendulum model, and the discretized kinematic model of the three-dimensional inverted pendulum is described in the above step S103, which will not be repeated here. Then, the overall framework of model predictive control is built according to the input and output of the three-dimensional inverted pendulum model.

[0155] Referring to Figure 4 , Figure 4 is a framework diagram of model predictive control provided by the embodiment of the present application. First, the preset motion trajectory and obstacle information are input into the high-level planner 402 to determine the kinematic constraint information and the environmental constraint information; then, the robot center of mass position is obtained from the robot pose pre-processing 401, and the robot landing position (i.e., the input state parameter at the second time point) is solved through the three-dimensional inverted pendulum model (i.e., the above-mentioned pre-constructed dynamic model) in the controller 402; next, the robot landing position is sent to the bottom controller 403 (i.e., the above-mentioned preset controller) at a frequency of 20 hz, and the robot landing position is converted into the joint torque of the robot; then, the robot 404 is controlled to move at a frequency of 1000 hz through the joint torque of the robot; finally, the robot 404 sends the robot center of mass information to the pose pre-processing 401 at a frequency of 100 hz to form a closed-loop control. Here, the specific robot control method parameters are described in the above steps S101 to S104, which will not be repeated here.

[0156] The robot control method provided by the embodiment of the present application can solve the problem of discontinuity and non-smoothness of the current biped robot navigation to a certain extent, and unify the path planning and gait planning of the biped robot through the three-dimensional inverted pendulum model and the constraint condition, which can ensure that the calculated path information meets the motion characteristics of the biped robot and guarantees the feasibility and safety of the path.

[0157] Based on the robot control method described in the above embodiment, Figure 5A structural block diagram of a robot control device 100 provided by an embodiment of the present application is shown. The robot control device can be a device in an electronic device (for example, a robot), and can be implemented in a software manner, which can be software in the form of programs and plug-ins, and includes the following software modules: an acquisition module 101, a first determination module 102, a second determination module 103, and a control module 104. These modules are logical, and thus can be combined or further split according to the implemented functions. The acquisition module 101 is configured to acquire a preset motion trajectory of a robot, obstacle information in a current environment of the robot, and an output state parameter of the robot at a first time; the first determination module 102 is configured to determine kinematic constraint information and environmental constraint information of the robot in the current environment based on the preset motion trajectory and the obstacle information; the second determination module 103 is configured to call a pre-constructed dynamics model, and determine an input state parameter of the robot at a second time based on the output state parameter at the first time, the kinematic constraint information, and the environmental constraint information; the second time is adjacent to the first time and later than the first time; and the control module 104 is configured to control the robot at the second time based on the input state parameter at the second time.

[0158] In some embodiments, the first determination module 102 is further configured to acquire position information of the robot at the first time; determine position information of the robot at the second time based on the preset motion trajectory; call a first preset equation to solve the position information at the first time and the position information at the second time, to obtain the kinematic constraint information of the robot in the current environment; and determine the environmental constraint information of the robot in the current environment based on the obstacle information.

[0159] In some embodiments, the first determination module 102 is further configured to determine a feasible region of the robot in the current environment based on the obstacle information; and determine the feasible region and an input preset speed interval as the environmental constraint information of the robot in the current environment.

[0160] In some embodiments, the obstacles in the obstacle information include static obstacles and dynamic obstacles; the first determining module 102 is further configured to: in response to the obstacle being the static obstacle, acquire a first preset safety margin and a second preset equation; call the second preset equation to solve the obstacle information and the first safety margin to obtain a feasible region of the robot in the current environment; in response to the obstacle being the dynamic obstacle, construct a motion model of the dynamic obstacle based on the obstacle information; determine position information of the dynamic obstacle at a future time through the motion model; the future time is later than the first time; dynamically adjust a second preset safety margin based on the position information of the dynamic obstacle at the future time to obtain an adjusted second safety margin; determine a region formed by positions with a distance greater than the adjusted second safety margin from the dynamic obstacle as the feasible region of the robot in the current environment.

[0161] In some embodiments, the second determining module 103 is further configured to: discretize the dynamic model to obtain a discretized dynamic model; construct an optimization objective function based on the discretized dynamic model and the output state parameter at the first time; solve the optimization objective function based on the kinematic constraint information and the environmental constraint information to obtain the input state parameter of the robot at the second time.

[0162] In some embodiments, the second determining module 103 is further configured to: acquire an initial input state parameter sequence, a convergence threshold, and a preset iteration number; determine a gradient value of each initial input state parameter in the initial input state parameter sequence and an optimization objective function value of each initial input state parameter in the initial input state parameter sequence through the optimization objective function; for each initial input state parameter, determine an updated state parameter of the initial input state parameter based on the gradient value of the initial input state parameter, the optimization objective function value, the convergence threshold, and the preset iteration number; determine an initial input state parameter corresponding to a minimum optimization objective function value as a target initial input state parameter; and determine an updated state parameter of the target initial input state parameter as the input state parameter of the robot at the second time.

[0163] In some embodiments, the second determining module 103 is further configured to: in response to the optimization objective function value of the initial input state parameter being greater than the convergence threshold, perform a first iteration update on the initial input state parameter based on the gradient value of the initial input state parameter to obtain a first input state parameter; the optimization objective function value of the first input state parameter being less than the convergence threshold; in response to the first input state parameter not satisfying the kinematic constraint conditions corresponding to the kinematic constraint information and the environmental constraint conditions corresponding to the environmental constraint information, perform a second iteration update on the first input state parameter based on the gradient value according to the preset number of iterations to obtain the updated state parameter.

[0164] In some embodiments, the control module 104 is further configured to: convert the input state parameters at the second moment using a preset controller to obtain the joint torque of the robot; convert the joint torque into a motor drive signal; and control the robot to move at the second moment based on the motor drive signal.

[0165] In some embodiments, the acquisition module 101 is further configured to: acquire the robot's velocity information and orientation angle at a first moment; determine the robot's center of gravity position based on the robot's mass distribution; and determine the velocity information, orientation angle, and center of gravity position as the robot's output state parameters at the first moment.

[0166] It should be noted that the description of the apparatus in this application embodiment is similar to the description of the method embodiment described above, and has similar beneficial effects as the method embodiment; therefore, it will not be repeated. For technical details not disclosed in this apparatus embodiment, please refer to the description of the method embodiment of this application for understanding.

[0167] This application provides an electronic device, which can be a robot. Figure 6 This is a schematic diagram of the robot provided in an embodiment of this application. Figure 6 As shown, robot 130 includes: at least one processor 131 ( Figure 6 (Only one is shown in the diagram), memory 132, and computer-executable instructions 133 stored in memory 132 and executable on at least one processor 131, which, when executed by processor 131, implement the steps in any of the robot control method embodiments described above.

[0168] The robot may include, but is not limited to, a processor 131 and a memory 132. Those skilled in the art will understand that... Figure 6The robot 130 is merely an example and does not limit the robot 130, which can include more or fewer components than shown, or combine some components, or have different components, such as an input / output device, a network access device, and the like.

[0169] The processor 131 can be a central processing unit (CPU), and can also be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, and the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.

[0170] The memory 132 can be an internal storage unit of the robot 130, such as a hard disk or a memory of the robot 130 in some embodiments. The memory 132 can also be an external storage device of the robot 130, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like, in other embodiments. Further, the memory 132 can include both the internal storage unit and the external storage device of the robot 130. The memory 132 is used to store an operating system, an application program, a boot loader, data, and other programs, such as program codes of computer programs, and the like. The memory 132 can also be used to temporarily store data that has been output or will be output.

[0171] The embodiment of the present application provides a computer readable storage medium, wherein computer executable instructions are stored. When the computer executable instructions are executed by a processor, the processor executes the robot control method provided by the embodiment of the present application, for example, as shown in the robot control method. Figure 1 The robot control method is shown.

[0172] The embodiment of the present application provides a computer program product, which includes computer executable instructions stored in a computer readable storage medium. A processor of an electronic device reads the computer executable instructions from the computer readable storage medium, and the processor executes the computer executable instructions, so that the electronic device executes the robot control method provided by the embodiment of the present application.

[0173] In some embodiments, the computer-readable storage media can be a memory such as a RAM, a ROM, a flash memory, a magnetic surface memory, an optical disk, or a CD-ROM, etc. It can also be various devices including one or any combination of the above memories.

[0174] In some embodiments, the computer-executable instructions can be in the form of programs, software, software modules, scripts, or code that are written in any form of programming language, including compiled or interpreted languages, or declarative or procedural languages, and that are deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0175] As an example, computer-executable instructions can, but need not, reside in a file system's files, can be stored in documents, for example, Hyper Text Markup Language (HTML) documents, in a single file dedicated to the program in question, or in multiple files (e.g., files implementing one or more modules, sub programs, or code portions).

[0176] As an example, computer-executable instructions can be deployed to be executed on one electronic device or on multiple electronic devices that are located at one site or distributed across multiple sites and that are interconnected by a communication network.

[0177] The above description is only some embodiments of the present application, and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, and improvement within the spirit and scope of the present application shall be included in the protection scope of the present application.

Claims

1. A robot control method, characterized in that, The method includes: The robot's preset motion trajectory, obstacle information in the current environment, and the robot's output state parameters at the first moment are obtained. Based on the preset motion trajectory and the obstacle information, the kinematic constraint information and environmental constraint information of the robot in the current environment are determined; The pre-constructed dynamic model is discretized to obtain a discretized dynamic model; based on the discretized dynamic model and the output state parameters at the first time step, an optimization objective function is constructed. Obtain the initial input state parameter sequence, convergence threshold, and preset number of iterations; determine the gradient value of each initial input state parameter in the initial input state parameter sequence using the optimization objective function, and determine the optimization objective function value of each initial input state parameter in the initial input state parameter sequence. For each initial input state parameter, an updated state parameter is determined based on the gradient value of the initial input state parameter, the value of the optimization objective function, the convergence threshold, and the preset number of iterations. The initial input state parameters corresponding to the minimum optimization objective function value are determined as the target initial input state parameters; The updated state parameters of the target's initial input state parameters are determined as the robot's input state parameters at the second time point; the second time point is adjacent to the first time point and is later than the first time point; Based on the input state parameters at the second time point, the robot is controlled at the second time point.

2. The method according to claim 1, characterized in that, The process of determining the robot's kinematic constraints and environmental constraints in the current environment based on the preset motion trajectory and the obstacle information includes: Obtain the position information of the robot at the first moment; Based on the preset motion trajectory, the position information of the robot at the second moment is determined; The first preset equation is invoked to solve the position information at the first time and the position information at the second time, so as to obtain the kinematic constraint information of the robot in the current environment; Based on the obstacle information, the environmental constraint information of the robot in the current environment is determined.

3. The method according to claim 2, characterized in that, The step of determining the environmental constraint information of the robot in the current environment based on the obstacle information includes: Based on the obstacle information, the feasible area of ​​the robot in the current environment is determined; The feasible region and the input preset speed range are determined as the environmental constraint information of the robot in the current environment.

4. The method according to claim 3, characterized in that, The obstacles in the obstacle information include static obstacles and dynamic obstacles; Determining the feasible area for the robot in the current environment based on the obstacle information includes: In response to the obstacle being a static obstacle, a preset first safety margin and a preset second equation are obtained; The second preset equation is invoked to solve for the obstacle information and the first safety margin, thereby obtaining the feasible area of ​​the robot in the current environment; In response to the obstacle being a dynamic obstacle, a motion model of the dynamic obstacle is constructed based on the obstacle information; The motion model is used to determine the position information of the dynamic obstacle at a future time; the future time is later than the first time. Based on the position information of the dynamic obstacle at the future time, the preset second safety margin is dynamically adjusted to obtain the adjusted second safety margin. The area formed by the position where the distance between the robot and the dynamic obstacle is greater than the adjusted second safety margin is determined as the feasible area of ​​the robot in the current environment.

5. The method according to claim 1, characterized in that, The step of determining the updated state parameters of the initial input state parameters based on the gradient value of the initial input state parameters, the value of the optimization objective function, the convergence threshold, and the preset number of iterations includes: In response to the fact that the optimization objective function value of the initial input state parameters is greater than the convergence threshold, the initial input state parameters are updated in a first iteration based on the gradient value of the initial input state parameters to obtain the first input state parameters; the optimization objective function value of the first input state parameters is less than the convergence threshold. In response to the first input state parameter not satisfying the kinematic constraint conditions corresponding to the kinematic constraint information and the environmental constraint conditions corresponding to the environmental constraint information, the first input state parameter is updated in a second iteration based on the gradient value according to the preset number of iterations to obtain the updated state parameter.

6. The method according to any one of claims 1 to 5, characterized in that, The control of the robot at the second time moment based on the input state parameters at the second time moment includes: The input state parameters at the second moment are converted by a preset controller to obtain the joint torque of the robot. The joint torque is converted into a motor drive signal; Based on the motor drive signal, the robot's movement is controlled at the second moment.

7. The method according to any one of claims 1 to 5, characterized in that, Obtaining the robot's output state parameters at the first moment includes: Collect the robot's velocity and orientation angle at the first instant; Based on the robot's mass distribution, the position of the robot's center of gravity is determined; The speed information, the orientation angle, and the center of gravity position are determined as the output state parameters of the robot at the first moment.

8. A robot control device, characterized in that, include: The acquisition module is used to acquire the robot's preset motion trajectory, obstacle information in the current environment, and the robot's output state parameters at the first moment. The first determining module is used to determine the kinematic constraint information and environmental constraint information of the robot in the current environment based on the preset motion trajectory and the obstacle information; The second determining module is used to discretize the pre-built dynamic model to obtain a discretized dynamic model; Based on the discretized dynamic model and the output state parameters at the first time step, an optimization objective function is constructed; the initial input state parameter sequence, convergence threshold, and preset number of iterations are obtained. The gradient value of each initial input state parameter in the initial input state parameter sequence is determined by the optimization objective function, and the optimization objective function value of each initial input state parameter in the initial input state parameter sequence is determined. For each initial input state parameter, based on the gradient value of the initial input state parameter, the value of the optimization objective function, the convergence threshold, and the preset number of iterations, the updated state parameter of the initial input state parameter is determined; the initial input state parameter corresponding to the minimum optimization objective function value is determined as the target initial input state parameter. The updated state parameters of the target's initial input state parameters are determined as the robot's input state parameters at the second time point; the second time point is adjacent to the first time point and is later than the first time point; The control module is used to control the robot at the second time moment based on the input state parameters at the second time moment.

9. An electronic device, characterized in that, include: Memory is used to store executable instructions for a computer; A processor, when executing computer-executable instructions stored in the memory, implements the robot control method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The device stores computer-executable instructions or computer programs, which, when executed by a processor, implement the robot control method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Robot

    CN110477808A

  • Motion planning method of quadruped robot for narrow environment

    CN114022824A