Method and device for compensating motion trail of robot and computer storage medium

文档序号:1808202 发布日期:2021-11-09 浏览:11次 中文

阅读说明:本技术 机器人运动轨迹的补偿方法、装置及计算机存储介质 (Method and device for compensating motion trail of robot and computer storage medium ) 是由 张志明 于 2020-05-09 设计创作,主要内容包括:本申请公开了一种机器人运动轨迹的补偿方法、装置及计算机存储介质,该方法用于补偿机器人对工件进行加工的运动轨迹,其包括:获取运动轨迹的插补轨迹,其中,插补轨迹包括多个插补点;获取偏移量,并利用偏移量对多个插补点中的第一插补点进行补偿,得到第二插补点,其中,偏移量为在每个第一插补点对应的时刻机器人的加工中心与工件的距离;根据第二插补点补偿机器人加工工件的运动轨迹。通过上述方式,本申请能够对机器人运动轨迹的插补点进行实时补偿,提高插补精度。(The application discloses a method, a device and a computer storage medium for compensating the motion trail of a robot, wherein the method is used for compensating the motion trail of the robot for processing a workpiece and comprises the following steps: obtaining an interpolation track of the motion track, wherein the interpolation track comprises a plurality of interpolation points; acquiring offset, and compensating a first interpolation point in the plurality of interpolation points by using the offset to obtain a second interpolation point, wherein the offset is the distance between the machining center of the robot and the workpiece at the moment corresponding to each first interpolation point; and compensating the motion trail of the robot for processing the workpiece according to the second interpolation point. By means of the method, the interpolation points of the motion track of the robot can be compensated in real time, and interpolation precision is improved.)

1. A method for compensating a motion trail of a robot, which is used for compensating the motion trail of the robot for processing a workpiece, is characterized by comprising the following steps:

obtaining an interpolation track of the motion track, wherein the interpolation track comprises a plurality of interpolation points;

acquiring offset, and compensating a first interpolation point in the plurality of interpolation points by using the offset to obtain a second interpolation point, wherein the offset is the distance between the machining center of the robot and the workpiece at the moment corresponding to each first interpolation point;

and compensating the motion trail of the robot for processing the workpiece according to the second interpolation point.

2. The compensation method of claim 1, wherein the compensating a first interpolation point of the plurality of interpolation points using the offset to obtain a second interpolation point comprises:

transforming the offset in the tool coordinate system into a workpiece coordinate system to obtain a transformed offset;

and superposing the transformation offset and the corresponding first interpolation point to obtain the second interpolation point.

3. The compensation method of claim 2, wherein the compensating the motion trajectory of the robot for processing the workpiece according to the second interpolation point comprises:

and planning the speed by using the offset, the first interpolation point and the second interpolation point to obtain the motion trail of the current compensation time.

4. The compensation method of claim 3, wherein the velocity planning using the offset, the first interpolation point, and the second interpolation point to obtain the motion trajectory of the current compensation time comprises:

calculating parameters of a preset time-distance function by using the first position, the first speed, the first acceleration, the second position, the second speed, the second acceleration, the compensation time and the preset time-distance function,

the first position is the position of the first interpolation point after the current compensation time, the second position is the sum of the first position and the current offset, the compensation time is the time from the first position to the second position, the first speed and the first acceleration are respectively the speed and the acceleration corresponding to the first position, the second speed and the second acceleration are respectively the speed and the acceleration corresponding to the second position, and the preset time distance function is the functional relation between the motion time and the distance moved in the motion time;

utilizing the parameters of the preset time distance function, the first position and the second position to plan a track from the first position to the second position;

and obtaining the motion track by using the track from the first position to the second position and the interpolation track.

5. The compensation method of claim 3, further comprising:

processing the second interpolation points to obtain the angle of each joint axis of the robot;

and controlling the robot according to the angle of each joint shaft so that the robot processes the workpiece.

6. The compensation method of claim 2, wherein transforming the offset in the tool coordinate system into the workpiece coordinate system, resulting in a transformed offset comprises:

and cross-multiplying the offset with the rotation matrix of the attitude of the first interpolation point to obtain the transformation offset.

7. The compensation method of claim 1, wherein the obtaining the offset comprises:

and acquiring the offset through a distance meter.

