Motion control method and system of table tennis robot and storage medium

文档序号:1839484 发布日期:2021-11-16 浏览:5次 中文

阅读说明:本技术 一种乒乓球机器人的运动控制方法、系统及存储介质 (Motion control method and system of table tennis robot and storage medium ) 是由 胡晓屹 毛越 于 2021-08-04 设计创作,主要内容包括:本发明公开了一种乒乓球机器人的运动控制方法、系统及存储介质,其中方法包括:获取击球参数;根据机器人逆运动学模型将位姿数据转换为对应于各关节的关节位置;根据机器人微分运动学模型将速度数据转换为对应于各关节的关节速度;根据关节位置与关节速度对乒乓机器人进行轨迹规划得到各关节的运动参数;根据机器人动力学模型将各关节的运动参数转换为驱动扭矩数据;根据驱动扭矩数据驱动乒乓机器人的各关节运转。本发明针对乒乓球机器人运用解析法给出了机器人逆运动学模型,从而使该机器人求逆解的速度与精确度与其他方法比有较大优势,可提升乒乓球机器人的响应速度,使得乒乓球机器人具有较强的回合对战能力,能被应用于更专业的场合。(The invention discloses a motion control method, a system and a storage medium of a table tennis robot, wherein the method comprises the following steps: obtaining batting parameters; converting the pose data into joint positions corresponding to each joint according to the inverse kinematics model of the robot; converting the velocity data into joint velocities corresponding to the joints according to the differential kinematics model of the robot; performing trajectory planning on the ping-pong robot according to the joint position and the joint speed to obtain motion parameters of each joint; converting the motion parameters of each joint into driving torque data according to a robot dynamics model; and driving each joint of the ping-pong robot to operate according to the driving torque data. The invention provides the inverse kinematics model of the robot aiming at the table tennis robot by applying an analytical method, so that the inverse solution speed and the inverse solution accuracy of the robot have greater advantages compared with other methods, the response speed of the table tennis robot can be improved, the table tennis robot has stronger round fighting capacity, and the table tennis robot can be applied to more professional occasions.)

1. A method of controlling the motion of a table tennis robot, the method comprising:

obtaining batting parameters, wherein the batting parameters comprise pose data and speed data of a racket when batting is executed;

converting the pose data into joint positions corresponding to all joints according to an inverse kinematics model of the robot, wherein the joint positions are angles or displacements;

converting the velocity data into joint velocities corresponding to the joints according to a differential kinematics model of the robot;

performing trajectory planning on the ping-pong robot according to the joint position and the joint speed to obtain motion parameters of each joint, wherein the motion parameters comprise acceleration, speed and position corresponding to the joint at different moments;

converting the motion parameters of each joint into driving torque data according to a robot dynamics model;

and driving each joint of the ping-pong robot to operate according to the driving torque data so as to execute a batting task.

2. The method of claim 1, wherein the ping-pong robot is a six-joint robot, and the configuration space thereof is described as E2×S2×S2

3. The motion control method of a table tennis robot according to claim 2, wherein the table tennis robot comprises a mobile station attached to two mobile joints, a robot arm attached to the mobile station, and a paddle attached to an execution end of the robot arm, and the robot arm comprises four rotary joints; the positive kinematics model of the table tennis robot is as follows:

wherein:

a homogeneous transformation matrix from the racket to a base coordinate of the table tennis robot; l is1、L2、L4The connecting rod offsets of the 3 rd, 5 th and 6 th joints respectively; l is3The length of the connecting rod of the 5 th joint; d1And d2The joint displacement of the two translation joints respectively; c. CiIs cos (theta)i) Abbreviation of siIs sin (theta)i) The abbreviation of (1); thetaiIs the joint angle of the ith joint, i is 3,4,5, 6; s4+5Is sin (theta)45) Abbreviations of (a); c. C4+5Is cos (theta)45) Abbreviations of (a);

the converting the pose data into joint positions corresponding to the joints according to the inverse kinematics model of the robot includes:

acquiring the pose data in the form of:wherein: n isx、ny、nz、ox、oy、oz、ax、ay、az、px、py、pzAre all known numbers;

according toAndthe joint position of each joint is calculated according to the corresponding relation to obtain:

4. the motion control method of a table tennis robot according to claim 3, wherein the converting the velocity data into joint velocities corresponding to respective joints according to a robot differential kinematics model comprises:

according to the formulaCalculating joint speed of each joint; wherein:

