A method and apparatus for tracking the pose of a robotic arm under PLC axis control.
By calculating the position and posture deviation of the robotic arm end effector and using gain coefficient and quaternion difference mapping, efficient position and posture tracking of the robotic arm end effector in PLC axis control is achieved, solving the problem of wasted computing power and improving response speed and control stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU INNOVATION RES INST OF BEIJING UNIV OF AERONAUTICS & ASTRONAUTICS
- Filing Date
- 2026-03-31
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, the end-effector pose tracking method of PLC axis control has the problem of wasted computing power, especially on PLCs with limited hardware performance, which affects the stability of industrial control.
By obtaining the deviation between the coordinates of the robotic arm's end effector and the target position coordinates, the desired position acceleration and attitude angular acceleration are calculated. By using the gain coefficient and differential term of the coordinate and attitude deviation, combined with quaternion difference mapping, the predicted position and attitude tracking of the robotic arm's end effector can be achieved, avoiding the need to plan the entire trajectory.
It reduces the computing power requirements, avoids wasting computing power, improves the response speed to changes in the target, simplifies the tracking process, and improves the stability of industrial control.
Smart Images

Figure CN121928577B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of robot control and industrial automation technology, and more specifically, to a method and apparatus for tracking the pose of a robotic arm for PLC axis control. Background Technology
[0002] Today, PLCs have replaced many dedicated controllers, becoming the mainstream and highly universal device in industrial control. Even in the field of robotic arm control, which is dominated by dedicated controllers, they are beginning to be widely adopted. The motion control specifications developed by the PLCOpen organization based on the IEC 61131-3 international standard have been accepted and followed by mainstream PLC manufacturers, becoming the de facto standard for PLC motion control. Part 4 of the PLCOpen motion control standard defines the functions of controlling robotic arms through the concept of axis groups, including the content related to keeping the axis groups synchronized with other mechanisms. For example, in high-precision machining scenarios such as cutting, industrial robots usually need to maintain a relatively fixed posture with the tool, such as the cutting head, mounted at the end of the robotic arm to achieve a stable machining effect. If the workpiece is located on a moving platform such as a conveyor belt, rotary table, or the pallet of another robotic arm, there may be dynamic and unpredictable relative displacement and posture changes between the workpiece coordinate system (PCS) which is stationary relative to the workpiece and the machine coordinate system (MCS) which is stationary relative to the origin of the robotic arm. In existing technologies, robotic arm control systems typically divide this machining process oriented towards dynamic changes in workpiece posture into three stages: entering synchronization, maintaining synchronization, and exiting synchronization. Entering the synchronization phase refers to moving from the current pose in the MCS to the target pose in the PCS, achieving the pose set value calculated relative to the workpiece origin. Because the workpiece is moving, the velocity and acceleration of the robotic arm's end effector may be non-zero upon completion of synchronization, making it a relatively complex planning process. During the synchronization maintenance phase, if no motion commands are executed, the robotic arm's end effector will remain relatively stationary with respect to the workpiece at the PCS target pose set during synchronization. If motion commands such as linear or circular motions are executed, the robotic arm's end effector will perform planned linear or circular motions relative to the workpiece. After executing motion commands in the PCS to complete the process, the synchronization phase ends, moving from the current pose in the PCS to the target pose in the MCS. After exiting, the robotic arm's end effector motion and motion planning are no longer affected by the workpiece pose but are calculated based on the robotic arm origin. At this point, operations such as entering the synchronization phase for the next workpiece can be performed.
[0003] However, existing technologies require recalculation of the entire trajectory from the current pose to catching up with the target every time the end effector of the robotic arm is planned. The dynamic changes of the target mean that most of the trajectory will not be executed and will be overwritten by the next recalculation, resulting in a waste of computing power. On PLCs with limited hardware performance, this waste of computing power becomes a serious problem affecting the stability of industrial control. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a method and apparatus for tracking the pose of a robotic arm for PLC axis control, so as to solve the problem of wasted computing power in existing robotic arm end-effector pose tracking methods.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0006] In a first aspect, the present invention provides a method for tracking the pose of a robotic arm for PLC axis group control, comprising:
[0007] Obtain the coordinates of the robotic arm's end effector and the target position coordinates, and calculate the coordinate deviation between the robotic arm's end effector coordinates and the target position coordinates;
[0008] The expected position acceleration of the robotic arm end effector is calculated based on the coordinate deviation, and the expected position of the robotic arm end effector is calculated based on the expected position acceleration.
[0009] Obtain the end-effector pose and the target position pose, and calculate the pose deviation between the end-effector pose and the target position pose;
[0010] The desired attitude angular acceleration of the robotic arm end effector is calculated based on the attitude deviation, and the predicted attitude of the robotic arm end effector is calculated based on the attitude angular acceleration.
[0011] In an optional implementation, the step of calculating the desired position acceleration of the robotic arm end effector based on the coordinate deviation includes:
[0012] The differential of the coordinate deviation is calculated based on the difference in the coordinate deviation within a single period;
[0013] Define the gain coefficient of the position deviation term and the gain coefficient of the position deviation derivative term;
[0014] The desired position acceleration is calculated based on the coordinate deviation, the gain coefficient of the position deviation term, the differential of the coordinate deviation, and the gain coefficient of the differential of the position deviation term.
[0015] In an optional implementation, the step of calculating the expected position of the robotic arm end effector based on the desired positional acceleration includes:
[0016] Based on the acceleration of the robotic arm's end effector, a predicted acceleration of the robotic arm's end effector is calculated; the acceleration includes the maximum acceleration, the maximum jerk, and the desired position acceleration.
[0017] The expected position of the robotic arm's end effector is calculated based on the predicted acceleration.
[0018] In an optional implementation, the step of calculating the attitude deviation between the end effector attitude of the robotic arm and the target position attitude includes:
[0019] Calculate the quaternion difference between the target position attitude and the robotic arm end effector attitude;
[0020] Calculate the logarithm of the quaternion differences and map the logarithm to a pure imaginary quaternion;
[0021] The direction of the imaginary part vector of the pure imaginary quaternion is taken as the rotation axis direction of the attitude deviation, and the length of the imaginary part vector is taken as the rotation angle of the attitude deviation.
[0022] In an optional implementation, the step of calculating the desired attitude angular acceleration of the robotic arm end effector based on the attitude deviation includes:
[0023] Calculate the attitude deviation differential between the attitude deviation and the attitude deviation of the previous cycle;
[0024] Define the gain coefficient of the attitude deviation term and the gain coefficient of the attitude deviation derivative term;
[0025] The desired attitude angular acceleration is calculated based on the attitude deviation, the gain coefficient of the attitude deviation term, the attitude deviation derivative, and the gain coefficient of the attitude deviation derivative term.
[0026] In an optional implementation, the step of calculating the predicted attitude of the robotic arm end effector based on the attitude angular acceleration includes:
[0027] Calculate the predicted angular acceleration of the robotic arm's end effector based on the maximum angular acceleration, maximum angular jerk, and the desired position angular acceleration.
[0028] The attitude change of the robotic arm end in a single cycle is equivalent to uniformly accelerated rotational motion.
[0029] Based on the predicted angular acceleration, a uniform acceleration rotation calculation formula is constructed for the end effector of the robotic arm, and the rotation angle is calculated based on the uniform acceleration rotation calculation formula.
[0030] The rotation angle is mapped to a unit quaternion through exponential mapping, and the predicted posture is calculated based on the unit quaternion and the end effector posture of the robotic arm.
[0031] Secondly, the present invention provides a robotic arm pose tracking device for PLC axis group control, comprising:
[0032] The coordinate calculation module is used to obtain the coordinates of the robotic arm's end effector and the target position coordinates, and to calculate the coordinate deviation between the robotic arm's end effector coordinates and the target position coordinates;
[0033] The position tracking module is used to calculate the expected position acceleration of the robotic arm end effector based on the coordinate deviation, and to calculate the expected position of the robotic arm end effector based on the expected position acceleration.
[0034] The attitude calculation module is used to obtain the end-effector attitude and the target position attitude of the robotic arm, and to calculate the attitude deviation between the end-effector attitude and the target position attitude.
[0035] The attitude tracking module is used to calculate the desired attitude angular acceleration of the robotic arm end effector based on the attitude deviation, and to calculate the predicted attitude of the robotic arm end effector based on the attitude angular acceleration.
[0036] Thirdly, the present invention provides an electronic device including a processor and a memory, the memory storing machine-executable instructions executable by the processor, the processor executing the machine-executable instructions to implement the robotic arm pose tracking method described in the first aspect.
[0037] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the robotic arm pose tracking method as described in the first aspect.
[0038] The present invention provides a robotic arm pose tracking method, device, equipment and storage medium that predicts and tracks the position and posture of the robotic arm end effector separately. It eliminates the need to plan the entire trajectory from the current pose to the target pose, and only performs simple numerical calculations based on the current pose and acceleration information. This requires very little computing power and fundamentally avoids wasting computing power.
[0039] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0040] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 A block diagram of an electronic device provided by an embodiment of the present invention is shown;
[0042] Figure 2 A flowchart illustrating a robotic arm pose tracking method for PLC axis group control provided by an embodiment of the present invention is shown.
[0043] Figure 3 A schematic flowchart of a position acceleration calculation method provided by an embodiment of the present invention is shown;
[0044] Figure 4 The diagram shows a functional block diagram of a robotic arm pose tracking device for PLC axis group control provided by an embodiment of the present invention.
[0045] icon:
[0046] 100 - Electronic equipment; 110 - Memory; 120 - Processor; 130 - Communication module; 400 - Robotic arm pose tracking device for PLC axis control; 401 - Coordinate calculation module; 402 - Position tracking module; 403 - Attitude calculation module; 404 - Attitude tracking module. Detailed Implementation
[0047] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0048] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0049] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0050] Please refer to Figure 1This is a block diagram of an electronic device 100 provided in this embodiment. The electronic device 100 includes a memory 110, a processor 120, and a communication module 130. The memory 110, processor 120, and communication module 130 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.
[0051] The memory 110 is used to store programs or data. The memory 110 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0052] The processor 120 is used to read / write data or programs stored in the memory 110 and to perform corresponding functions.
[0053] The communication module 130 is used to establish a communication connection between the electronic device 100 and other communication terminals through the network, and to send and receive data through the network.
[0054] It should be understood that, Figure 1 The structure shown is only a schematic diagram of the electronic device 100. The electronic device 100 may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown. Figure 1 The components shown can be implemented using hardware, software, or a combination thereof.
[0055] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating a robotic arm pose tracking method for PLC axis group control provided in this embodiment. The method includes:
[0056] S201. Obtain the coordinates of the end effector of the robotic arm and the coordinates of the target position, and calculate the coordinate deviation between the coordinates of the end effector of the robotic arm and the coordinates of the target position.
[0057] The target position coordinates can be the position coordinates of the workpiece to be processed. If the workpiece is located on a moving platform such as a conveyor belt, rotary table, or the tray of another robotic arm, the target position can be determined by the position coordinates of the moving platform. Pose includes position and orientation. This embodiment realizes the tracking of the robotic arm from both position and orientation aspects.
[0058] First, position tracking. Before calculating the coordinate deviation, a unified coordinate system can be constructed. The unified coordinate system can be a machine coordinate system constructed with the robot base where the robotic arm is located as the origin, or a coordinate system constructed in other ways. Then, the positions of the robotic arm end effector and the workpiece or motion platform are represented by coordinates in the unified coordinate system. Then, the coordinate deviation between the coordinates of the robotic arm end effector and the target position coordinates is calculated to reduce the amount of calculation.
[0059] S202. Calculate the expected position acceleration of the robotic arm end based on the coordinate deviation, and calculate the expected position of the robotic arm end based on the expected position acceleration.
[0060] Coordinate deviation is the position deviation of the robotic arm in two adjacent motion cycles. By analyzing the relationship between position deviation and time, the acceleration of the robotic arm's end effector at the target position can be calculated, and the expected position acceleration for the next motion cycle can be calculated. Then, based on the relationship between acceleration and displacement, a corresponding displacement calculation formula can be constructed to calculate the expected position, thereby achieving position tracking of the robotic arm's end effector.
[0061] S203. Obtain the end-effector posture and target position posture of the robotic arm, and calculate the posture deviation between the end-effector posture and the target position posture.
[0062] When the posture of the workpiece or motion platform changes, a synchronous posture change is also required in order for the robotic arm to process the workpiece normally. Similar to position tracking, the corresponding posture deviation is calculated based on the posture of the robotic arm's end effector and the target position posture. The posture can be represented by the direction of the rotation axis and the rotation angle.
[0063] S204. Calculate the desired attitude angular acceleration of the robotic arm end effector based on the attitude deviation, and calculate the predicted attitude of the robotic arm end effector based on the attitude angular acceleration.
[0064] Since attitude transformation involves the direction of rotation axis and rotation angle, attitude angular acceleration can be calculated by attitude deviation, and then the attitude of the robotic arm end effector can be predicted based on the attitude angular acceleration, thereby achieving attitude tracking.
[0065] This embodiment predicts and tracks the position and posture of the robotic arm's end effector separately. It eliminates the need to plan the entire trajectory from the current pose to the target pose, and only performs simple numerical calculations based on the current pose and acceleration information. This requires very little computing power and fundamentally avoids wasting computing power.
[0066] Please refer to Figure 3 , Figure 3 This is a flowchart illustrating a position acceleration calculation method provided in this embodiment.
[0067] In one implementation, step S202 includes: steps S2021-S2023.
[0068] S2021. The differential of the coordinate deviation is calculated based on the difference in the coordinate deviation within a single period.
[0069] S2022. Define the gain coefficient of the position deviation term and the gain coefficient of the position deviation differential term.
[0070] S2023. Calculate the desired position acceleration based on the coordinate deviation, the gain coefficient of the position deviation term, the differential of the coordinate deviation, and the gain coefficient of the differential of the position deviation term.
[0071] Define hyperparameters and These are used as gain coefficients for the position deviation term and the position deviation derivative term, respectively. Since this algorithm is used for open-loop control and there is no environmental disturbance term, it is not necessary to include the deviation integral term in the calculation process.
[0072] Parameters control the tracking response strength; when the relative target distance is the same, The larger the value, the greater the expected acceleration at the end of the robotic arm. Parameter control tracks overshoot to avoid oscillations near the target when the response is strong. The larger the value, the stronger the suppression effect on overshoot oscillations, but the weaker the response strength will be.
[0073] The vector whose starting point is the current position coordinates of the robotic arm's end effector and whose ending point is the current target position coordinates is used as the deviation at the current moment. The derivative of the deviation is estimated by the difference within a single period. Define the desired position acceleration of the robotic arm's end effector in the next cycle as:
[0074]
[0075] As an optional acceleration feedforward term, the current acceleration vector of the target being tracked is taken. If the system can obtain or calculate this value from other parameters, such as the acceleration of the driven workpiece being calculated from the acceleration of the conveyor belt drive motor in a conveyor belt scenario, this feedforward term can significantly improve the tracking response speed and reduce the tracking error.
[0076] In one embodiment, the step of calculating the expected position of the robotic arm end effector based on the desired positional acceleration includes:
[0077] Calculate the predicted acceleration of the robotic arm end effector based on the maximum acceleration, maximum jerk, and the desired position acceleration of the robotic arm end effector.
[0078] The expected position of the robotic arm's end effector is calculated based on the predicted acceleration.
[0079] Due to physical limitations in the structure of robotic arms and the joint servo motors, the maximum acceleration of the robotic arm's end effector in Cartesian space is typically limited. and maximum jerk Considering the overall kinematic constraints, the acceleration to be applied in the next cycle is:
[0080]
[0081] In one embodiment, the step of calculating the expected position of the robotic arm end effector based on the predicted acceleration includes:
[0082] The positional change of the robotic arm's end effector within a single cycle is equivalent to uniformly accelerated motion.
[0083] Based on the predicted acceleration, a uniform acceleration calculation formula for the end effector of the robotic arm is constructed. Based on the uniform acceleration calculation formula and the coordinates of the end effector of the robotic arm, the expected position is calculated.
[0084] By treating the position change within a single motion control cycle as uniformly accelerated motion within a time slice, the position that the robotic arm's end effector should move to in the next cycle can be obtained:
[0085]
[0086] Then, the encoder values for each joint servo motor are obtained through inverse kinematics calculation of the robot. The process of reading the current position and calculating the next position is repeated in each motion control cycle, and the encoder values are sent to the servo drive for execution via an industrial fieldbus protocol such as EtherCAT, until... , If the distance is within the allowable range for tracking error, it is assumed that the position of the robotic arm's end effector and the position of the tracking target have been synchronized.
[0087] This embodiment adapts the PD algorithm applied to closed-loop control to the dynamic target tracking scenario of the open-loop control robot arm by using time-slice integration. This avoids a large amount of invalid calculation caused by the dynamic changes of the target in planning algorithms, reduces the computational pressure on low-computing-power robot controllers, improves the response speed to target changes, and simplifies the programming model of the tracking process.
[0088] In one embodiment, the step of calculating the attitude deviation between the end effector attitude of the robotic arm and the target position attitude includes:
[0089] Calculate the quaternion difference between the target position attitude and the robotic arm end effector attitude;
[0090] Calculate the logarithm of the quaternion differences and map the logarithm to a pure imaginary quaternion;
[0091] The direction of the imaginary part vector of the pure imaginary quaternion is taken as the rotation axis direction of the attitude deviation, and the length of the imaginary part vector is taken as the rotation angle of the attitude deviation.
[0092] The attitude tracking section uses quaternions to define the rotation of the robotic arm's end effector and the tracked target relative to the machine coordinate system. The commonly used Euler angles for coordinate system rotation are unsuitable for calculating rotational trajectories in this scenario because the rate of change of Euler angles is non-linearly related to angular velocity in 3D rotational scenarios, and their behavior at singular points is unintuitive. For example, two similar postures require significant changes in Euler angles, making it difficult to control and limit parameters affecting servo motor loads, such as angular acceleration, during trajectory calculation.
[0093] Similar to position tracking, define hyperparameters and These are used as gain coefficients for the attitude deviation term and the attitude deviation derivative, respectively. The target attitude is represented by unit quaternions. This indicates that the current robotic arm end effector uses... This means that the deviation is defined as the imaginary part of a pure imaginary quaternion, which is obtained by logarithmically mapping the quaternion difference between the target pose and the current robotic arm end-effector pose.
[0094]
[0095] After mapping to pure imaginary quaternions, the direction of the imaginary part vector represents the direction of the rotation axis, and the vector length represents the rotation angle. Therefore, angular acceleration and angular velocity can be calculated more intuitively when calculating attitude rotation.
[0096] In one embodiment, the step of calculating the desired attitude angular acceleration of the robotic arm end effector based on the attitude deviation includes:
[0097] Calculate the attitude deviation differential between the attitude deviation and the attitude deviation of the previous cycle;
[0098] Define the gain coefficient of the attitude deviation term and the gain coefficient of the attitude deviation derivative term;
[0099] The desired attitude angular acceleration is calculated based on the attitude deviation, the gain coefficient of the attitude deviation term, the attitude deviation derivative, and the gain coefficient of the attitude deviation derivative term.
[0100] Current deviation Deviation from the previous period By performing an exponential mapping to restore the unit quaternion, taking the difference between the quaternions, and then performing a logarithmic mapping to obtain the imaginary part vector, we get an estimate of the bias differential, i.e.:
[0101]
[0102] Define the desired angular acceleration of the robotic arm's end effector in the next cycle as:
[0103]
[0104] same, This is the optional angular acceleration of the target's current attitude. If the system model can provide this parameter, it will improve the attitude tracking performance.
[0105] In one embodiment, the step of calculating the predicted attitude of the robotic arm end effector based on the attitude angular acceleration includes:
[0106] Calculate the predicted angular acceleration of the robotic arm's end effector based on the maximum angular acceleration, maximum angular jerk, and the desired position angular acceleration.
[0107] The attitude change of the robotic arm end in a single cycle is equivalent to uniformly accelerated rotational motion.
[0108] Based on the predicted angular acceleration, a uniform acceleration rotation calculation formula is constructed for the end effector of the robotic arm, and the rotation angle is calculated based on the uniform acceleration rotation calculation formula.
[0109] The rotation angle is mapped to a unit quaternion through exponential mapping, and the predicted posture is calculated based on the unit quaternion and the end effector posture of the robotic arm.
[0110] The maximum angular acceleration of the robotic arm's end effector in Cartesian space is The maximum angular acceleration is By constraining the desired angular acceleration, the actual attitude angular acceleration can be obtained:
[0111]
[0112] The attitude change within a single motion control cycle is treated as uniformly accelerated rotational motion within a time slice, combined with the current angular velocity vector. The rotation vector within the time slice can be obtained. The rotation vector represents the rotation angle around the rotation axis. Therefore, the quaternion of the robot arm's end effector to be achieved in the next cycle can be obtained by mapping the exponent to a unit quaternion and performing quaternion superposition:
[0113]
[0114] The calculated position coordinates that the robotic arm's end effector should reach in the next cycle are currently available. and attitude quaternions This is converted into a transformation matrix of the robotic arm's end effector relative to the MCS (Mechanical Control System). Then, the corresponding encoder values for each joint's servo motors are obtained through robot inverse kinematics calculation. Each motion control cycle repeats the process of reading the current pose and calculating the pose for the next cycle, and the encoder values are sent to the servo drivers for execution via an industrial fieldbus protocol such as EtherCAT, until... and , and If the allowable position error and attitude error range are respectively, then the robotic arm end effector is considered to be synchronized with the tracking target.
[0115] To perform the corresponding steps in the above embodiments and various possible methods, the following describes an implementation of a robotic arm pose tracking device for PLC axis group control. Please refer to [link to relevant documentation]. Figure 4 , Figure 4 This is a functional block diagram of a robotic arm pose tracking device for PLC axis group control provided in an embodiment of the present invention. It should be noted that the basic principle and technical effects of the robotic arm pose tracking device provided in this embodiment are the same as those in the above embodiments. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the corresponding content in the above embodiments. The robotic arm pose tracking device 400 for PLC axis group control includes:
[0116] The coordinate calculation module 401 is used to obtain the coordinates of the end effector of the robotic arm and the target position coordinates, and to calculate the coordinate deviation between the end effector coordinates of the robotic arm and the target position coordinates;
[0117] The position tracking module 402 is used to calculate the expected position acceleration of the robotic arm end based on the coordinate deviation, and to calculate the expected position of the robotic arm end based on the expected position acceleration.
[0118] The attitude calculation module 403 is used to obtain the end-effector attitude and the target position attitude of the robotic arm, and to calculate the attitude deviation between the end-effector attitude and the target position attitude.
[0119] The attitude tracking module 404 is used to calculate the desired attitude angular acceleration of the robotic arm end based on the attitude deviation, and to calculate the predicted attitude of the robotic arm end based on the attitude angular acceleration.
[0120] Optionally, the above modules can be stored in the form of software or firmware. Figure 1 The memory shown is either stored in or embedded in the operating system (OS) of the robotic arm pose tracking device, and can be accessed by... Figure 1 The processor executes the commands. Meanwhile, the data and program code required to execute these modules can be stored in memory.
[0121] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0122] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0123] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0124] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for tracking the pose of a robotic arm for PLC axis control, characterized in that, include: Obtain the coordinates of the robotic arm's end effector and the target position coordinates, and calculate the coordinate deviation between the robotic arm's end effector coordinates and the target position coordinates; The expected position acceleration of the robotic arm end effector is calculated based on the coordinate deviation, and the expected position of the robotic arm end effector is calculated based on the expected position acceleration. Obtain the end-effector pose and the target position pose, and calculate the pose deviation between the end-effector pose and the target position pose; The desired attitude angular acceleration of the robotic arm end effector is calculated based on the attitude deviation, and the predicted attitude of the robotic arm end effector is calculated based on the attitude angular acceleration. The step of calculating the expected position of the robotic arm end effector based on the expected positional acceleration includes: Based on the acceleration of the robotic arm's end effector, a predicted acceleration of the robotic arm's end effector is calculated; the acceleration includes the maximum acceleration, the maximum jerk, and the desired position acceleration. The expected position of the robotic arm's end effector is calculated based on the predicted acceleration; The step of calculating the predicted attitude of the robotic arm end effector based on the attitude angular acceleration includes: Calculate the predicted angular acceleration of the robotic arm end effector based on the maximum angular acceleration, maximum angular jerk, and attitude angular acceleration at the end effector. The attitude change of the robotic arm end in a single cycle is equivalent to uniformly accelerated rotational motion. Based on the predicted angular acceleration, a uniform acceleration rotation calculation formula is constructed for the end effector of the robotic arm, and the rotation angle is calculated based on the uniform acceleration rotation calculation formula. The rotation angle is mapped to a unit quaternion through exponential mapping, and the predicted posture is calculated based on the unit quaternion and the end effector posture of the robotic arm.
2. The robotic arm pose tracking method for PLC axis group control according to claim 1, characterized in that, The step of calculating the desired position acceleration of the robotic arm end effector based on the coordinate deviation includes: The differential of the coordinate deviation is calculated based on the difference in the coordinate deviation within a single period; Define the gain coefficient of the position deviation term and the gain coefficient of the position deviation derivative term; The desired position acceleration is calculated based on the coordinate deviation, the gain coefficient of the position deviation term, the differential of the coordinate deviation, and the gain coefficient of the differential of the position deviation term.
3. The robotic arm pose tracking method for PLC axis group control according to claim 1, characterized in that, The steps for calculating the attitude deviation between the robotic arm's end effector attitude and the target position attitude include: Calculate the quaternion difference between the target position attitude and the robotic arm end effector attitude; Calculate the logarithm of the quaternion differences and map the logarithm to a pure imaginary quaternion; The direction of the imaginary part vector of the pure imaginary quaternion is taken as the rotation axis direction of the attitude deviation, and the length of the imaginary part vector is taken as the rotation angle of the attitude deviation.
4. The robotic arm pose tracking method for PLC axis group control according to claim 3, characterized in that, The step of calculating the desired attitude angular acceleration of the robotic arm end effector based on the attitude deviation includes: Calculate the attitude deviation differential between the attitude deviation and the attitude deviation of the previous cycle; Define the gain coefficient of the attitude deviation term and the gain coefficient of the attitude deviation derivative term; The desired attitude angular acceleration is calculated based on the attitude deviation, the gain coefficient of the attitude deviation term, the attitude deviation derivative, and the gain coefficient of the attitude deviation derivative term.
5. A robotic arm pose tracking device for PLC axis control, characterized in that, For implementing the robotic arm pose tracking method for PLC axis group control as described in any one of claims 1-4, the apparatus comprises: The coordinate calculation module is used to obtain the coordinates of the robotic arm's end effector and the target position coordinates, and to calculate the coordinate deviation between the robotic arm's end effector coordinates and the target position coordinates; The position tracking module is used to calculate the expected position acceleration of the robotic arm end effector based on the coordinate deviation, and to calculate the expected position of the robotic arm end effector based on the expected position acceleration. The attitude calculation module is used to obtain the end-effector attitude and the target position attitude of the robotic arm, and to calculate the attitude deviation between the end-effector attitude and the target position attitude. The attitude tracking module is used to calculate the desired attitude angular acceleration of the robotic arm end effector based on the attitude deviation, and to calculate the predicted attitude of the robotic arm end effector based on the attitude angular acceleration.
6. An electronic device, characterized in that, It includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the robotic arm pose tracking method for PLC axis group control as described in any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the robotic arm pose tracking method for PLC axis group control as described in any one of claims 1-4.