8. The compensation method of claim 1, wherein the obtaining an interpolated trajectory of the motion trajectory comprises:

and receiving a preset starting point and a preset end point, planning a linear track from the preset starting point to the preset end point, and recording the linear track as the interpolation track.

9. An apparatus for compensating a robot motion trajectory, comprising a memory and a processor connected to each other, wherein the memory is used for storing a computer program, and the computer program is used for implementing the method for compensating a robot motion trajectory according to any one of claims 1 to 8 when the computer program is executed by the processor.

10. A computer storage medium for storing a computer program, characterized in that the computer program, when being executed by a processor, is adapted to carry out the method of compensation of a robot motion trajectory according to any one of claims 1-8.

Technical Field

The present application relates to the field of robotics, and in particular, to a method and an apparatus for compensating a motion trajectory of a robot, and a computer storage medium.

Background

In an industrial application of a robot, there is an application that may require a Tool Center Point (TCP) of the robot to move a machining along an irregular surface, such as a spraying, polishing or cleaning application, which may use a method of automatically generating a path by introducing modeling to complete the machining when obtaining a model of a machined workpiece;

however, in the upstream and downstream of the industry, it is often not easy to obtain a model of the workpiece to be machined, and the model can be solved by manual teaching, but if the surface of the workpiece is complicated, the teaching time is long, and the teaching needs to be repeated after the workpiece is replaced, so that it is necessary to study how to follow the irregular surface of the workpiece to be machined.

Disclosure of Invention

The application provides a compensation method and device for a robot motion track and a computer storage medium, which are used for compensating interpolation points of the robot motion track in real time and improving interpolation precision.

In order to solve the above technical problem, a first aspect of the present application provides a robot welding control method for compensating a motion trajectory of a robot for processing a workpiece, including: obtaining an interpolation track of the motion track, wherein the interpolation track comprises a plurality of interpolation points; acquiring offset, and compensating a first interpolation point in the plurality of interpolation points by using the offset to obtain a second interpolation point, wherein the offset is the distance between the machining center of the robot and the workpiece at the moment corresponding to each first interpolation point; and compensating the motion trail of the robot for processing the workpiece according to the second interpolation point.

Based on the first aspect of the present application, a first implementation manner of the first aspect of the present application includes: converting the offset in the tool coordinate system into a workpiece coordinate system to obtain a conversion offset; and superposing the transformation offset and the corresponding first interpolation point to obtain a second interpolation point.

And transforming the offset from the tool coordinate system to the workpiece coordinate system by using coordinate transformation so as to be conveniently added with the first interpolation point positioned under the workpiece coordinate system to obtain the position of the second interpolation point.

Based on the first aspect of the present application to the first implementation manner of the first aspect, a second implementation manner of the first aspect of the present application includes: and planning the speed by using the offset, the first interpolation point and the second interpolation point to obtain the motion trail of the current compensation time.

Through speed planning, the compensation precision of the motion trail can be controlled, the situation that the performance of the robot cannot be achieved due to the fact that the following surface changes too fast is prevented, and the following precision is improved.

Based on the first aspect of the present application to the first implementation manner and the second implementation manner of the first aspect, in a third implementation manner of the first aspect of the present application, the obtaining the motion trajectory of the current compensation time by using the offset, the first interpolation point, and the second interpolation point for speed planning includes:

calculating parameters of a preset time-distance function by using the first position, the first speed, the first acceleration, the second position, the second speed, the second acceleration, the compensation time and the preset time-distance function,

the first position is the position of a first interpolation point after the current compensation time, the second position is the sum of the first position and the current offset, the compensation time is the time from the first position to the second position, the first speed and the first acceleration are respectively the speed and the acceleration corresponding to the first position, the second speed and the second acceleration are respectively the speed and the acceleration corresponding to the second position, and the preset time distance function is the functional relation between the movement time and the distance moved in the movement time;

planning a track from the first position to the second position by using the parameter of the preset time distance function, the first position and the second position;

and obtaining a motion track by using the track from the first position to the second position and the interpolation track.

Based on the first to third implementation manners of the first to third aspects of the present application, a sixth implementation manner of the first aspect of the present application includes: processing the second interpolation points to obtain the angle of each joint axis of the robot; and controlling the robot according to the angle of each joint shaft so that the robot processes the workpiece.