θ is a matrix containing the joint positions of each joint; v is a matrix containing the joint velocities of each joint; j. the design is a square-1Is an inverse matrix of J, and J is a Jacobian matrix of the table tennis robot,

5. the method for controlling the motion of the table tennis robot according to claim 3, wherein the planning the trajectory of the table tennis robot according to the joint position and the joint speed to obtain the motion parameters of each joint comprises:

calculating all unknown parameters in the trajectory equation according to the trajectory equation and the constraint conditions to obtain an exact motion trajectory;

and calculating the motion parameters of the joints according to the motion tracks.

6. The method of claim 5, wherein the trajectory equation is θ (t) at5+bt4+ct3+dt2+ et + f, t is time, a, b, c, d, e, f are unknown parameters; the constraint conditions include: initial acceleration a0Initial velocity v0Initial joint angleTerminal acceleration a1Terminal velocity v1Angle of the end jointThis gives:

wherein, tfThe time taken to execute the motion profile.

7. A motion control system of a table tennis robot, comprising:

the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring batting parameters, and the batting parameters comprise pose data and speed data of a racket when batting is executed;

a first calculation module for converting the pose data into joint positions corresponding to respective joints according to an inverse kinematics model of the robot, the joint positions being angles or displacements;

a second calculation module for converting the velocity data into joint velocities corresponding to the respective joints according to a differential kinematics model of the robot;

the track planning module is used for carrying out track planning on the ping-pong robot according to the joint position and the joint speed to obtain motion parameters of each joint, wherein the motion parameters comprise the acceleration, the speed and the position corresponding to the joint at different moments;

the torque calculation module is used for converting the motion parameters of all joints into driving torque data according to the robot dynamic model;

and the driving module is used for driving each joint of the ping-pong robot to operate according to the driving torque data so as to execute a batting task.

8. A storage medium having stored therein an executable program which, when executed by a processor, is capable of implementing a table tennis robot motion control method according to any one of claims 1-6.

Technical Field

The invention relates to the technical field of robots, in particular to a table tennis robot motion control method, a table tennis robot motion control system and a storage medium.

Background

The table tennis robot is a robot capable of playing multi-turn table tennis with human beings, can be used for training professional athletes and performing interactive fighting with amateurs, and is more and more popular under the condition that the domestic table tennis sport is widely popularized. The motion control algorithm of the existing table tennis robot mainly comprises a Newton-Raffson method and a geometric method, wherein the Newton-Raffson method is mainly used for solving in an iterative mode when the inverse kinematics of the robot is solved, and the method has the main defect that the iteration success can be realized only when the estimated initial value is close to the correct answer of the inverse solution as much as possible. When the inverse kinematics model of the robot is analyzed by a geometric method, the inverse kinematics analysis needs to be carried out by combining the geometric configuration of the robot, otherwise, the problem of solution missing easily occurs.

Disclosure of Invention

The purpose of the invention is as follows: in order to overcome the defects in the prior art, the invention provides a table tennis robot motion control method, system and storage medium with high solving speed and accuracy.

The technical scheme is as follows: in order to achieve the above object, a method for controlling the motion of a table tennis robot according to the present invention comprises:

obtaining batting parameters, wherein the batting parameters comprise pose data and speed data of a racket when batting is executed;

converting the pose data into joint positions corresponding to all joints according to an inverse kinematics model of the robot, wherein the joint positions are angles or displacements;

converting the velocity data into joint velocities corresponding to the joints according to a differential kinematics model of the robot;

performing trajectory planning on the ping-pong robot according to the joint position and the joint speed to obtain motion parameters of each joint, wherein the motion parameters comprise acceleration, speed and position corresponding to the joint at different moments;

converting the motion parameters of each joint into driving torque data according to a robot dynamics model;

and driving each joint of the ping-pong robot to operate according to the driving torque data so as to execute a batting task.

Further, the table tennis robot is a six-joint machineA robot whose configuration space is described as E2×S2×S2

The table tennis robot is further provided with a mobile station arranged on two mobile joints, a manipulator arranged on the mobile station and a racket arranged at the execution tail end of the manipulator, wherein the manipulator comprises four rotary joints; the positive kinematics model of the table tennis robot is as follows:

wherein:

a homogeneous transformation matrix from the racket to a base coordinate of the table tennis robot; l is1、L2、L4The connecting rod offsets of the 3 rd, 5 th and 6 th joints respectively; l is3The length of the connecting rod of the 5 th joint; d1And d2The joint displacement of the two translation joints respectively; c. CiIs cos (theta)i) Abbreviation of siIs sin (theta)i) The abbreviation of (1); thetaiIs the joint angle of the ith joint, i is 3,4,5, 6; s4+5Is sin (theta)45) Abbreviations of (a); c. C4+5Is cos (theta)45) Abbreviations of (a);

