Robot motion control method and device, electronic equipment, computer readable storage medium and computer program product
By extracting the point data of the robot's leg, building vectors and obtaining the rotation matrix, and performing action solutions to obtain the expected displacement of the linear motor, the problem of controlling the ankle motion trajectory of the humanoid robot is solved and precise motion control is achieved.
Patent Information
- Application Number
- CN202411984851.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-03-11
AI Technical Summary
The prior art is difficult to make the ankle of the humanoid robot perform the desired motion according to the established trajectory by inverse kinematic calculations.
By extracting the point data of the robot's legs, a correlation vector is constructed, a rotation matrix of the expected motion angle of the ankle is obtained, and the action is solved based on these data, and the expected displacement of the linear motor is obtained to control its motion.
Accurate control of the robot's ankle movement is achieved so that it can perform the desired movement along the established trajectory.
Smart Images

Figure CN119589683A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robot control, and in particular to a robot motion control method, device, electronic device, computer-readable storage medium and computer program product. Background Art
[0002] In recent years, humanoid robots have become popular, and there is a possibility of their application in family companionship scenarios, which makes humanoid robots more anthropomorphic. However, traditional humanoid robots use rotary motors in series to build legs, and the legs in this configuration are not anthropomorphic. Therefore, in order to make humanoid robots more anthropomorphic, a new robot architecture that uses linear motors to drive the robot's knees and ankles is used. However, for the new robot architecture, there is no effective solution for how to derive the inverse kinematics of the robot's ankle part so that the ankle can perform the desired movement according to the established trajectory. Summary of the invention
[0003] The embodiments of the present application provide a robot motion control method, device, electronic device, computer-readable storage medium and computer program product, which can make the robot's ankle perform desired motion along a predetermined trajectory through inverse kinematics calculation of the robot's ankle part.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] The present application provides a robot motion control method, including:
[0006] Extracting point data of the robot's legs, wherein the point data includes: a first point, a second point, and a third point, wherein the first point is a rotation center point of the robot's ankle rotating in a first direction, the second point is a rotation center point of an end of a linear motor disposed on the ankle close to a knee joint of the robot and rotationally connected to the knee joint, and the third point is an end of the linear motor away from the knee joint and connected to the ankle joint to control the rotation center point of the ankle joint in a second direction;
[0007] Constructing a first vector pointing from the first point to the second point, a second vector pointing from the first point to the third point, and a third vector pointing from the second point to the third point;
[0008] Obtaining a rotation matrix corresponding to a desired movement angle of the robot's ankle;
[0009] Obtain a fourth vector by subtracting the first vector from the product of the rotation matrix and the second vector;
[0010] Performing motion calculation based on the vector modulus of the fourth vector and the third vector to obtain a desired displacement of the linear motor;
[0011] The linear motor is controlled to move according to the desired displacement.
[0012] The present application provides a robot motion control device, comprising:
[0013] An extraction module is used to extract point data of the robot leg, wherein the point data includes: a first point, a second point and a third point, the first point is a rotation center point of the robot's ankle rotating in a first direction, the second point is a rotation center point of an end of the ankle's linear motor close to the knee joint and connected to the knee joint for rotation, and the third point is an end of the linear motor away from the knee joint and connected to the ankle joint to control the rotation center point of the ankle joint in a second direction;
[0014] A construction module, configured to construct a first vector pointing from the first point to the second point, a second vector pointing from the first point to the third point, and a third vector pointing from the second point to the third point;
[0015] The acquisition module is further used to acquire the rotation matrix corresponding to the expected movement angle of the ankle of the robot;
[0016] A calculation module, used for obtaining a fourth vector by subtracting the first vector from the product of the rotation matrix and the second vector;
[0017] A motion calculation module, used for performing motion calculation based on the vector modulus of the fourth vector and the third vector to obtain a desired displacement of the linear motor;
[0018] A control module is used to control the linear motor to move according to the expected displacement.
[0019] In the above scheme, the expected movement angle includes a first expected rotation angle of the robot's ankle in a first direction, and a second expected rotation angle of the ankle joint in a second direction. The acquisition module is also used to obtain a first rotation matrix of the first expected rotation angle and a second rotation matrix of the second expected rotation angle.
[0020] In the above scheme, the calculation module is also used to multiply the first rotation matrix and the second rotation matrix to obtain a first multiplication result; multiply the first multiplication result and the second vector to obtain a second multiplication result; subtract the second multiplication result from the first vector, and use the subtraction result as the fourth vector.
[0021] In the above scheme, the motion solving module is also used to respectively determine the vector modulus of the fourth vector and the third vector; subtract the vector modulus of the fourth vector from the vector modulus of the third vector, and use the subtraction result as the expected displacement of the linear motor.
[0022] In the above scheme, the device also includes a detection module for measuring the actual movement angle of the robot's ankle; determining the angle error between the actual movement angle and the expected movement angle; if the angle error is less than a preset angle error threshold, it is determined that the movement control of the robot's ankle is completed.
[0023] An embodiment of the present application provides an electronic device, including:
[0024] A memory for storing computer executable instructions or computer programs;
[0025] The processor is used to implement the robot motion control method provided in the embodiment of the present application when executing the computer executable instructions or computer program stored in the memory.
[0026] An embodiment of the present application provides a computer-readable storage medium storing a computer program or computer-executable instructions, which are used to implement the robot motion control method provided in the embodiment of the present application when executed by a processor.
[0027] An embodiment of the present application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, the robot motion control method provided by the embodiment of the present application is implemented.
[0028] The embodiments of the present application have the following beneficial effects:
[0029] By extracting the point data of the robot's leg, wherein the point data includes a first point, a second point and a third point, the first point is the rotation center point of the robot's ankle rotating in a first direction, the second point is the rotation center point of the linear motor disposed at the ankle close to one end of the robot's knee joint and connected to the knee joint for rotation, and the third point is the end of the linear motor away from the knee joint and connected to the ankle joint to control the rotation center point of the ankle joint for rotation in the second direction, that is, the precise point data of the robot's ankle can be obtained, thereby helping to ensure the accuracy of the robot's ankle during movement, and then constructing a first point pointing from the first point to the second point A vector, a second vector pointing from the first point to the third point, and a third vector pointing from the second point to the third point. At the same time, a rotation matrix corresponding to the desired movement angle set for the robot's ankle is obtained, and a fourth vector is obtained by subtracting the product of the rotation matrix and the second vector from the first vector. The action is solved based on the vector modulus of the fourth vector and the third vector to obtain the desired displacement of the linear motor, and the linear motor is moved according to the desired displacement. In this way, through inverse kinematics calculation of the robot's ankle part, the robot's ankle can perform the desired movement according to a predetermined trajectory, thereby realizing precise control of the movement of the robot's ankle. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 is a schematic diagram of the architecture of a robot motion control system 100 provided in an embodiment of the present application;
[0031] Figure 2 is a schematic diagram of the structure of an electronic device 500 provided in an embodiment of the present application;
[0032] Figure 3 is a flow chart of a robot motion control method provided in an embodiment of the present application;
[0033] Figure 4 is a schematic diagram of the three-dimensional structure of the robot parallel ankle provided in an embodiment of the present application;
[0034] Figure 5 It is a model architecture diagram of a robot parallel ankle provided in an embodiment of the present application;
[0035] Figure 6 is a flow chart of a robot motion control method provided in an embodiment of the present application;
[0036] Figure 7 is a flow chart of a robot motion control method provided in an embodiment of the present application;
[0037] Figure 8 It is a process diagram of the robot motion control method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0039] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0040] It is understandable that in the embodiments of the present application, related data such as user information is involved. When the embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards.
[0041] 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 goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a 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 part of an overall module or unit that includes the function of the module or unit.
[0042] In the following description, the terms "first\second\..." involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\..." can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0044] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0045] 1) Linear motor: Linear motor can convert electrical energy into kinetic energy, which is used to control the linear or diagonal movement of the robot's ankle. In the parallel ankle structure, the linear motor is responsible for realizing the two degrees of freedom of the ankle, usually including movement or rotation in the horizontal and vertical directions. The parallel structure driven by the linear motor provides an adaptable and flexible movement mode, allowing the robot to better adapt when facing complex terrain.
[0046] 2) Pitch angle: The pitch angle refers to the angle between the longitudinal axis of an object (usually the front-to-back direction) and the horizontal plane. In the field of robotics, the pitch angle can also be used to describe the inclination angle of the robot's head or limbs relative to the horizontal plane.
[0047] 3) Roll angle: The roll angle refers to the angle between the horizontal axis of an object (usually the left-right direction) and the horizontal plane. In the field of robotics, the roll angle can describe the left-right tilt of the robot's body, such as the tilt of the body when walking or running.
[0048] 4) Rotation Matrix: A rotation matrix is a special kind of square matrix that is widely used in linear algebra and engineering (especially robotics and computer graphics). A rotation matrix is used to represent rotation operations in three-dimensional space. It can rotate a vector around a specified axis (such as the x-axis, y-axis, or z-axis, etc.) by a specific angle without changing the length of the vector. Through the rotation matrix, a point or vector in three-dimensional space can be rotated around any axis to any angle without manually performing complex trigonometric calculations.
[0049] 5) Denavit-Hartenberg (DH) method: The DH method fixes a coordinate system on each link of the robot and uses a 4×4 homogeneous transformation matrix to describe the spatial relationship between two adjacent links. These matrices include rotation matrix, position matrix, perspective matrix and scale transformation matrix. The position and posture of the end effector relative to the base coordinate system are finally derived through successive transformations, thereby establishing the kinematic equations of the robot.
[0050] 6) Modified Denavit-Hartenberg (MDH) method: The MDH method is a variant of the DH method. It improves the DH method and is used to describe the relationship between each link in the kinematics of the robot arm. They are connected through a series of transformation matrices to obtain the kinematic model of the entire robot arm.
[0051] 7) Proportional-Integral-Derivative (PID) controller: PID controller is a widely used feedback control strategy. It adjusts the control signal to make the output of the controlled system as close to the set target value (set point) as possible. PID controller combines three control functions: proportional, integral and derivative. Proportional control makes the output of the control signal proportional to the error signal. The proportional gain (K_p) determines the sensitivity of the control signal to the error size. Proportional control can respond to errors quickly, but it is not enough to completely eliminate steady-state errors. Integral control accumulates the output of the control signal by integrating the error signal, thereby eliminating steady-state errors. The integral gain (K_i) determines the sensitivity of the control signal to error accumulation. However, integral control may cause the system to respond slowly or even oscillate. Derivative control provides the output of the control signal by differentiating the error signal, which can predict the future trend of the error. The derivative gain (K_d) determines the sensitivity of the control signal to the error change rate. Derivative control helps to reduce overshoot and improve the response speed of the system.
[0052] 8) Two-degree-of-freedom (2-DOF) ankle: A 2-DOF ankle is an ankle joint that is designed to allow movement in two independent directions. In biomechanics, the human ankle joint mainly moves in two planes: sagittal plane movement (plantar flexion and dorsiflexion of the ankle, that is, the movement of the toes down and up) and coronal plane movement (inversion and eversion of the ankle, that is, the movement of the sole of the foot inward or outward). In the design of robots or prostheses, 2-DOF ankles mimic these movements to provide a more natural and flexible gait.
[0053] In recent years, the field of humanoid robots has been very popular, and the possibility of practical application in family companionship scenarios has emerged, which makes humanoid robots more anthropomorphic. However, traditional humanoid robots use rotating motors in series to build legs, and the legs in this configuration are not anthropomorphic. Therefore, in order to make the humanoid robot more anthropomorphic, a new robot architecture is used in which linear motors drive the robot's knees and ankles.
[0054] In traditional methods, the solution of the manipulator is generally based on the DH or MDH method to build a complete parallel structure of the kinematic relationship. Since the humanoid robot has a floating base and can easily use libraries such as RBDL (Robotics Dynamics and Kinematics Library) and KDL (Kinematics and Dynamics Library), the inverse kinematics is generally obtained in the form of serial legs. Therefore, when obtaining the foot end trajectory, the trajectory of the joint is calculated by traditional methods, including the motion trajectory of the ankle. However, in order to more conveniently map the foot end trajectory to the motor layer, it is only necessary to determine the mapping of the ankle motion trajectory to the linear motor. Therefore, there is a computational requirement for solving the inverse kinematics of the linear motor parallel two-degree-of-freedom ankle.
[0055] For a two-degree-of-freedom ankle, if a series structure is used, the mechanical structure will appear redundant and bulky. In order to simplify the mechanical structure and make the model beautiful, a parallel structure is usually used. However, when solving the kinematics of a humanoid robot, the relevant algorithm library usually first solves it according to the series structure, obtains the joint data in the series structure, and then performs a secondary conversion to obtain the relevant drive data of the linear motor in the parallel structure. For the new robot architecture, by deriving the inverse kinematics of the ankle part of the robot, the ankle can perform the desired movement according to the predetermined trajectory. There is no effective solution in the relevant technology.
[0056] In view of this, the embodiments of the present application provide a robot motion control method, device, electronic device, computer-readable storage medium and computer program product, which can enable the robot's ankle to perform the desired motion according to a predetermined trajectory through inverse kinematics calculation of the robot's ankle part. The electronic device provided in the embodiments of the present application can be implemented as a server, or implemented by a server and a terminal in collaboration. The following is an example of the robot motion control method provided by the embodiments of the present application being implemented by a server and a terminal in collaboration.
[0057] For example, see Figure 1 , Figure 1 1 is a schematic diagram of the architecture of a robot motion control system 100 provided in an embodiment of the present application, in order to realize a robot motion control application, such as Figure 1 As shown, the robot motion control system 100 includes: a server 200, a network 300, and a terminal 400 (for example, it can be various types of robots). The terminal 400 is connected to the server 200 through the network 300, wherein the network 300 can be a local area network or a wide area network, or a combination of the two.
[0058] In some embodiments, taking the terminal 400 as an example of a two-degree-of-freedom anthropomorphic robot driven by a linear motor, the robot's ankle adopts a parallel structure. First, the robot transmits its own three-dimensional model structure data to the server 200 through the network 300; then, the server 200 extracts the point data of the robot's leg, wherein the point data includes: a first point, a second point, and a third point. The first point is the rotation center point of the robot's ankle rotating in a first direction, the second point is the rotation center point of one end of the linear motor disposed on the ankle close to the robot's knee joint and connected to the knee joint for rotation, and the third point is the end of the linear motor away from the knee joint and connected to the ankle joint to control the rotation center point of the ankle joint in a second direction; then, the server 200 constructs a rotation center point from the first point to the second point. A first vector of a point, a second vector pointing from the first point to the third point, and a third vector pointing from the second point to the third point; then, the server 200 obtains the rotation matrix corresponding to the expected movement angle of the robot's ankle; subsequently, the server 200 obtains a fourth vector based on the product of the rotation matrix and the second vector and the difference between the first vector and the fourth vector; thereafter, the server 200 performs motion calculation based on the vector modulus of the fourth vector and the third vector to obtain the expected displacement of the linear motor; finally, the server 200 sends a control instruction to the robot through the network 300 according to the expected displacement, and controls the robot to control the movement of the linear motor according to the expected displacement, thereby realizing precise control of the robot's ankle movement. For example, the robot can complete more complex actions such as climbing stairs or crawling to adapt to different application scenarios.
[0059] Of course, the above process can also be implemented by the terminal 400 alone. For example, the terminal 400 can perform motion calculation based on its own computing power to determine the expected displacement of the linear motor, thereby achieving precise control of the robot's ankle movement. For example, the robot can be controlled to complete the action of climbing stairs according to the expected movement angle. The embodiments of the present application do not make specific limitations on this.
[0060] It should be noted that the technical solution provided in this application can be applied to various scenarios, such as medical rehabilitation, hotel services, special operations, bionic research, entertainment performances and other robot motion control scenarios.
[0061] In some embodiments, taking a service robot in a hotel scene as an example, first, the service robot extracts the point data of its own legs, wherein the point data includes: a first point, a second point and a third point, the first point is the rotation center point of the robot's ankle rotating in a first direction, the second point is the rotation center point of the linear motor disposed at the ankle close to one end of the robot's knee joint and connected to the knee joint for rotation, and the third point is the end of the linear motor away from the knee joint and connected to the ankle joint to control the rotation center point of the ankle joint in the second direction; then, a first vector pointing from the first point to the second point, a second vector pointing from the first point to the third point, and a third vector pointing from the second point to the third point are constructed; then, a rotation matrix corresponding to the desired movement angle of the robot's ankle is obtained; then, a fourth vector is obtained by subtracting the product of the rotation matrix and the second vector from the first vector; then, an action is solved based on the vector modulus of the fourth vector and the third vector to obtain the desired displacement of the linear motor; finally, the linear motor is controlled to move according to the desired displacement to control the robot to complete the action to be performed (such as climbing stairs).
[0062] In some embodiments, taking a robot performing dance in a park as an example, first, the robot extracts point data of its own legs, wherein the point data includes: a first point, a second point and a third point, the first point is the rotation center point of the robot's ankle rotating in a first direction, the second point is the rotation center point of the linear motor disposed at the ankle close to one end of the robot's knee joint and connected to the knee joint for rotation, and the third point is the end of the linear motor away from the knee joint and connected to the ankle joint to control the rotation center point of the ankle joint rotating in a second direction; then, a first vector pointing from the first point to the second point, a second vector pointing from the first point to the third point, and a third vector pointing from the second point to the third point are constructed; then, a rotation matrix corresponding to the desired movement angle of the robot's ankle is obtained; then, a fourth vector is obtained by subtracting the product of the rotation matrix and the second vector from the first vector; then, an action is solved based on the vector modulus of the fourth vector and the third vector to obtain the desired displacement of the linear motor; finally, the linear motor is controlled to move according to the desired displacement to control the robot to complete the corresponding dance action.
[0063] It should be noted that Figure 1The server 200 in the example may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal 400 may be various types of robots (such as service robots, medical rehabilitation robots, special operation robots, entertainment robots, etc.), but is not limited thereto. The terminal 400 and the server 200 may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.
[0064] The structure of the electronic device provided in the embodiment of the present application is further described below. Taking the electronic device as a server as an example, see Figure 2 , Figure 2 is a schematic diagram of the structure of an electronic device 500 provided in an embodiment of the present application, Figure 2 The electronic device 500 shown includes: at least one processor 510, a memory 540, and at least one network interface 520. The various components in the electronic device 500 are coupled together via a bus system 530. It is understood that the bus system 530 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 530 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 530 is not described in detail. Figure 2 Various buses are labeled as bus system 530 .
[0065] The processor 510 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0066] The memory 540 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 540 may optionally include one or more storage devices that are physically remote from the processor 510.
[0067] The memory 540 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 540 described in the embodiments of the present application is intended to include any suitable type of memory.
[0068] In some embodiments, memory 540 is capable of storing data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0069] Operating system 541, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0070] A network communication module 542, for reaching other computing devices via one or more (wired or wireless) network interfaces 520, exemplary network interfaces 520 include: Bluetooth, Wireless Authentication (WiFi), and Universal Serial Bus (USB);
[0071] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2 The robot motion control device 543 stored in the memory 540 is shown, which can be software in the form of programs and plug-ins, including the following software modules: extraction module 5431, construction module 5432, acquisition module 5433, calculation module 5434, motion solution module 5435, control module 5436 and detection module 5437. These modules are logical, so they can be arbitrarily combined or further split according to the functions implemented. It should be pointed out that in Figure 2 For the sake of convenience, all the above modules are shown at once, but it should not be considered that the robot motion control device 543 excludes the implementation of only including the extraction module 5431, the construction module 5432, the acquisition module 5433, the calculation module 5434, the action solution module 5435 and the control module 5436. The functions of each module will be explained below.
[0072] The robot motion control method provided in the embodiment of the present application will be specifically described below in combination with the exemplary application and implementation of the terminal device provided in the embodiment of the present application.
[0073] See also Figure 3 , Figure 3is a flow chart of the robot motion control method provided in the embodiment of the present application, which will be combined with Figure 3 The steps shown are explained.
[0074] In step 101, the point data of the robot legs are extracted.
[0075] In some embodiments, see Figure 4 , Figure 4 3D schematic diagram of the robot parallel ankle provided in the embodiment of the present application, Figure 4 As shown, the point data extracted from the robot's legs may include: the first point (i.e. Figure 4 Point O shown in the figure), the second point (i.e. Figure 4 Point A shown) and the third point (i.e. Figure 4 B shown in the figure), wherein the first point is the rotation center point of the robot's ankle rotating in a first direction (for example, the x-axis direction of the three-dimensional coordinate system set for the robot), the second point is the rotation center point of the linear motor arranged at the ankle close to one end of the robot's knee joint and connected to the knee joint for rotation, and the third point is the end of the linear motor away from the knee joint and connected to the ankle joint to control the rotation center point of the ankle joint rotating in a second direction (for example, the y-axis direction of the three-dimensional coordinate system set for the robot).
[0076] For example, first, the three-dimensional model of the robot is imported into computer-aided design (CAD) software or three-dimensional modeling software, wherein the file format of the three-dimensional model may be .stl, .obj, .ply, etc.; then, the specific position of the robot's ankle in the three-dimensional model is determined; then, the ankle is meshed, wherein the fineness of the meshing may be determined according to the accuracy of the data points; finally, the point data of the robot's leg is extracted from the meshed data.
[0077] It should be noted that the three-dimensional model of the robot can be obtained by scanning with scanning equipment (such as laser scanners, structured light scanners, three-dimensional photogrammetry systems, etc.), or by modeling with three-dimensional modeling software (such as SolidWorks, Autodesk Inventor, CATIA, Fusion360, etc.) based on the structural data of the robot, and no specific limitation is made here.
[0078] For example, the 3D model file of the robot is imported into the CAD software, and the position of the robot's ankle is determined according to the structure of the robot. Then, the appropriate grid density is set to mesh the robot's ankle. Subsequently, the software is used to extract the point data of the robot's leg from the grid.
[0079] In some embodiments, the above step 101 can be implemented by: scanning the legs of the robot to obtain a three-dimensional model of the legs of the robot; extracting data from the three-dimensional model of the legs of the robot to obtain point data of the legs of the robot.
[0080] In some embodiments, first, a suitable scanning device is selected according to the size and complexity of the robot's legs; then, the robot's legs are scanned by the scanning device. Here, for complex leg structures, multiple scans may be performed to capture the robot's leg structure data from different angles; then, the scanned data is imported into the processing software, and the data is cleaned by the software to remove noise and errors; finally, the data from multiple scans are merged to obtain a complete three-dimensional model of the robot's legs.
[0081] For example, a handheld laser scanner is used to scan the legs of a robot. First, the scanner is calibrated to ensure its accuracy. Then, the robot legs are scanned multiple times from different angles to obtain complete three-dimensional data. Subsequently, the scanned data is imported into the processing software for data cleaning and mesh processing. Finally, the processed three-dimensional model is exported to obtain a complete three-dimensional model of the robot's legs.
[0082] In some embodiments, first, an accurate three-dimensional model of the robot's legs is obtained; then, a three-dimensional coordinate system is defined in the three-dimensional model, which usually includes an origin (for example, the center of the robot's body or the center of a joint of the leg) and three axes (for example, including the x-axis, y-axis, and z-axis), which usually correspond to the movement direction of the robot; then, the point data of the key points of the legs are identified in the three-dimensional model, and the positions of the key points of the legs in the global coordinate system are obtained, thereby obtaining the point data of the legs. In this way, the robot's steps and control strategies can be further analyzed based on the collected point data of the legs.
[0083] For example, suppose there is a three-dimensional model of a robot's leg. First, import the three-dimensional model of the leg into data analysis software (such as MATLAB); then, define the coordinate system of the three-dimensional model of the leg in MATLAB; then, based on the position of the key points of the leg, obtain the point data of the corresponding key points of the leg from MATLAB.
[0084] In another example, taking the three-dimensional model of the leg of a biped robot as an example, the leg point data is extracted, and the extracted leg point data can be: the coordinates of the first point (i.e., point O, the rotation center point of the robot's ankle rotating in the first direction) are (x0, y0, z0), the coordinates of the second point (i.e., point A, the rotation center point of the end of the linear motor provided at the ankle close to the robot's knee joint and connected to the knee joint for rotation) are (x1, y1, z1), and the coordinates of the third point (i.e., point B, the rotation center point of the end of the linear motor away from the knee joint and connected to the ankle joint to control the ankle joint to rotate in the second direction) are (x2, y2, z2).
[0085] In some embodiments, after executing step 101, the following processing may also be performed: based on the position data of the leg and the expected movement angle, the position data of the robot's ankle after the movement according to the expected movement angle is calculated, and based on the change of the position data before and after the movement, the expected displacement of the linear motor of the ankle is determined. In this way, by accurately calculating the movement trajectory and displacement of the ankle to achieve precise control of the ankle movement, the accuracy of the robot's motion control can be effectively improved.
[0086] For example, assuming that the position data of the robot's legs include three points O, A and B, and the expected movement angle is θ, where point O and point A are fixed points. First, based on the position data and the expected movement angle, the point data of the legs after movement is obtained as B_ according to the geometric relationship, and based on the changes in the point data of the legs before and after the movement, the displacement change of the point data of the ankle before and after movement is determined to be z. At the same time, assuming that the expected displacement of the linear motor of the ankle is the same as the displacement change of point B, the expected displacement L of the linear motor of the ankle can be determined to be z based on the displacement change of the point data.
[0087] In step 102, a first vector pointing from the first point to the second point, a second vector pointing from the first point to the third point, and a third vector pointing from the second point to the third point are constructed.
[0088] In some embodiments, see Figure 5 , Figure 5 This is a model architecture diagram of the robot parallel ankle provided in the embodiment of the present application, which will be combined with Figure 5 Step 102 is described as follows: Figure 5 As shown, the first point is point O, the second point is any point in A1 or A2, and the third point is any point in B1 or B2. Therefore, the first vector pointing from the first point to the second point can be vector OA1 or vector OA2. Similarly, the second vector pointing from the first point to the third point can be vector OB1 or vector OB2. The third vector pointing from the second point to the third point can be vector A1B1 or vector A2B2.
[0089] Here, after constructing the first vector, the second vector and the third vector, vector operations (such as vector addition and subtraction) can be used to determine the expected displacement of the linear motor of the ankle, or a projection calculation method can be used to determine the expected displacement of the linear motor of the ankle. The expected displacement of the linear motor of the ankle can also be determined based on a known mapping relationship (such as the relationship between ankle movement and the displacement of the linear motor of the ankle), and no specific limitations are made here.
[0090] In step 103, a rotation matrix corresponding to the expected movement angle of the robot's ankle is obtained.
[0091] Here, the expected movement angle of the robot's ankle may be directly set by the user through the client, or may be dynamically determined according to different task requirements of the robot, and no specific limitation is made here.
[0092] For example, the user can directly set the desired movement angle of the robot's ankle in the client interface for controlling the robot's movement, for example, setting the desired pitch angle of the robot's ankle to 30° and the desired roll angle to 60°.
[0093] In another example, the robot's task requirements can also be obtained first. Assuming that the task requirement is to maintain the robot's balance, the robot can obtain the surrounding environmental information (such as the flatness of the ground, the slope, etc.) through its own sensors, and calculate the expected movement angle of the robot's ankle when maintaining the robot's balance based on the surrounding environmental information. For example, the angle between the ground and the horizontal plane is 30°. To maintain the robot's balance, the robot's sole must be parallel to the ground, and the robot's original sole is horizontal. Therefore, it can be calculated that the ankle needs to control the expected rolling angle of the sole to be 30°, that is, the expected movement angle of the robot's ankle can be determined. Here, for a simple ankle model structure, the expected movement angle of the ankle can be directly calculated using a geometric analysis method; for a complex ankle model structure, it can be solved using a numerical method, such as the Newton-Raphson method, the gradient descent method, etc.
[0094] In some embodiments, the expected motion angle includes a first expected rotation angle of the robot's ankle in a first direction, and a second expected rotation angle of the ankle joint in a second direction. The above step 103 can be implemented by obtaining a first rotation matrix of the first expected rotation angle and a second rotation matrix of the second expected rotation angle. In this way, the robot motion can be precisely controlled by the obtained rotation matrix.
[0095] Here, the first direction may refer to a three-dimensional coordinate system set for the robot (eg Figure 5The first desired rotation angle may refer to the desired pitch angle, and the second desired rotation angle may refer to the desired roll angle.
[0096] For example, assuming that the desired pitch angle is y and the desired roll angle is x, the rotation matrix R(y) of the desired pitch angle can be calculated by formula (1), and the rotation matrix R(x) of the desired roll angle can be calculated by formula (2).
[0097]
[0098]
[0099] In step 104, a fourth vector is obtained by subtracting the first vector from the product of the rotation matrix and the second vector.
[0100] Here, if Figure 5 As shown, points B1 and B2 in the second vector are points located on the ankle, and their positions will change with the movement of the robot's ankle. Point O is a point that can only rotate around the x-axis and y-axis, that is, the position of point O will not change. Therefore, the second vectors OB1 and OB2 are floating values, not fixed.
[0101] In some embodiments, the desired motion angle includes a first desired rotation angle of the robot's ankle in a first direction, and a second desired rotation angle of the ankle joint in a second direction, see Figure 6 , Figure 6 is a flow chart of a robot motion control method provided in an embodiment of the present application, Figure 3 Step 104 shown may be performed by Figure 6 Steps 1041 to 1043 shown in the figure are implemented by combining Figure 6 The steps shown are explained.
[0102] In step 1041, the first rotation matrix and the second rotation matrix are multiplied to obtain a first multiplication result.
[0103] Continuing with the above example, assuming that the first rotation matrix is R(y) and the second rotation matrix is R(x), the first rotation matrix R(y) is multiplied by the second rotation matrix R(x) to obtain a first multiplication result R(y)*R(x).
[0104] In step 1042, the first multiplication result and the second vector are multiplied to obtain a second multiplication result.
[0105] Continuing with the above example, assuming that the second vector is OB1, the first multiplication result R(y)*R(x) is multiplied by the second vector OB1 to obtain a second multiplication result R(y)*R(x)*OB1.
[0106] In step 1043, the second multiplication result is subtracted from the first vector, and the subtraction result is used as the fourth vector.
[0107] Here, if Figure 5 As shown, points A1 and A2 in the first vector are fixed points located on the calf, that is, the positions of points A1 and A2 will not change. As mentioned above, the position of point O will not change either. Therefore, the first vectors OA1 and OA2 are fixed values. As mentioned above, B1 and B2 will change their positions with the movement of the robot's ankle. Therefore, the third vectors A1B1 and A2B2 are floating values and are not fixed.
[0108] Continuing with the above example, assuming that the first vector is OA1, the second multiplication result R(y)*R(x)*OB1 is subtracted from the first vector OA1, and the obtained subtraction result R(y)*R(x)*OB1-OA1 is used as the fourth vector.
[0109] In step 105, motion calculation is performed based on the vector modulus of the fourth vector and the third vector to obtain the expected displacement of the linear motor.
[0110] Here, the fourth vector is the vector after the ankle moves (assuming it is AB_), and the third vector is the vector AB before the ankle moves, such as Figure 5 As shown, the change in displacement of the linear motor before and after ankle movement is the same as the change in the vector modulus of vector AB (i.e., the third vector), that is, the change in displacement of the linear motor can be determined based on the change in vector AB before and after ankle movement (i.e., the difference between the vector modulus of the fourth vector and the vector modulus of the third vector).
[0111] In some embodiments, see Figure 7 , Figure 7 is a flow chart of a robot motion control method provided in an embodiment of the present application, Figure 3 Step 105 shown may be performed by Figure 7 Steps 1051 to 1052 are implemented by combining Figure 7 The steps shown are explained.
[0112] In step 1051, vector norms of the fourth vector and the third vector are determined respectively.
[0113] For example, assuming that the third vector before ankle movement is A0B0 (assuming that the coordinates of A0 are (x1, y1) and the coordinates of B0 are (x2, y2)), and the fourth vector after ankle movement is A1B1 (where the coordinates of A1 are (x3, y3) and the coordinates of B1 are (x4, y4)), then the vector modulus of the third vector ||A0B0|| is The vector norm of the fourth vector ||A1B1|| is
[0114] In step 1052, the vector modulus of the fourth vector and the vector modulus of the third vector are subtracted, and the subtraction result is used as the expected displacement of the linear motor.
[0115] Continuing with the above example, the modulus ||A1B1|| of the fourth vector after ankle movement is subtracted from the modulus ||A0B0|| of the third vector before ankle movement to obtain a second subtraction result ||A1B1||-||A0B0||, that is, the expected displacement L of the ankle's linear motor is ||A1B1||-||A0B0||.
[0116] In step 106 , the linear motor is controlled to move according to the desired displacement.
[0117] Here, in robot control, a variety of control strategies can be used to control the robot to control the linear motor to move according to the desired displacement. For example, an open-loop control method can be used to control the linear motor movement of the robot ankle, that is, the drive signal of the linear motor is based on a predetermined control algorithm or program, regardless of the actual movement result; a closed-loop control method (such as PID control, synovial control) can also be used to control the linear motor movement of the robot ankle, that is, a sensor is used to measure the actual movement and compare it with the desired movement to adjust the control signal; a fuzzy control method can also be used to control the linear motor movement of the robot ankle, that is, it does not rely on an accurate mathematical model, but uses fuzzy rules (such as the operator's expert knowledge setting) to adjust the control signal, which is not specifically limited here.
[0118] In some embodiments, after obtaining the desired displacement of the linear motor of the robot's ankle, a position sensor (such as a grating ruler, an encoder, etc.) is used to monitor the actual position of the linear motor in real time; then, the error between the desired displacement and the actual position of the linear motor is calculated; then, a proportional-integral-derivative (PID) controller is used to calculate the control signal according to the error, where the output signal of the PID controller will determine the voltage or current driven by the linear motor; then, according to the output signal of the PID controller, the movement of the linear motor is controlled by a drive circuit or a driver until the actual displacement is close to the desired displacement; in addition, the position change of the linear motor can be continuously monitored by a position sensor, and the control parameters of the PID controller can be adjusted in time to optimize the control performance.
[0119] For example, taking PID control as an example, assuming that the expected displacement of the linear motor of the robot's ankle is set to 10 cm, first, use the robot's built-in encoder to monitor the actual position z of the linear motor in real time, then calculate the error between the expected displacement and the actual position of the linear motor; then, use the PID controller to calculate the voltage to drive the linear motor based on the error; finally, the driver controls the linear motor to move according to the output voltage of the PID controller until the actual position change is close to 10 cm, and the actual position change of the linear motor is continuously monitored by the position sensor, and the PID parameters are adjusted as needed. In this way, the linear motor can be accurately controlled according to the expected displacement, thereby achieving accurate control of the robot's movement.
[0120] For example, taking fuzzy control as an example, assuming that the expected displacement of the linear motor of the robot's ankle is set to 20 cm, first, the actual position m of the linear motor is monitored by the robot's own grating ruler, and then the error w between the expected displacement and the actual position of the linear motor is calculated; then, the fuzzy rules are defined according to expert knowledge. For example, when the error w is less than the first error w1, the control signal is to control the linear motor to move x1 cm. When the error w is greater than or equal to the first error w1 and the error w is less than the second error w2, the control signal is to control the linear motor to move x2 cm; then, the fuzzy controller selects the appropriate fuzzy rule according to the error w, and controls the linear motor to move the corresponding distance. For example, if w is less than the first error w1, the linear motor is controlled to move x1 cm.
[0121] In some embodiments, after executing step 106, the following processing may also be performed: measuring the actual movement angle of the robot's ankle; determining the angle error between the actual movement angle and the expected movement angle; if the angle error is less than a preset angle error threshold, determining that the movement control of the robot's ankle is completed. In this way, by measuring and calculating the angle error in real time, it can be ensured that the movement accuracy of the robot's ankle meets the predetermined requirements, and by setting the angle error threshold, it can be ensured that the robot's movement control meets the established standards, thereby enhancing the reliability of the system.
[0122] Here, the actual movement angle of the robot's ankle can be measured by a sensor, such as an encoder, a gyroscope, an angle sensor, etc. For example, the robot's ankle is equipped with an encoder that can provide real-time angle feedback. When the robot's ankle moves, the encoder will output a pulse signal, and the current angle θ of the ankle can be calculated by formula (3).
[0123]
[0124] Where n is the number of pulse signals detected by the encoder, and N is the total number of pulse signals emitted by the encoder in one complete rotation (i.e. 360°).
[0125] In some embodiments, first, the actual movement angle of the robot's ankle is measured by a sensor; then, the angle error between the actual movement angle and the expected movement angle is calculated. For example, if the actual angle is θ1 and the expected movement angle is θ2, then the angle error is |θ2-θ1|; then, an angle error threshold is set, and the angle error is compared with the angle error threshold. When the angle error is less than the angle error threshold, it is determined that the motion control of the robot's ankle has been completed.
[0126] For example, assuming that the actual movement angle of the robot's ankle measured by the angle sensor is 160°, and the expected movement angle is 120°, the corresponding angle error is 40°, and the preset angle error threshold is 10°, which is significantly smaller than the angle error of 40°. Therefore, the movement of the ankle does not meet expectations, and the robot is controlled to continue moving by adjusting the parameters. Assuming that the actual movement angle is 125°, the corresponding angle error is 5°, which is smaller than the angle error threshold, and it is determined that the movement control of the robot's ankle has been completed.
[0127] Next, an exemplary application of the embodiment of the present application in a practical application scenario will be described. The exemplary application describes the specific implementation process of the robot motion control method.
[0128] For a two-degree-of-freedom ankle, if a series structure is adopted, the mechanical structure will appear redundant and bulky. In order to simplify the mechanical structure and make the model beautiful, a parallel structure is generally adopted for the two-degree-of-freedom ankle. However, when solving the kinematics of a humanoid robot, the relevant algorithm library will first solve it according to the series structure, and then after obtaining the series leg joint data, it will perform another conversion to obtain the driving data of the parallel motor. Therefore, there is a need for the inverse kinematics of the two-degree-of-freedom parallel ankle, that is, directly solving the inverse kinematics of the parallel ankle to obtain the driving data of the parallel motor.
[0129] In some embodiments, Figure 4 As shown, before calculating the ankle kinematics, it is necessary to obtain relevant data in the three-dimensional drawing. According to the three-dimensional drawing of the robot's leg structure, the data related to points O, A, and B in the theoretical model are measured. Here, the rotation center point of the robot's ankle rotating in the first direction is determined to be point O, the rotation center point of the linear motor arranged at the ankle close to the robot's knee joint and connected to the knee joint for rotation is determined to be point A, and the rotation center point of the linear motor located at the end away from the knee joint and connected to the ankle joint to control the ankle joint to rotate in the second direction is determined to be point B.
[0130] After defining the points of the three-dimensional model, inverse kinematic modeling can be performed. Since the main problem to be solved is the inverse kinematics problem of the parallel leg ankle, the information of other floating components of the robot can be ignored, and the robot calf and the joints on it can be considered as a fixed base. Since points O and A are both coordinate points fixedly connected to the calf, and point O is a point that can rotate horizontally and vertically, that is, the position of point O will not change, point A is a fixed point fixed on the calf, and its position will not change either, so vector OA is a fixed value; points O and B are both coordinate points fixedly connected to the ankle and move with the ankle, point B is a point on the ankle, and its position changes according to the movement of the ankle, that is, OB is equivalent to a hinge, that is, point O is a fixed point, and point B is a changing point, so vector OB is a floating value; in addition, vector AB corresponds to a linear motor, so vector AB is also a floating value.
[0131] First, the corresponding vectors OA (i.e., the first vector), vector OB (i.e., the second vector), and vector AB (i.e., the third vector) are calculated based on the three points O, A, and B. From the two-degree-of-freedom ankle information, it can be seen that vector OB changes with the angles of the ankle in two directions (i.e., the pitch angle and the roll angle), that is, the position of point B moves, while point A is fixed on the calf, that is, point A does not change. Therefore, vector AB will generate a unique vector AB_ (i.e., the fourth vector) as the ankle moves.
[0132] Next, according to formula (4), after obtaining the expected movement angle of the robot's ankle, according to the expected pitch angle y and the expected roll angle x in two directions of the robot's ankle, the corresponding rotation matrix R(y) of the expected pitch angle and the rotation matrix R(x) of the expected roll angle are calculated by formula (1) and formula (2) respectively, and the rotation matrix R(y) of the expected pitch angle and the rotation matrix R(x) of the expected roll angle are multiplied to obtain a first multiplication result R(y)*R(x), and then the first multiplication result R(y)*R(x) is multiplied with the vector OB to obtain the vector OB_ after the ankle movement.
[0133] OB_=R(y)*R(x)*OB (4)
[0134] Next, according to formula (5), after the vector OB_ after the ankle movement is calculated, the vector OB_ after the ankle movement is subtracted from the vector OA to obtain the vector AB_ of the linear motor axis after the ankle movement.
[0135] AB_=OB_-OA (5)
[0136] Subsequently, according to formula (6), the change in the modulus of the vector of the linear motor axis before and after the ankle movement is calculated, that is, the modulus ||AB_|| of the vector of the linear motor axis after the ankle movement is subtracted from the modulus ||AB|| of the vector of the linear motor axis before the ankle movement to obtain the expected displacement L of the linear motor of the ankle.
[0137] L=||AB_||-||AB|| (6)
[0138] Finally, the linear motor is controlled to move according to the desired displacement L of the linear motor of the ankle, so as to realize the motion control of the ankle of the robot.
[0139] In some embodiments, see Figure 8 , Figure 8 is a schematic diagram of the process of the robot motion control method provided by the embodiment of the present application, which will be combined with Figure 8 The specific process of the robot motion control method of the present application is described.
[0140] In step 201, point data is extracted based on the three-dimensional model of the leg.
[0141] Here, extracting point data usually involves calculating the specific position of each point from a mathematical model, which can be determined by the forward kinematics solution method (i.e. solving the point position information when the joint angle is known), or calculated by the inverse kinematics solution method (i.e. solving the joint angle when the point position information is known), without specific limitation here.
[0142] For example, the extracted hip joint position is (x_hip, y_hip, z_hip), the knee joint position is (x_knee, y_knee, z_knee), and the ankle joint position is (x_ankle, y_ankle, z_ankle).
[0143] In step 202, the ankle motion angle is determined.
[0144] Here, under static or dynamic conditions, the motion data of the ankle is collected, the data is analyzed, and the angle of the ankle at different stages of movement is determined. If a motion capture system is used, the data may need to be processed through specialized software to obtain the accurate angle.
[0145] In some embodiments, first, the degrees of freedom of movement and possible movement types of the robot's ankle joint are defined, for example, whether plantar flexion / dorsiflexion, inversion / eversion, etc. can be performed; then, according to the specific design of the robot, a mathematical model of the ankle joint is established, and the model parameters include the characteristics of the joint type (revolving joint, prismatic joint, etc.) and the driver (motor, servo system, etc.); then, inverse kinematics analysis is used to determine the movement angle to achieve the desired position and posture, that is, the desired position and direction of the ankle are defined, and mathematical methods (such as analytical solutions, numerical solutions) are used to solve a set or more possible joint angle configurations.
[0146] In step 203, the motor shaft vector change is determined.
[0147] In some embodiments, the position data of the legs after the movement are obtained based on the ankle movement angle and the position data of the legs of the robot, and the change of the motor axis vector is calculated based on the change of the position data of the legs before and after the movement.
[0148] For example, Figure 5 As shown in FIG. 1 , after obtaining the position data of the robot's legs (i.e., A1, A2, B1, B2, and O) and the ankle motion angle (assuming that the pitch angle is y and the roll angle is x), vector OA1 is obtained from point O to point A1, vector OA2 is obtained from point O to point A2, vector OB1 is obtained from point O to point B1, and vector OB2 is obtained from point O to point B2; then, according to formula (1) and formula (2), the rotation matrices R(y) and R(x) corresponding to the pitch angle y and the roll angle x are calculated respectively; then, according to formula (4), the vector OB1_ and vector OB2_ after the ankle motion are calculated; since vector OA1 and vector OA2 will not change according to the ankle motion, they are obtained by Figure 5It can be seen that the motor axis vector A1B1_ after ankle movement can be obtained by subtracting vector OB1_ from vector OA1, and the motor axis vector A2B2_ after ankle movement can be obtained by subtracting vector OB2_ from vector OA2. The motor axis vectors A1B1_ and A2B2_ after ankle movement can be calculated according to formula (5).
[0149] In step 204, the linear motor displacement is determined.
[0150] Here, the displacement generated by the linear motor can be obtained by calculating the change in the linear motor axis vector modulus.
[0151] Continuing with the above example, after obtaining the motor axis vectors A1B1, A2B2, A1B1_ and A2B2_ before and after the ankle movement, the expected displacement L of the linear motor can be calculated by formula (6).
[0152] The following is a description of an exemplary structure of a robot motion control device 543 provided in an embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules stored in the robot motion control device 543 of the memory 540 may include: an extraction module 5431, a construction module 5432, an acquisition module 5433, a calculation module 5434, an action solving module 5435 and a control module 5436.
[0153] The extraction module 5431 is used to extract the point data of the robot's leg, wherein the point data includes: a first point, a second point and a third point, the first point is the rotation center point of the robot's ankle rotating in a first direction, the second point is the rotation center point of the ankle's linear motor close to the knee joint and connected to the knee joint for rotation, and the third point is the end of the linear motor away from the knee joint and connected to the ankle joint to control the rotation center point of the ankle joint in the second direction; the construction module 5432 is used to construct a first vector pointing from the first point to the second point, a second vector pointing from the first point to the third point, and a third vector pointing from the second point to the third point; the acquisition module 5433 is also used to obtain the rotation matrix corresponding to the expected movement angle of the robot's ankle; the calculation module 5434 is used to obtain a fourth vector by subtracting the product of the rotation matrix and the second vector from the first vector; the action solution module 5435 is used to perform action solution based on the vector modulus of the fourth vector and the third vector to obtain the expected displacement of the linear motor; the control module 5436 is used to control the linear motor to move according to the expected displacement.
[0154] In some embodiments, the expected motion angle includes a first expected rotation angle of the robot's ankle in a first direction, and a second expected rotation angle of the ankle joint in a second direction. The acquisition module 5433 is also used to obtain a first rotation matrix of the first expected rotation angle and a second rotation matrix of the second expected rotation angle.
[0155] In some embodiments, the acquisition module 5433 is also used to multiply the first rotation matrix and the second rotation matrix to obtain a first multiplication result; multiply the first multiplication result and the second vector to obtain a second multiplication result; subtract the second multiplication result from the first vector, and use the subtraction result as the fourth vector.
[0156] In some embodiments, the motion solving module 5435 is also used to determine the vector modulus of the fourth vector and the third vector respectively; subtract the vector modulus of the fourth vector from the vector modulus of the third vector, and use the subtraction result as the expected displacement of the linear motor.
[0157] In some embodiments, the above-mentioned robot motion control device 543 also includes a detection module 5437, which is used to measure the actual movement angle of the robot's ankle; determine the angle error between the actual movement angle and the expected movement angle; if the angle error is less than a preset angle error threshold, it is determined that the motion control of the robot's ankle is completed.
[0158] It should be noted that the description of the device in the embodiment of the present application is similar to the description of the method embodiment above, and has similar beneficial effects as the method embodiment, so it will not be repeated. Figure 3 , Figure 6 or Figure 7 The present invention should be understood by referring to the description of any one of the accompanying drawings.
[0159] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer readable storage medium, and the processor executes the computer executable instruction, so that the electronic device executes the robot motion control method described in the embodiment of the present application.
[0160] The present application embodiment provides a computer-readable storage medium, in which computer executable instructions or computer programs are stored. When the computer executable instructions or computer programs are executed by a processor, the processor will be caused to execute the robot motion control method provided by the present application embodiment, for example, Figure 3 , Figure 6 or Figure 7The robot motion control method is shown.
[0161] In some embodiments, the computer-readable storage medium may be a ferroelectric random access memory (FRAM), ROM, programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), flash memory, magnetic surface memory, optical disk, or compact disc read-only memory (CD-ROM) and other memories; it may also be various devices including one or any combination of the above memories.
[0162] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be 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.
[0163] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0164] As an example, computer executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0165] In summary, the embodiments of the present application can correctly obtain the kinematic solution from the ankle joint to the ankle motor, which facilitates the further implementation of the algorithm based on the library solution.
[0166] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A robot motion control method, characterized in that: The method comprises: Extracting point data of the robot's legs, wherein the point data includes: a first point, a second point, and a third point, wherein the first point is a rotation center point of the robot's ankle rotating in a first direction, the second point is a rotation center point of an end of a linear motor disposed on the ankle close to a knee joint of the robot and rotationally connected to the knee joint, and the third point is an end of the linear motor away from the knee joint and connected to the ankle joint to control the rotation center point of the ankle joint in a second direction; Constructing a first vector pointing from the first point to the second point, a second vector pointing from the first point to the third point, and a third vector pointing from the second point to the third point; Obtaining a rotation matrix corresponding to a desired movement angle of the robot's ankle; Obtain a fourth vector by subtracting the first vector from the product of the rotation matrix and the second vector; Performing motion calculation based on the vector modulus of the fourth vector and the third vector to obtain the expected displacement of the linear motor; The linear motor is controlled to move according to the desired displacement.
2. The method according to claim 1, characterized in that: The expected movement angle includes a first expected rotation angle of the ankle of the robot in a first direction, and a second expected rotation angle of the ankle joint in a second direction; The step of obtaining the rotation matrix of the desired movement angle of the ankle of the robot comprises: A first rotation matrix of the first desired rotation angle and a second rotation matrix of the second desired rotation angle are obtained.
3. The method according to claim 2, characterized in that The step of obtaining a fourth vector by subtracting the first vector from the product of the rotation matrix and the second vector comprises: multiplying the first rotation matrix and the second rotation matrix to obtain a first multiplication result; Multiplying the first multiplication result and the second vector to obtain a second multiplication result; The second multiplication result is subtracted from the first vector, and the obtained subtraction result is used as a fourth vector.
4. The method according to claim 1, characterized in that The performing motion calculation based on the vector modulus of the fourth vector and the third vector to obtain the expected displacement of the linear motor includes: respectively determining vector norms of the fourth vector and the third vector; The vector modulus of the fourth vector and the vector modulus of the third vector are subtracted, and the subtraction result is used as the expected displacement of the linear motor.
5. The method according to any one of claims 1 to 4, characterized in that: After controlling the linear motor to move according to the desired displacement, the method further includes: measuring the actual movement angle of the ankle of the robot; determining an angular error between the actual movement angle and the desired movement angle; If the angle error is less than a preset angle error threshold, it is determined that the motion control of the ankle of the robot is completed.
6. A robot motion control device, characterized in that: The device comprises: An extraction module is used to extract point data of the robot leg, wherein the point data includes: a first point, a second point and a third point, the first point is a rotation center point of the robot's ankle rotating in a first direction, the second point is a rotation center point of an end of the ankle's linear motor close to the knee joint and connected to the knee joint for rotation, and the third point is an end of the linear motor away from the knee joint and connected to the ankle joint to control the rotation center point of the ankle joint in a second direction; A construction module, configured to construct a first vector pointing from the first point to the second point, a second vector pointing from the first point to the third point, and a third vector pointing from the second point to the third point; The acquisition module is further used to acquire the rotation matrix corresponding to the expected movement angle of the ankle of the robot; A calculation module, used for obtaining a fourth vector by subtracting the first vector from the product of the rotation matrix and the second vector; A motion calculation module, used for performing motion calculation based on the vector modulus of the fourth vector and the third vector to obtain a desired displacement of the linear motor; A control module is used to control the linear motor to move according to the expected displacement.
7. An electronic device, characterized in that: include: A memory for storing computer executable instructions or computer programs; The processor is used to implement the robot motion control method described in any one of claims 1 to 5 when executing the computer executable instructions or computer programs stored in the memory.
8. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer programs are executed by a processor, the robot motion control method according to any one of claims 1 to 5 is implemented.
9. A computer program product comprising computer executable instructions or a computer program, characterized in that When the computer executable instructions or computer programs are executed by a processor, the robot motion control method according to any one of claims 1 to 5 is implemented.