After the second interpolation point is calculated, the rotation angle of each joint shaft of the robot can be obtained by processing the second interpolation point so as to control the robot, so that the robot operates on the workpiece.

Based on the first to fourth implementation manners of the first aspect to the first aspect of the present application, a fourth implementation manner of the first aspect of the present application includes: and cross-multiplying the offset with the rotation matrix of the attitude of the first interpolation point to obtain a transformation offset.

And the offset under the tool coordinate system is multiplied by the rotation matrix to complete coordinate conversion so as to conveniently compensate the first interpolation point.

Based on the first to fifth implementation manners of the first aspect to the first aspect of the present application, a fifth implementation manner of the first aspect of the present application includes: the offset is obtained by the rangefinder.

The distance meter can monitor the position of the machining center and the surface to be followed in real time, and the current offset can be obtained by analyzing the signal sent by the distance meter so as to compensate in real time by using the offset.

Based on the first to sixth implementation manners of the first to third aspects of the present application, a seventh implementation manner of the first aspect of the present application includes: and receiving a preset starting point and a preset end point, planning a linear track from the preset starting point to the preset end point, and recording the linear track as an interpolation track.

And obtaining an interpolation track from the starting point to the end point through a preset starting point and a preset end point so as to compensate the interpolation track.

The second aspect of the present application provides a device for compensating a motion trail of a robot, which includes a memory and a processor connected to each other, wherein the memory is used for storing a computer program, and the computer program is used for implementing the method for compensating a motion trail of a robot when being executed by the processor.

A third aspect of the present application provides a computer storage medium for storing a computer program, which when executed by a processor, is used for implementing the above-mentioned method for compensating a motion trajectory of a robot.

Through the scheme, the beneficial effects of the application are that: the planned original interpolation track is a linear track, and for an irregular curved surface, the linear track needs to be converted into a curved track, so that the original interpolation point needs to be compensated; the received offset and the first interpolation point are processed to generate a second interpolation point, so that the robot can compensate the current first interpolation point along with the offset on the basis of the interpolation track, the following offset compensation is realized, the interpolation precision is improved, the robot is controlled more accurately, and the operation precision of the robot is improved.

Drawings

In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts. Wherein:

FIG. 1 is a schematic view of a coordinate system of a robot provided herein;

FIG. 2 is a schematic view of a robot provided by the present application following sensor movements;

fig. 3 is a schematic flowchart of an embodiment of a method for compensating a motion trajectory of a robot provided in the present application;

fig. 4 is a schematic flowchart of another embodiment of a method for compensating a motion trajectory of a robot provided in the present application;

FIG. 5 is a schematic view of the embodiment shown in FIG. 4 with the robot following the movement of the laser rangefinder;

FIG. 6 is a schematic flow chart of step 44 in the embodiment shown in FIG. 4;

FIG. 7 is a schematic diagram of the movement of TCP points in the embodiment shown in FIG. 4;

fig. 8 is a schematic structural diagram of an embodiment of a device for compensating a motion trajectory of a robot provided by the present application;

fig. 9 is a schematic structural diagram of another embodiment of a device for compensating a motion trajectory of a robot provided by the present application;

FIG. 10 is a schematic structural diagram of an embodiment of a computer storage medium provided in the present application.

Detailed Description

The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.

In a robot control system, continuous track planning in a Cartesian space is performed on the motion of a TCP point, the track is controlled in an interpolation mode, the motion track of a robot can be regarded as a set of track points, each track point contains position and posture information of the robot, and the representation mode of the motion track comprises the following steps: the three-dimensional coordinates are related to the euler angles (x, y, z, a, b, c) or homogeneous matrices.

(X, Y, Z) is the position of the TCP point in the three-dimensional coordinate system, and (a, b, c) is euler angle information of the pose, as shown in fig. 1, the coordinate system composed of X-Y-Z represents six-axis poses (position and pose) of the robot, the position of the coordinate system in the base coordinate system (Xbase-Ybase-Zbase) can be represented as (X, Y, Z), the flip in the base coordinate system represents the pose, and can be represented by euler angles (a, b, c), and an asymmetric euler angle ZYX can be used in the present application.

The homogeneous matrix may be represented as:

wherein X, Y and Z are the positions of TCP points in the basic coordinate system, Xx、Xy、Xz、Yx、Yy、Yz、Zx、ZyAnd ZzRepresenting the corresponding poses, respectively (x, y, z) in the three-dimensional coordinates of the base coordinate system.

Analysis of the application of TCP point moving machining along irregular surfaces has found that there are two common features of such applications: firstly, the TCP point keeps moving in one direction, and secondly, the TCP point has a certain distance with the surface of a workpiece to be processed, and the distance between the TCP point and the surface of the workpiece cannot be close or far; the TCP point keeps moving in one direction is the basic function of the robot, so that the application can be realized only by finishing the second point; since the robot needs to know the information of the processed workpiece, a position sensor is installed near the TCP point, and the position of the TCP point and the surface of the processed workpiece can be obtained by one or more position sensors.

In the prior art, if a TCP point is compensated by following an external signal, a position sensor needs to be placed in front of the running direction of the TCP point, and the movement of the robot is completed by adopting a small-segment approximation method, for example, as shown in fig. 2, the TCP point moves to a point P1, the position sensor moves to a point P2, the TCP point moves to a point P2, the position sensor moves to a point P3, and the like; this approach has two significant disadvantages: firstly, the position sensor is required to be arranged at the front end of the advancing direction, the next point of TCP point operation is the position of the position sensor, and if the machined workpiece needs to be scanned back and forth, the flange of the robot is required to turn, so that the working efficiency is reduced; secondly, when planning the next point, the robot needs to stop moving, so that when some spraying operation is carried out, the spraying is not uniform because of no uniform motion.

Referring to fig. 3, fig. 3 is a schematic flowchart illustrating an embodiment of a method for compensating a motion trajectory of a robot, the method being used for compensating a motion trajectory of a workpiece processed by the robot, and including the following steps:

step 31: and obtaining an interpolation track of the motion track.

The interpolation trajectory is a trajectory obtained by performing a preliminary interpolation on a processed motion trajectory (i.e., an original interpolation trajectory), such as a linear trajectory, and may include a plurality of interpolation points, and an interpolation point of the plurality of interpolation points may be referred to as a first interpolation point.

Further, the interpolation trajectory may be a trajectory directly received, for example, a position where the interpolation trajectory is received, or a trajectory calculated according to received data, for example, a function expression of a preset starting point, a preset end point, and an interpolation trajectory is received, and the position of each interpolation point on the interpolation trajectory is calculated by using the received data.

Step 32: and acquiring an offset, and compensating a first interpolation point in the plurality of interpolation points by using the offset to obtain a second interpolation point.

The offset is the distance between the machining center of the robot and the workpiece at the moment corresponding to each first interpolation point, and the acquired offset corresponding to the first interpolation point can be processed to obtain the position of a second interpolation point; for example, the plurality of interpolation points include first interpolation points P1-P2, and a distance between the machining center of the robot and the workpiece at a time T1 corresponding to the first interpolation point P1 may be denoted as L1; the distance between the machining center of the robot and the workpiece at the time T2 corresponding to the first interpolation point P2 may be denoted as L2.

Step 33: and compensating the motion trail of the robot for processing the workpiece according to the second interpolation point.

After the second interpolation point is obtained, the second interpolation point can be analyzed to obtain control parameters related to the robot, so that the robot generates corresponding actions according to the control parameters to generate corresponding motion tracks and realize the compensation of the motion tracks of the machined workpiece, and the compensated motion tracks can be positioned on the surface of the machined workpiece or the surface which is away from the surface of the machined workpiece by a fixed distance; for example, the robot has two joint axes connected with each other, the control parameters include the rotation angles of the respective joint axes of the robot, the rotation angles of the two joint axes are 130 ° and 40 °, respectively, and the joint axes of the robot are rotated to corresponding angles.

The embodiment provides a compensation method for a motion track of a robot, which is characterized in that on the basis of an original interpolation track (interpolation track) of the robot, a first interpolation point on the interpolation track is compensated by using an acquired offset, so that an actual motion track of the robot is obtained, the interpolation precision is improved, and the robot can better perform operation.

Referring to fig. 4, fig. 4 is a schematic flowchart illustrating a method for compensating a motion trajectory of a robot according to another embodiment of the present application, the method including:

step 41: and receiving a preset starting point and a preset end point, planning a linear track from the preset starting point to the preset end point, and recording the linear track as an interpolation track.