the converting the pose data into joint positions corresponding to the joints according to the inverse kinematics model of the robot includes:

acquiring the pose data in the form of:wherein: n isx、ny、nz、ox、oy、oz、ax、ay、az、px、py、pzAre all known numbers;

according toAndthe joint position of each joint is calculated according to the corresponding relation to obtain:

further, the converting the velocity data into joint velocities corresponding to the joints according to the robot differential kinematics model includes:

according to the formulaCalculating joint speed of each joint; wherein:

θ is a matrix containing the joint positions of each joint; v is a matrix containing the joint velocities of each joint; j. the design is a square-1Is an inverse matrix of J, and J is a Jacobian matrix of the table tennis robot,

further, the obtaining of the motion parameters of each joint by performing trajectory planning on the table tennis robot according to the joint position and the joint speed includes:

calculating all unknown parameters in the trajectory equation according to the trajectory equation and the constraint conditions to obtain an exact motion trajectory;

and calculating the motion parameters of the joints according to the motion tracks.

Further, the trajectory equation is θ (t) at5+bt4+ct3+dt2+ et + f, t is time, a, b, c, d, e, f are unknown parameters; the constraint conditions include: initial acceleration a0Initial velocity v0Initial joint angleTerminal acceleration a1Terminal velocity v1Angle of the end jointThis gives:

wherein, tfThe time taken to execute the motion profile.

A motion control system of a table tennis robot, comprising:

the system comprises an acquisition module, a processing module and a display module, wherein the acquisition module is used for acquiring batting parameters, and the batting parameters comprise pose data and speed data of a racket when batting is executed;

a first calculation module for converting the pose data into joint positions corresponding to respective joints according to an inverse kinematics model of the robot, the joint positions being angles or displacements;

a second calculation module for converting the velocity data into joint velocities corresponding to the respective joints according to a differential kinematics model of the robot;

the track planning module is used for carrying out track planning on the ping-pong robot according to the joint position and the joint speed to obtain motion parameters of each joint, wherein the motion parameters comprise the acceleration, the speed and the position corresponding to the joint at different moments;

the torque calculation module is used for converting the motion parameters of all joints into driving torque data according to the robot dynamic model;

and the driving module is used for driving each joint of the ping-pong robot to operate according to the driving torque data so as to execute a batting task.

A storage medium having stored therein an executable program which, when executed by a processor, is capable of implementing the above-described method of motion control of a table tennis robot.

Has the advantages that: the motion control method, the motion control system and the storage medium of the table tennis robot provide the inverse kinematics model of the robot aiming at the table tennis robot by using an analytic method, so that the speed and the accuracy of the inverse solution of the robot have greater advantages compared with other methods, the response speed of the table tennis robot can be increased, the table tennis robot has stronger round fighting capacity, and the table tennis robot can be applied to more professional occasions.

Drawings

FIG. 1 is a schematic flow chart of a motion control method of a table tennis robot;

FIG. 2 is a structural diagram of a table tennis robot;

fig. 3 is a schematic diagram showing a motion control system of the table tennis robot.

Detailed Description

The present invention will be further described with reference to the accompanying drawings.

The motion control method of the table tennis robot is applied to the control of the multi-joint table tennis robot and is implemented by a control system of the table tennis robot. Specifically, as shown in fig. 1, the control method includes the following steps S101 to S106:

step S101, obtaining batting parameters, wherein the batting parameters comprise pose data and speed data of a racket during batting;

in this step, the hitting parameters are used to instruct the table tennis robot to move the racket to what position and at what posture and at what speed. When the control system is a lower computer which can only control the table tennis, the batting parameter data is obtained from the upper computer for decision making; when the control system is a global control system with a decision-making function, the batting parameters are generated by the control system according to batting data of the opponent and are obtained according to a preset algorithm.

Step S102, converting the pose data into joint positions corresponding to each joint according to an inverse kinematics model of the robot, wherein the joint positions are angles or displacements;

step S103, converting the speed data into joint speeds corresponding to all joints according to a robot differential kinematics model;

step S104, performing trajectory planning on the ping-pong robot according to the joint position and the joint speed to obtain motion parameters of each joint, wherein the motion parameters comprise acceleration, speed and position corresponding to the joint at different moments;

step S105, converting the motion parameters of each joint into driving torque data according to a robot dynamic model;

and step S106, driving each joint of the ping-pong robot to operate according to the driving torque data so as to execute a batting task.

The above steps S101 to S106 can be used for motion control of any multi-joint table tennis robot, and the motion control of the table tennis robot is described in detail in the present application by taking the table tennis robot as an example as shown in fig. 2.

The table tennis robot shown in fig. 2 is a six-joint robot, the configuration space of which is depicted as E2×S2×S2Two moving joints are adopted to form movement on a Cartesian space plane, the plane is provided with four rotating joints, and joint shafts of the rotating joints are intersected at one point in pairs.

Specifically, the table tennis robot comprises a moving platform 3 installed on two moving joints, a manipulator 4 installed on the moving platform 3, and a racket 5 installed at the executing end of the manipulator 4, wherein the two moving joints are a first straight line module 1 and a second straight line module 2 respectively, and the driving directions of the first straight line module 1 and the second straight line module 2 are perpendicular to each other, so that the moving platform 3 performs biaxial translation motion, specifically, the second straight line module 2 is installed on a translation unit of the first straight line module 1, and the moving platform 3 is installed on a translation unit of the second straight line module 2. The manipulator 4 comprises four rotary joints, the four rotary joints comprise a base body 4-1, a rotary seat 4-2, a first arm part 4-3, a second arm part 4-4 and a third arm part 4-5, the five rotary joints are sequentially connected in pairs from front to back to form the rotary joints, and each rotary joint is driven by a motor to operate; the racket 5 is rotatably mounted on the third arm 4-5, and the rotation between the two is driven by the end motor.

In this embodiment, the following six joints in the table tennis robot are taken as control objects, which are respectively: a translational joint of the first linear module 1, a translational joint of the second linear module 2, a rotational joint between the base body 4-1 and the rotary base 4-2, a rotational joint between the first arm 4-3 and the second arm 4-4, a rotational joint between the second arm 4-4 and the third arm 4-5, and a rotational joint between the third arm 4-5 and the racket 5. The six joints are numbered as 1, 2, 3,4,5 and 6 from front to back in sequence.

The translation directions of the 1 st joint and the 2 nd joint are mutually vertical, the translation direction of the 2 nd joint is perpendicular to the rotating shaft of the 3 rd joint, the rotating shafts of the 4 th joint and the 5 th joint are mutually vertical, the rotating shafts of the 4 th joint and the 5 th joint are perpendicular to the rotating shaft of the 3 rd joint, and the translation direction of the 6 th joint is perpendicular to the rotating shaft of the 5 th joint.

Further, the first arm portion 4-3, the second arm portion 4-4 and the third arm portion 4-5 have arm lengths L, respectively1、L2And L3The ideal hitting point (i.e. the central position of the racket) of the racket 5 is deviated from the 5 th joint rotation axis by a distance L4

The DH parameters of the table tennis robot are obtained as shown in the following table:

in the above table, i is the joint number; diIs along zi-1Axial direction (z-axis direction in coordinate system of i-1 th joint) i-1 coordinate system origin to xiThe distance of the axis (x-axis in the coordinate system of the ith joint), referred to simply as the link offset; thetaiIs xi-1Axis and xiBetween the shaftsWith respect to zi-1The angle of (d) is referred to as the joint angle for short; a isiIs along xiAxis, zi-1Axis and ziThe distance between the shafts is called the connecting rod distance for short; alpha is alphaiIs zi-1Axis and ziBetween axes with respect to xiThe angle of the shaft is called the connecting rod torsion angle for short.

According to the table, the positive kinematics model of the table tennis robot is obtained as follows:

wherein:is a transformation matrix from the coordinate system of the ith joint to the coordinate system of the (i-1) th joint, and the 0 th coordinate system is a base coordinate;a conversion matrix from the racket to the base coordinate of the table tennis robot;

namely, the positive kinematics model of the table tennis robot is represented;can be disassembled into:

wherein:

in the above formula, L1、L2、L4Actually represents the link offset of the 3 rd, 5 th and 6 th joints; l is3The length of the connecting rod of the 5 th joint; d1And d2The joint displacement of the two translation joints respectively; c. CiIs cos (theta)i) Abbreviation of siIs sin (theta)i) The abbreviation of (1); thetaiIs the joint angle of the ith joint, i is 3,4,5, 6; s4+5Is sin (theta)45) Abbreviations of (a); c. C4+5Is cos (theta)45) Abbreviations of (a);