After the preset starting point and the preset end point are received, a linear track from the preset starting point to the preset end point can be calculated according to a linear equation, the linear track is sampled, and the position of the first interpolation point can be obtained.

Step 42: the offset is obtained by the rangefinder.

The distance meter can measure the distance between the processing center of the robot and a workpiece, and can be a laser distance meter; if the robot does not carry the object, the TCP point is a point on the flange of the robot, and if the robot carries the object, the TCP point is a point on the object grabbed by the flange of the robot.

In order to enable the laser range finder to obtain the offset corresponding to the current TCP point without turning, as shown in fig. 5, the central point of the laser range finder is aimed at the position right below the TCP point, so as to obtain the direction in which the TCP point at the current moment needs to be compensated; in the prior art, the TCP point is moved to the position of the laser range finder, and if the laser range finder and the TCP point are overlapped, the robot cannot move.

The rangefinder may send an external signal to the robot, which may be a compressed or encrypted signal, so that upon receiving the external signal, it may be parsed to obtain the current offset.

Step 43: and transforming the offset in the tool coordinate system into a workpiece coordinate system to obtain a transformation offset, and superposing the transformation offset and the corresponding first interpolation point to obtain a second interpolation point.

Compensating the current first interpolation point by using the offset, so that the compensated motion track is offset along with an external signal sent by the distance meter on the basis of the first interpolation point, and the external signal can determine whether the TCP point moves upwards or downwards; in the compensation algorithm for the motion trajectory, a coordinate system describing the compensation may be defined first, and since such applications generally move up and down parallel to the vertical direction (Z direction) of the tool, the coordinate system of the compensation is defined to coincide with the tool coordinate system.

In one embodiment, the TOOL coordinate system is designated TOOL and the workpiece coordinate system is designated WOBJ; in the interpolation process of the robot, the pose of each first interpolation point can be obtained, and the input offset is a compensation vector CTOOLSince the first interpolation point is described in the object coordinate system WOBJ, in order to compensate the vector CTOOLUnder the same coordinate system with the first interpolation point, compensating the vector CTOOLFrom tool coordinatesThe transformation of the system TOOL to the object coordinate system WOBJ is described.

Rotation matrix TOOL for obtaining attitude of first interpolation point under TOOL coordinate system TOOLORIWhich is a rotation matrix relative to the workpiece coordinate system WOBJ; then compensating the vector CTOOLTransforming to the workpiece coordinate system, specifically, cross-multiplying the offset with the rotation matrix of the posture of the first interpolation point to obtain a transformation offset CWOBJThe following formula is adopted for calculation:

CWOBJ=TOOLORI*CTOOL

obtaining transformation offset CWOBJThen, directly adding the first interpolation point P to the transformation offset CWOBJSecond interpolation point P as Cartesian spaceWITHThen to the second interpolation point PWITHAnd (3) carrying out inverse solution to obtain the angle of each joint axis, namely:

PWITH=P+CWOBJ

in other embodiments, if the tool coordinate system is not selected, the pose mode of the reference object coordinate system or the world coordinate system can be selected for rotation compensation; if the object coordinate system is selected, the TOOL does not need to perform coordinate transformation since the first interpolation point is also under the object coordinate systemORIAn identity matrix of 3 x 3; TOOL if the reference world coordinate system is selectedORIThe attitude of the workpiece under the world coordinate system.

Step 44: and planning the speed by using the offset, the first interpolation point and the second interpolation point to obtain the motion trail of the current compensation time.

The interaction time of the external signal is the stay time of the current offset, and after the stay time is over, the current offset is updated to another value; the interaction time determines the following precision, which can be set by a user, and too fast change of the followed surface may cause that the performance of the robot cannot be achieved, so that the compensation algorithm of the motion trajectory cannot completely follow the input offset, speed planning can be performed on the input offset, and the user can set the value of the compensation time, that is, how long the compensation is finished.

The speed planning can be completed in an offset coordinate system, which is a tool coordinate system, a workpiece coordinate system or a world coordinate system where the offset is located, and considering the convenience of the user, the offset can be set to be an incremental type, that is, the input offset is the amount of offset required by the current interpolation point, if the current offset is not completed, the next offset is started, the incomplete offset is discarded, and the compensated motion trajectory can be obtained by adopting the following steps:

step 441: and calculating parameters of the preset time-distance function by using the first position, the first speed, the first acceleration, the second position, the second speed, the second acceleration, the compensation time and the preset time-distance function.

The preset time distance function is a functional relation between the movement time and the distance moved in the movement time, the first position is the position of a first interpolation point (namely the position of the next first interpolation point) after the current compensation time, the second position is the sum of the first position and the current offset, the compensation time is the time from the first position to the second position, the first speed and the first acceleration are respectively the speed and the acceleration corresponding to the first position, and the second speed and the second acceleration are respectively the speed and the acceleration corresponding to the second position; when it is desired to reach the second position, the second velocity is 0, the second acceleration is 0, and the compensation time T may be 0.001 s.

If the interaction time is longer than the compensation time, the robot can reach the second position within the interaction time, the migration is completed, otherwise, the migration is not completed; the first speed may be 0 and the first acceleration may be 0 when the last offset before the current offset is completed; when the last offset is not completed, the first speed is the speed corresponding to the last position of the last offset, and the first acceleration is the acceleration corresponding to the last position of the last offset.

Step 442: and planning a track from the first position to the second position by using the parameters of the preset time distance function, the first position and the second position.

After solving the parameter of the preset time distance function, the track from the first position to the second position can be obtained by using the parameter, the first position and the second position.

Step 443: and obtaining a motion track by using the track from the first position to the second position and the interpolation track.

For example, as shown in fig. 7, taking point C and point D as an example, the offset corresponding to point B is L, the position of point C is added with the offset L to obtain the position of point D, the current starting point is point D, the current end point is point F, and the position of the interpolation point at each time is obtained by performing calculation using a preset time distance function.

In a specific embodiment, as shown in fig. 7, a linear track (interpolation track) from a preset starting point S to a preset end point E is planned first, and a value of an interaction period is set; and then acquiring the current offset, enabling the interpolation track to generate offset through compensation, and following the target track change, wherein the speed is planned to be the speed change in the vertical direction.

When the TCP point is at the point S, in a first interaction period T, the received first offset is 0, so that the TCP point moves along the direction of SB and reaches the point B; in a second interaction period T, the laser range finder gives a second offset L1, the offset L1 is the deviation between the point B and the point C, the point F position is obtained by using the point D and the offset L1, speed planning is carried out by using the point D and the point F, and the TCP point moves to the BD direction and the DF direction at the same time and moves to the point F; and in a third interaction period T, receiving a third offset L2, wherein the offset L2 is the offset between the F point and the G point, obtaining the position of a K point by utilizing the H point and the offset L2, performing speed planning by utilizing the H point and the K point, moving the TCP point to the DH direction and the HK direction at the same time, moving the TCP point to the K point, and repeatedly executing the operation until the TCP point moves to the preset end point E.

In a specific embodiment, the predetermined time distance function may be a quintic function, so that the speed is more stable, and the input values of the speed plan are: first position PsFirst speed VsFirst acceleration AsA second position PeSecond speed VeA second acceleration AeAnd a compensation time T, for T ∈ [0 ],t]The offset position p (t), the velocity v (t), and the acceleration a (t) are respectively as follows:

P(t)=at5+bt4+ct3+dt2+et+f

V(t)=5at4+4bt3+3ct2+dt+e

A(t)=20at3+12bt2+6ct+d

by using the offset position, the velocity and the acceleration corresponding to the initial time and the T time, the following equation can be obtained:

solving the above equation to obtain the following parameter values:

e=Vs

f=Ps

step 45: and processing the second interpolation points to obtain the angle of each joint axis of the robot, and controlling the robot according to the angle of each joint axis so that the robot processes the workpiece.

After the second interpolation point is obtained, inverse solution processing can be performed on the second interpolation point to obtain control parameters related to the robot, the control parameters comprise angles of all joint axes of the robot, and the robot can perform corresponding actions according to the control parameters, so that all joint axes of the robot move to corresponding angles to move, and a compensated motion track is generated.

The scheme is to compensate the interpolation track with one degree of freedom, and is suitable for the application of one degree of freedom, but three-dimensional vectors are used in the whole algorithm formula, so that the compensation of the motion track can support X, Y and the compensation of three degrees of freedom Z.

The embodiment provides a method for compensating interpolation points through an external sensor, the offset is measured by using a laser range finder, the first interpolation point is compensated according to the offset fed back by the laser range finder, the original interpolation track can be changed, and the method can be used in a scene with a fixed distance between a machining tool and the surface of a workpiece, such as spraying application, so that the spraying is more uniform.

Referring to fig. 8, fig. 8 is a schematic structural diagram of an embodiment of a compensation apparatus for a motion trail of a robot provided by the present application, and the compensation apparatus 80 for a motion trail of a robot includes a memory 81 and a processor 82 connected to each other, where the memory 81 is used for storing a computer program, and the computer program, when executed by the processor 82, is used for implementing a compensation method for a motion trail of a robot in the above embodiment.

In this embodiment, the TCP point of the robot may follow the target trajectory, and compensate the original interpolation point, thereby improving the interpolation precision and facilitating more accurate operation of the robot.

Referring to fig. 9, fig. 9 is a schematic structural diagram of another embodiment of a compensation apparatus for a robot motion trajectory according to the present application, where the compensation apparatus 90 for a robot motion trajectory includes: the system comprises an acquisition module 91 and a processing module 92 which are connected with each other, wherein the acquisition module 91 is used for acquiring an interpolation track of a motion track of a workpiece processed by a robot, and the preset interpolation track comprises a plurality of interpolation points; the processing module 92 is configured to obtain an offset, and compensate a first interpolation point of the multiple interpolation points by using the offset to obtain a second interpolation point; and compensating the motion track of the robot for processing the workpiece according to the second interpolation points, wherein the offset is the distance between the processing center of the robot and the workpiece at the moment corresponding to each first interpolation point.

In another alternative implementation, the processing module 92 is further configured to transform the offset in the tool coordinate system into the workpiece coordinate system to obtain a transformed offset; and superposing the transformation offset and the corresponding first interpolation point to obtain a second interpolation point.

In another optional implementation manner, the processing module 92 is further configured to perform speed planning by using the offset, the first interpolation point, and the second interpolation point to obtain a motion trajectory of the current compensation time.

In another optional implementation manner, the processing module 92 is further configured to calculate a parameter of a preset time-distance function by using the first position, the first speed, the first acceleration, the second position, the second speed, the second acceleration, the compensation time, and a preset time-distance function, where the preset time-distance function is a functional relationship between the movement time and the distance moved within the movement time; planning a track from the first position to the second position by using the parameter of the preset time distance function, the first position and the second position; obtaining a motion track by using the track from the first position to the second position and the interpolation track; the first position is the position of a first interpolation point after the current compensation time, the second position is the sum of the first position and the current offset, the compensation time is the time from the first position to the second position, the first speed and the first acceleration are respectively the speed and the acceleration corresponding to the first position, the second speed and the second acceleration are respectively the speed and the acceleration corresponding to the second position, and the preset time distance function is the functional relation between the movement time and the distance moving in the movement time.

In another alternative implementation, the processing module 92 is further configured to cross-multiply the offset by a rotation matrix of the pose of the first interpolation point to obtain a transform offset.

In another alternative implementation, the processing module 92 is further configured to obtain an offset value through the range finder.

In another optional implementation manner, the processing module 92 is further configured to process the second interpolation point to obtain angles of each joint axis of the robot; and controlling the robot according to the angle of each joint shaft so that the robot processes the workpiece.

In another alternative implementation manner, the processing module 92 is further configured to receive a preset starting point and a preset ending point, and plan a linear track from the preset starting point to the preset ending point, and record the linear track as an interpolation track.

Referring to fig. 10, fig. 10 is a schematic structural diagram of an embodiment of a computer storage medium provided in the present application, where the computer storage medium 100 is used to store a computer program 101, and the computer program 101 is used to implement the method for compensating the motion trajectory of the robot in the foregoing embodiment when being executed by a processor.

The computer storage medium 100 may be a server, a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various media capable of storing program codes.

In the several embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of modules or units is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed.

Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.

The above embodiments are merely examples, and not intended to limit the scope of the present application, and all modifications, equivalents, and flow charts using the contents of the specification and drawings of the present application, or those directly or indirectly applied to other related arts, are included in the scope of the present application.

17页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:在SLAM地图中重新定位移动载具的方法及移动载具

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!