based on this, the conversion of the pose data into joint positions corresponding to the respective joints according to the inverse kinematics model of the robot in the above-described step S102 includes the following steps S201 to S202:

step S201, acquiring the pose data;

in this step, the pose data is in the form of:which represents the target position and pose of the racquet 5, wherein: n isx、ny、nz、ox、oy、oz、ax、ay、az、px、py、pzAre all known numbers;

step S202, according toAndthe joint positions of the respective joints are calculated from the correspondence relationship of (a).

In this step, the specific calculation process is as follows:

(1) first solve for theta45Obtaining:

θ45=arccos(-az);

(2) solving for theta6Obtaining:

(3) solving for theta3Obtaining:

(4) solving for theta4Obtaining:

(5) solving for theta5Obtaining:

(6) solving for d1Obtaining:

d1=-py-L2s3-L3c3c4-L4c3c4c5-L4c3c5s4

(7) solving for d2Obtaining:

d2=px-(-L2c3+L3c4s3+L4c4s3s5+L4c5s3s4)。

further, the converting the velocity data into joint velocities corresponding to the respective joints according to the robot differential kinematics model in step S103 above includes:

according to the formulaCalculating joint speed of each joint; wherein:

θ is a matrix containing the joint positions of each joint; v is a matrix containing the joint velocities of each joint; j. the design is a square-1Is an inverse matrix of J, and J is a Jacobian matrix of the table tennis robot,

further, the step S104 of planning the trajectory of the table tennis robot according to the joint position and the joint speed to obtain the motion parameters of each joint includes the following steps S301 to S302:

step S301, calculating all unknown parameters in the trajectory equation according to the trajectory equation and constraint conditions to obtain an exact motion trajectory;

step S302, calculating the motion parameters of each joint according to the motion trail.

Specifically, the trajectory equation is θ (t) ═ at5+bt4+ct3+dt2+ et + f, t is time, a, b, c, d, e, f are unknown parameters; the constraint conditions include: initial acceleration a0Initial velocity v0Initial joint angleTerminal acceleration a1Terminal velocity v1Angle of the end jointThis gives:

wherein, tfThe time taken to execute the motion profile.

The present invention also provides a motion control system 400 of a table tennis robot, wherein the motion control system 400 may include or be divided into one or more program modules, and the one or more program modules are stored in a storage medium and executed by one or more processors to implement the present invention and implement the motion control method of the table tennis robot. The program module referred to in the embodiments of the present invention refers to a series of computer program instruction segments capable of performing specific functions, and is more suitable for describing the execution process of the motion control method of the table tennis robot in a storage medium than the program itself. The following description will specifically describe the functions of the program modules of the embodiment, and as shown in fig. 3, the motion control system 400 of the table tennis robot includes:

an obtaining module 401, configured to obtain ball hitting parameters, where the ball hitting parameters include pose data and speed data of a racket when a ball hitting action is performed;

a first computing module 402 for transforming the pose data into joint positions corresponding to joints, the joint positions being angles or displacements, according to an inverse kinematics model of the robot;

a second calculation module 403 for converting the velocity data into joint velocities corresponding to the joints according to a differential kinematics model of the robot;

a trajectory planning module 404, configured to perform trajectory planning on the ping-pong robot according to the joint position and the joint velocity to obtain motion parameters of each joint, where the motion parameters include acceleration, velocity, and position corresponding to the joint at different times;

a torque calculation module 405 for converting motion parameters of each joint into driving torque data according to a robot dynamics model;

and the driving module 406 is used for driving each joint of the ping-pong robot to operate according to the driving torque data so as to execute a ball hitting task.

The above-mentioned motion control method for implementing the table tennis robot based on the motion control system 400 has been described in detail above, and reference may be made to the above-mentioned corresponding contents, which are not described herein again.

The present invention also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., in which an executable program is stored, which, when executed by a processor, can implement the above-described motion control method of the ping-pong robot.

The motion control method, the motion control system and the storage medium of the table tennis robot provide the inverse kinematics model of the robot aiming at the table tennis robot by using an analytic method, so that the speed and the accuracy of the inverse solution of the robot have greater advantages compared with other methods, the response speed of the table tennis robot can be increased, the table tennis robot has stronger round fighting capacity, and the table tennis robot can be applied to more professional occasions.

The above description is only of the preferred embodiments of the present invention, and it should be noted that: it will be apparent to those skilled in the art that various modifications and adaptations can be made without departing from the principles of the invention and these are intended to be within the scope of the invention.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种机械臂拼接路径规划方法及装置

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!