Robot control method and device, computer equipment, readable storage medium and program product
By combining the inverse kinematics algorithm and the industrial upper computer control system, the command frame is generated and sent to control the link of the six-degree of freedom parallel robot, the problem of complex control and low accuracy in the prior art is solved, and the precise control and portability of the six-degree of freedom parallel robot is achieved.
Patent Information
- Application Number
- CN202411995946.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-03-25
AI Technical Summary
How to comprehensively and effectively control the six-degree-of-freedom parallel robot to solve the problem of complex control and low accuracy in the existing technology.
By combining the inverse kinematics algorithm and the industrial upper computer control system, the serial port is used to communicate with the electric cylinder, the command frame is generated and sent to each connecting rod electric cylinder, and the target position control of the dynamic platform is realized.
It realizes precise control of six-degree-of-freedom parallel robots, improves control accuracy and portability, and can be widely used in industrial production.
Smart Images

Figure CN119681890A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robotics technology, and in particular to a robot control method, device, computer equipment, readable storage medium and program product. Background Art
[0002] The field of robotics is an interdisciplinary field involving mechanical engineering, electronic engineering, computer science and control science. It mainly studies how to design and manufacture automated mechanical devices that can complete specific tasks, namely robots. Among them, the six-degree-of-freedom parallel robot is a parallel mechanism with six degrees of freedom that can achieve complex movements with multiple degrees of freedom. Therefore, the six-degree-of-freedom parallel robot has a very wide range of applications.
[0003] However, how to comprehensively and effectively control the six-degree-of-freedom parallel robot is a problem that needs to be solved urgently. Summary of the invention
[0004] Based on this, it is necessary to provide a robot control method, device, computer equipment, computer-readable storage medium and computer program product that can comprehensively and effectively control a six-degree-of-freedom parallel robot in response to the above-mentioned technical problems.
[0005] In a first aspect, the present application provides a robot control method, wherein the robot is a six-degree-of-freedom parallel robot, and the method comprises:
[0006] In response to a first control instruction for the six-degree-of-freedom parallel robot, the first control instruction includes target posture information for a moving platform;
[0007] Calculating the elongation of six connecting rods in the six-degree-of-freedom parallel robot according to the target posture information of the moving platform in the first control instruction;
[0008] In the case where it is determined that the elongation is less than or equal to the maximum elongation of the corresponding connecting rod, generating a command frame of the corresponding connecting rod according to the elongation;
[0009] The instruction frames are sent sequentially to the electric cylinders corresponding to the connecting rods, respectively, and the instruction frames are used to instruct the electric cylinders to control the corresponding connecting rods to move according to the elongation amount so that the moving platform reaches the target posture.
[0010] In one embodiment, calculating the elongation of six connecting rods in the six-degree-of-freedom parallel robot according to the target posture information of the moving platform in the first control instruction includes:
[0011] Based on the target posture information of the moving platform, determining the target lengths corresponding to the six connecting rods in the six-degree-of-freedom parallel robot respectively;
[0012] The differences between the target lengths and the initial lengths respectively corresponding to the six connecting rods are obtained, and the differences are determined as the elongation of the corresponding connecting rods.
[0013] In one embodiment, determining the target lengths corresponding to the six connecting rods in the six-degree-of-freedom parallel robot based on the target posture information of the moving platform includes:
[0014] Determine a rotation matrix of a moving coordinate system corresponding to the moving platform relative to a static coordinate system corresponding to the static platform;
[0015] Based on the target posture information of the moving platform, determining the coordinate representation of the connecting rod in the moving coordinate system;
[0016] Determine the coordinate representation of the connecting rod in the static coordinate system according to the coordinate representation of the connecting rod in the dynamic coordinate system and the rotation matrix;
[0017] The target length of the connecting rod is determined according to the coordinate representation of the connecting rod in the static coordinate system.
[0018] In one embodiment, the method further comprises:
[0019] In response to a second control instruction to the six-degree-of-freedom parallel robot, the second control instruction includes specifying a target position of the electric cylinder;
[0020] converting the second control instruction into a corresponding instruction frame based on the target position;
[0021] The instruction frame is sent to the designated electric cylinder, where the instruction frame is used to instruct the designated electric cylinder to control the corresponding connecting rod to extend to the target position.
[0022] In one embodiment, the second control instruction also includes a target speed of the designated electric cylinder; the method further includes:
[0023] converting the second control instruction into a corresponding instruction frame based on the target position and the target speed;
[0024] The instruction frame is sent to the designated electric cylinder, where the instruction frame is used to instruct the designated electric cylinder to control the corresponding connecting rod to extend to the target position based on the target speed.
[0025] In one embodiment, the method further comprises:
[0026] In response to a third control instruction to the six-degree-of-freedom parallel robot, the third control instruction is used to instruct a connecting rod corresponding to a designated electric cylinder to extend to a maximum, the designated electric cylinder comprising one electric cylinder or a plurality of electric cylinders;
[0027] A command frame corresponding to the third control command is sent to the designated electric cylinder, wherein the command frame is used to instruct the designated electric cylinder to control the corresponding connecting rod to extend to the maximum.
[0028] In a second aspect, the present application further provides a robot control device, wherein the robot is a six-degree-of-freedom parallel robot, and the device comprises:
[0029] An instruction response module, used to respond to a first control instruction for the six-degree-of-freedom parallel robot, wherein the first control instruction includes target posture information for the moving platform;
[0030] a calculation module, configured to calculate the elongation of six connecting rods in the six-degree-of-freedom parallel robot according to the target posture information of the moving platform in the first control instruction;
[0031] An instruction generation module, configured to generate an instruction frame of the corresponding connecting rod according to the elongation when it is determined that the elongation is less than or equal to the maximum elongation of the corresponding connecting rod;
[0032] The instruction sending module is used to send the instruction frames to the electric cylinders corresponding to the connecting rods in sequence, and the instruction frames are used to instruct the electric cylinders to control the corresponding connecting rods to move according to the elongation amount so that the moving platform reaches the target posture.
[0033] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in the first aspect when executing the computer program.
[0034] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in the first aspect above.
[0035] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the method described in the first aspect when executed by a processor.
[0036] In the robot control method, device, computer equipment, computer-readable storage medium and computer program product, the host computer calculates the elongation of the six connecting rods in the six-degree-of-freedom parallel robot according to the target posture information of the moving platform in the first control instruction in response to the first control instruction to the six-degree-of-freedom parallel robot, and generates a command frame of the corresponding connecting rod according to the elongation when it is determined that the elongation is less than or equal to the maximum elongation of the corresponding connecting rod, and sends the command frame to the electric cylinder corresponding to each connecting rod in sequence to instruct the electric cylinder to control the corresponding connecting rod to move according to the elongation in the command frame, so that the moving platform reaches the target posture. This embodiment allows the user to directly set the target posture information of the moving platform, and uses inverse kinematics and the target posture information of the moving platform to comprehensively and effectively control the six-degree-of-freedom parallel robot, thereby eliminating the need for the user to control each electric cylinder individually, thereby improving the portability of the control of the six-degree-of-freedom parallel robot. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments of the present application or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0038] Figure 1 A diagram showing an application environment of a robot control method in one embodiment;
[0039] Figure 2 A schematic diagram of a flow chart of a robot control method in one embodiment;
[0040] Figure 3 2 is a schematic diagram of the structure of a six-degree-of-freedom parallel robot in one embodiment;
[0041] Figure 4 A schematic flow chart of a robot control method in another embodiment;
[0042] Figure 5 is a flowchart of a robot control method in yet another embodiment;
[0043] Figure 6 A schematic flow chart of a step of calculating the elongation of a connecting rod in one embodiment;
[0044] Figure 7 A schematic diagram of a coordinate system when performing a control algorithm in one embodiment;
[0045] Figure 8 It is a schematic diagram of setting the posture parameters of the moving platform in one embodiment;
[0046] Fig. 9 A schematic diagram of establishing a coordinate system in one embodiment;
[0047] Fig.10 A schematic diagram of a working space in an embodiment;
[0048] Fig.11 is a structural block diagram of a robot control device in one embodiment;
[0049] Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0051] With the continuous development of the electronic information industry, robot control technology has played a very important role in global economic growth and is a strategic and basic technology that affects national interests and security. Among them, the role of precision technology for a series of parallel robots in industrial manufacturing and production is also increasing. With the continuous application of control theory in the field of robotics, the relevant algorithms for robot control are becoming more and more mature. The requirements for robot control technology in industrial production are getting higher and higher. The more control functions a control system has, the better the control precision, and the simpler the human-computer interaction interface, the easier it is to popularize in industrial production. Therefore, how to comprehensively and effectively control the six-degree-of-freedom parallel robot is a problem that needs to be solved urgently.
[0052] In the early days, six-degree-of-freedom parallel robots were mainly used for motion simulation, such as in car driving simulators. With the rapid development of control theory and computer technology, six-degree-of-freedom parallel robots have been widely used. For example, in production platforms with high stability requirements, six-degree-of-freedom parallel robots can be used for vibration isolation. When performing fiber optic docking processing, they are often used as fiber optic calibration platforms. The corresponding actuators can also be directly assembled on the top for precision processing, optical tracking, etc.
[0053] The inverse kinematics algorithm is the core link in realizing the control of parallel robots. Its main purpose is to convert the given dynamic platform position information into the elongation of the corresponding six electric cylinders. Since the elongation of each electric cylinder in the six-degree-of-freedom parallel robot system is highly coupled with the position of the dynamic platform, it is unrealistic to control the position of the entire dynamic platform by only adjusting the elongation of one or several electric cylinders. Therefore, the inverse kinematics algorithm is required to give the elongation of all six electric cylinders at one time to achieve control accuracy.
[0054] With the improvement of science and technology, the requirements for control accuracy in the actual industrial field are getting higher and higher. Future control strategies will develop in the direction of higher precision, which will pose higher challenges to the superiority of control algorithms and the accuracy of controlled electric cylinders. Especially when the six-degree-of-freedom parallel robot is applied to simulated driving, positioning and tracking, etc., this requires the six-degree-of-freedom parallel robot to have high precision, and not shake after stopping movement, and should not change its posture when external pressure is applied.
[0055] Based on this, the present application provides a robot control method, wherein the robot is a six-degree-of-freedom parallel robot. By combining the inverse kinematics algorithm with the industrial host computer control system and communicating with the electric cylinder via the serial port, a concise control platform is provided for the operator. The communication structure is simple and plug-and-play, which is suitable for industrial production and can achieve comprehensive and effective control.
[0056] The robot control method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown in the figure, the host computer is connected to the six electric cylinders (i.e., electric cylinder 1, electric cylinder 2, ..., electric cylinder 6) of the six-degree-of-freedom parallel robot through the serial port. Specifically, the six electric cylinders are connected in series to the communication bus of the serial port, and each communicates with the host computer independently. During the communication process, the host computer and each electric cylinder can communicate according to the agreed communication protocol (such as baud rate, check bit and other communication parameters). For example, each electric cylinder can send back status information to the host computer at a fixed time. The host computer is connected to input devices (such as keyboard, mouse, etc.) and output devices (such as display, etc.). The host computer can display the status information sent back by the electric cylinder through the output device, so that the user can observe the status information of the electric cylinder and control the speed and position of the electric cylinder through the input device connected to the host computer. For example, the electric cylinder to be controlled, as well as the target position and target speed of the electric cylinder can be specified by the host computer, so as to control the position and speed of the electric cylinder.
[0057] In one embodiment, Figure 2 As shown, a robot control method is provided, wherein the robot is a six-degree-of-freedom parallel robot. This embodiment uses the method applied to a host computer as an example for illustration. The method may include the following steps:
[0058] Step 202, responding to a first control instruction for a six-degree-of-freedom parallel robot.
[0059] Among them, the structure of the six-degree-of-freedom parallel robot is as follows Figure 3As shown, it includes an upper platform (also called a moving platform) 31 and a lower platform (also called a static platform) 32, 6 telescopic electric cylinders 33 in the middle and 6 Hooke's joints (or ball joints) 34 on the upper and lower sides. The telescopic electric cylinder 33 has a telescopic connecting rod 35. The lower platform is fixed, and the lower platform is connected to the upper platform through 6 telescopic electric cylinders and Hooke's joints. The Hooke's joint or ball joint is located at the connection between the upper platform and the 6 telescopic electric cylinders, which plays a key role in ensuring the normal operation of the platform and the rigidity of the entire structure. The upper platform can be translated along the X, Y, and Z axes or rotated around the X, Y, and Z axes by means of the telescopic electric cylinder. Generally, the telescopic electric cylinder is composed of a servo electric cylinder or a hydraulic cylinder. With the help of the telescopic movement of six telescopic electric cylinders, the upper platform can move in six degrees of freedom in space (translation of X, Y, Z or rotation around X, Y, Z axis), so as to simulate various spatial motion postures. Therefore, it can be widely used in various training simulators, such as flight simulators, car driving simulators, earthquake simulators, satellites, missiles and other aircraft, entertainment equipment (dynamic movie swing platform) and other fields. In the processing industry, it can be made into six-axis linkage machine tools, robots, etc.
[0060] The first control instruction is used to control the target position of the moving platform, so the first control instruction includes target posture information for the moving platform. Specifically, the target posture information may include at least one of the displacement of the moving platform along the X, Y, and Z axes, and the rotation angle around the X, Y, and Z axes.
[0061] In this embodiment, when the six-degree-of-freedom parallel robot needs to be controlled, a first control instruction for the target posture information of the moving platform can be directly given to the host computer. The host computer responds to the first control instruction and controls the six-degree-of-freedom parallel robot based on the following steps using inverse kinematics and the position information of the six-degree-of-freedom parallel robot's hinge, thereby eliminating the need to control each electric cylinder individually.
[0062] Step 204, calculating the elongations of the six connecting rods in the six-degree-of-freedom parallel robot according to the target posture information of the moving platform in the first control instruction.
[0063] Specifically, when the host computer receives the first control instruction for the six-degree-of-freedom parallel robot, it can calculate the elongation of the six connecting rods in the six-degree-of-freedom parallel robot based on the built-in inverse kinematics algorithm and the target posture information of the moving platform in the first control instruction. The elongation is used to characterize the telescopic length of each connecting rod when the moving platform reaches the target posture.
[0064] Step 206: When it is determined that the elongation is less than or equal to the maximum elongation of the corresponding connecting rod, generate a command frame for the corresponding connecting rod according to the elongation.
[0065] The maximum elongation may be the maximum limit elongation length of the connecting rod. The instruction frame refers to an instruction or command for specifically controlling the connecting rod.
[0066] In this embodiment, after the upper computer calculates the elongation of the six links in the six-degree-of-freedom parallel robot based on the above steps, it further determines whether the elongation of each link meets the requirements, that is, it determines whether the elongation of each link is less than or equal to the maximum elongation of the corresponding link, and when it is determined that the elongation of each link is less than or equal to the maximum elongation of the corresponding link, it generates an instruction frame for the corresponding link according to the elongation of each link.
[0067] Step 208: Send command frames to the electric cylinders corresponding to the connecting rods in sequence.
[0068] Specifically, the host computer can send instruction frames to the electric cylinders corresponding to the connecting rods in sequence, wherein the instruction frames are used to instruct the electric cylinders to control the corresponding connecting rods to move according to the elongation in the instruction frames, so that the moving platform reaches the target posture.
[0069] In the above robot control method, the host computer calculates the elongation of the six connecting rods in the six-degree-of-freedom parallel robot according to the target posture information of the moving platform in the first control instruction in response to the first control instruction to the six-degree-of-freedom parallel robot, and generates a command frame of the corresponding connecting rod according to the elongation when determining that the elongation is less than or equal to the maximum elongation of the corresponding connecting rod, and sends the command frame to the electric cylinder corresponding to each connecting rod in sequence to instruct the electric cylinder to control the corresponding connecting rod to move according to the elongation in the command frame, so that the moving platform reaches the target posture. This embodiment allows the user to directly set the target posture information of the moving platform, and uses inverse kinematics and the target posture information of the moving platform to comprehensively and effectively control the six-degree-of-freedom parallel robot, thereby eliminating the need for the user to control each electric cylinder individually, thereby improving the portability of the control of the six-degree-of-freedom parallel robot.
[0070] In an exemplary embodiment, Figure 4 As shown, the above method may also include:
[0071] Step 402, responding to a second control instruction for the six-degree-of-freedom parallel robot.
[0072] The second control instruction includes the target position of the designated electric cylinder, and thus the second control instruction is an instruction or command for controlling the designated electric cylinder to reach the target position. Specifically, the designated electric cylinder may be one or more electric cylinders that need to be controlled and that are designated by the user.
[0073] In this embodiment, when it is necessary to control a single electric cylinder or multiple electric cylinders of the six-degree-of-freedom parallel robot, the user can initiate a second control instruction for the single electric cylinder or multiple electric cylinders of the six-degree-of-freedom parallel robot, and the host computer responds to the second control instruction and performs corresponding control based on the following steps.
[0074] Step 404: convert the second control instruction into a corresponding instruction frame based on the target position.
[0075] The instruction frame is used to instruct the electric cylinder to control the corresponding single electric cylinder or multiple electric cylinders to move, so that the single electric cylinder or multiple electric cylinders reach the target position.
[0076] Specifically, the second control instruction may be an analog quantity including the target position of a single electric cylinder or multiple electric cylinders specified by the user, and the host computer may perform an analog-to-digital conversion operation internally to convert it into an instruction frame of a digital quantity.
[0077] In one scenario, in order to further improve the security of communication between the host computer and each electric cylinder, the host computer can also carry a check bit in the instruction frame based on the agreed communication protocol. For example, after the second control instruction is converted into a digital instruction frame, all the data of the instruction frame except the frame header are added up, and the last eight bits are placed at the end of the instruction frame as the check bit. Then, after receiving the instruction frame, the electric cylinder can first check the validity of the instruction frame, that is, check the check bit of the instruction frame. For example, all the data of the instruction frame except the frame header and the frame end are added up, and the last eight bits are compared with the frame end of the instruction frame. If they are the same, the check passes, otherwise the check fails. Only when the check passes, the electric cylinder performs related actions based on the instruction frame, and if the check fails, the instruction frame is discarded.
[0078] It can be understood that, in the above step 206, when the instruction frame corresponding to the connecting rod is generated according to the elongation, the generated instruction frame is also a digital quantity and carries a check bit to improve the security of communication.
[0079] Step 406: Send a command frame to the designated electric cylinder.
[0080] The command frame is used to instruct the designated electric cylinder to control the corresponding connecting rod to extend to the target position. Specifically, the host computer can send the corresponding command frame to the designated single electric cylinder or multiple electric cylinders, so that each electric cylinder controls the corresponding connecting rod to extend to the target position.
[0081] In this embodiment, the host computer responds to the second control instruction to the six-degree-of-freedom parallel robot, converts the second control instruction into a corresponding instruction frame based on the target position, and then sends the instruction frame to the designated electric cylinder, so that each electric cylinder controls the corresponding connecting rod to extend to the target position, thereby realizing position control of a single electric cylinder or multiple electric cylinders.
[0082] In one embodiment, since the six electric cylinders of the six-degree-of-freedom parallel robot share one channel, in order to prevent interference and information collision, the host computer can send command frames to the specified multiple electric cylinders in sequence based on a certain interval, that is, only send a command frame to one electric cylinder at a time. For example, if it is necessary to send command frames to two electric cylinders, after sending the command frame to the first electric cylinder, send the command frame to the second electric cylinder after a certain interval, such as 3ms. Since the electric cylinder will return response information to the host computer after receiving the command frame, and since bidirectional transmission is performed in the half-duplex channel, a certain time must be reserved to prevent the command frame sent by the host computer from colliding with the response information returned by the electric cylinder.
[0083] In one scenario, if all electric cylinders need to be controlled simultaneously, command frames can be broadcast to all electric cylinders by setting broadcast frames, so that each electric cylinder can quickly reach a given position, thereby improving control efficiency.
[0084] In an exemplary embodiment, the second control instruction may also include a target speed of the designated electric cylinder. The method may further include: converting the second control instruction into a corresponding instruction frame based on the target position and the target speed; and sending the instruction frame to the designated electric cylinder. The instruction frame is used to instruct the designated electric cylinder to control the corresponding connecting rod to extend to the target position based on the target speed.
[0085] In this embodiment, for the scenario where there is a speed requirement when the electric cylinder is extended, the target speed of the electric cylinder can be specified while specifying the target position of the electric cylinder, so that the electric cylinder can move at the specified target speed when extended, thereby realizing personalized control of the six-degree-of-freedom parallel robot.
[0086] Specifically, the target position and target speed of the electric cylinder can be set based on the control interface of the host computer. For example, a single electric cylinder or multiple electric cylinders can be specified, at least one of the target position and target speed of their movement can be set, and the "start movement" button can be pressed. The host computer converts and sends instructions based on the above method to control the electric cylinder to move accordingly according to the setting.
[0087] In an exemplary embodiment, Figure 5 As shown, the above method may also include:
[0088] Step 502, responding to a third control instruction for the six-degree-of-freedom parallel robot.
[0089] The third control instruction is used to instruct the connecting rod corresponding to the designated electric cylinder to extend to the maximum, and the designated electric cylinder includes one electric cylinder or multiple electric cylinders.
[0090] In this embodiment, when it is necessary to control the maximum extension of a single electric cylinder or multiple electric cylinders of the six-degree-of-freedom parallel robot, the user can initiate a third control instruction for the single electric cylinder or multiple electric cylinders of the six-degree-of-freedom parallel robot, and the host computer responds to the third control instruction and performs corresponding control based on the following steps.
[0091] Step 504: Send a command frame corresponding to the third control command to the designated electric cylinder.
[0092] The command frame is used to instruct the designated electric cylinder to control the corresponding connecting rod to extend to the maximum. Specifically, the host computer can send the corresponding command frame to the designated single electric cylinder or multiple electric cylinders, so that each electric cylinder controls the corresponding connecting rod to extend to the maximum.
[0093] In this embodiment, the host computer responds to the third control instruction to the six-degree-of-freedom parallel robot and converts it into a corresponding instruction frame, and then sends the instruction frame to the specified electric cylinder, so that each electric cylinder controls the corresponding connecting rod to extend to the maximum, thereby realizing control of the maximum extension of a single electric cylinder or multiple electric cylinders.
[0094] In one scenario, each electric cylinder can be configured with a control button to control the connecting rod corresponding to the electric cylinder to extend to the longest possible length. The user can specify a single electric cylinder, press the corresponding control button to extend its connecting rod to the longest possible length, and after reaching the target, press the "reset" button to return the connecting rod to the initial state. The user can also specify multiple electric cylinders, press the corresponding control buttons to extend their connecting rods to the longest possible length, thereby realizing the linkage control of multiple connecting rods. After reaching the target, press the "reset" button to return the connecting rod to the initial state.
[0095] In this embodiment, after receiving the operation of the corresponding button, the upper computer can send the control instructions built into the system according to the different selections of the buttons, so as to realize the rapid control of a single electric cylinder or multiple electric cylinders.
[0096] In an exemplary embodiment, in a scenario where a certain rule is required to be followed (such as wave simulation in a driving simulator), the moving platform can also be controlled to move in a servo mode, thereby realizing an automated simulation and enabling automatic cruising. Specifically, the user can set the six-degree-of-freedom parallel robot to the servo mode through the operation interface, and configure the motion trajectory of the moving platform, so that the moving platform can move according to a certain motion trajectory.
[0097] In an exemplary embodiment, Figure 6 As shown, in step 204, according to the target posture information of the moving platform in the first control instruction, the elongation of the six connecting rods in the six-degree-of-freedom parallel robot is calculated, which may specifically include:
[0098] Step 602: Determine the target lengths corresponding to the six connecting rods in the six-degree-of-freedom parallel robot based on the target posture information of the moving platform.
[0099] The target posture information may include at least one of the displacement of the moving platform along the X, Y, and Z axes, and the rotation angle around the X, Y, and Z axes. The target length is used to characterize the extension length of each connecting rod relative to the fully retracted state when the moving platform reaches the target posture.
[0100] Specifically, the upper computer can first determine the rotation matrix of the dynamic coordinate system corresponding to the dynamic platform relative to the static coordinate system corresponding to the static platform based on the inverse kinematics algorithm; determine the coordinate representation of the connecting rod in the dynamic coordinate system based on the target posture information of the dynamic platform; determine the coordinate representation of the connecting rod in the static coordinate system according to the coordinate representation of the connecting rod in the dynamic coordinate system and the rotation matrix; determine the target length of the connecting rod according to the coordinate representation of the connecting rod in the static coordinate system.
[0101] Step 604: Obtain the difference between the target length and the initial length corresponding to each of the six connecting rods, and determine the difference as the elongation of the corresponding connecting rod.
[0102] The initial length is the extension length of each of the six connecting rods in the six-degree-of-freedom parallel robot determined based on the initial posture information of the moving platform. Specifically, the host computer calculates the difference between the target length and the initial length of each of the six connecting rods, and determines the difference as the extension of the corresponding connecting rod.
[0103] When performing the above inverse kinematics inversion, the coordinates of the connecting rods in the six electric cylinders must be set first. Figure 7 As shown in the figure, the coordinate information corresponding to the connecting point of the connecting rod can be obtained according to the assembly drawing of the connecting rod on the dynamic and static platforms. The static coordinate system OXYZ is established on the bottom static platform and can be regarded as the reference coordinate during the platform movement. The dynamic coordinate system Pxyz is established on the top dynamic platform, as shown in the figure. Figure 8 As shown in , during the platform movement, this coordinate will undergo corresponding displacement and rotation relative to OXYZ. Fig. 9 As shown, in this embodiment, {A} represents the static coordinate system OXYZ, and {D} represents the dynamic coordinate system Pxyz.
[0104] According to the knowledge of spatial geometry, the coordinates of the connecting rod in the Pxyz coordinate system can be expressed as: i =P0+b i -B i Among them, L i is the coordinate of the i-th link in the Pxyz coordinate system, P0 is the length vector from point O to point P, b i is the position of the i-th link in the Pxyz coordinate system, B iis the position of the i-th link in the OXYZ coordinate system.
[0105] Transform it into the coordinate representation of the reference coordinate system, which is: in, is the rotation matrix of the moving coordinate system relative to the static coordinate system.
[0106] Assuming the rotation matrix According to the above calculation results, the coordinate column matrix of the connecting rod in the corresponding position can be expressed as: The elongation length of the connecting rod in the corresponding position can be expressed as By calculating the difference between its initial length under the initial posture information and its target length under the target posture information, the elongation Δl of the corresponding connecting rod can be obtained: i Among them, x bi represents the x coordinate of the i-th link in the Pxyz coordinate system, y bi represents the y coordinate of the i-th link in the Pxyz coordinate system, z bi represents the z coordinate of the i-th link in the Pxyz coordinate system. P represents the vector between the x-coordinate of the ith link in the Pxyz coordinate system and point P, Y P and Z P Similarly, X Bi represents the vector between the x coordinate of the i-th link in the Pxyz coordinate system and the corresponding point Bi in the OXYZ coordinate system, Y Bi and Z Bi Same reason.
[0107] After obtaining the elongation of the connecting rod, the host computer can edit it into a digital instruction frame and send it to the corresponding electric cylinder, so that each electric cylinder can control the corresponding connecting rod to achieve the corresponding motion target. In this embodiment, the positioning motion of the six-degree-of-freedom parallel robot has high accuracy, and its displacement error in the z-axis direction can be controlled within 0.1 microns, and the errors in the x- and y-axis directions can be controlled within 0.5 microns, thereby achieving precise motion control and meeting high-precision control requirements.
[0108] Among them, the rotation matrix The calculation method is as follows: Assume that the moving platform rotates around the moving axis zxz with the Euler angle. In the initial state, the moving and static coordinate systems have the same orientation. The moving platform first rotates around z A The axis rotates by an angle of ψ, then rotates by an angle of θ around the x′ axis, and finally rotates by an angle of θ around the z axis. B Axis rotation Angle. According to the coordinate transformation, the rotation matrix can be expressed as:
[0109]
[0110] In one embodiment, the host computer can also analyze the above control instructions by means of a fixed-position workspace, that is, analyzing whether the six-degree-of-freedom parallel robot meets the restrictions of the workspace during the movement of the corresponding control instructions. If the workspace is exceeded, a pop-up window will be displayed to remind the user. If the workspace is not exceeded, the robot can move to the specified position based on the control instruction.
[0111] The orientation workspace is limited by the rod length, hinge angle and connecting rod spacing. Fig. 9 As shown, the length vector from point O to point d at the top of the manipulator can be expressed as Od = P O +P d , where P O is the length vector from point O to point P, P d is the length vector from point P to point d. Then the position matrix of point d at the top of the manipulator in the static coordinate system OXYZ can be expressed as: Then the set of all points of point d in the static coordinate system OXYZ is the operation space.
[0112] In one scenario, the determination of the operating space can essentially also be achieved based on kinematic inverse solution. Specifically, the initial posture of the moving platform can be given first to estimate the approximate range of the workspace. Then, according to the z-axis direction, the workspace is divided into several sections in the longitudinal space. Determine the directions of the x and y axes on each section respectively, and send them to the inverse solution algorithm to observe whether the output connecting rod length meets the requirements. For example, determine whether the output connecting rod length is less than or equal to the maximum rod length of the connecting rod. If it does, then the point is a point in the workspace. If it does not, it means that the point is not a point in the workspace, and the point is discarded. By searching layer by layer, a series of point sets can be obtained, which can reflect the situation of the operating space.
[0113] Therefore, the points in the operation space can be spaced at a certain distance, using Fig.10 The scatter plot shown in the figure shows the operation space of the six-degree-of-freedom parallel robot. The operation space can reflect the flexibility of a six-degree-of-freedom parallel robot. The six-degree-of-freedom parallel robot can only move to the corresponding position when the operator specifies a point in the workspace.
[0114] In one embodiment, the status information sent back by the electric cylinder can be displayed on the operation interface of the host computer, and can also be saved in the form of a file, so that the operator can observe and debug it. The operation interface of the host computer can also switch to different tabs according to the control requirements to ensure the simplicity of the system interface. The host computer communicates with the electric cylinder through the serial port, providing the operator with a simple control platform. Its communication structure is simple and plug-and-play, which is suitable for industrial production.
[0115] In one scenario, the operation interface of the host computer can also include other debugging tools and reserve more program interfaces to facilitate the operator to make adjustments and improvements when facing actual situations. For example, the status information of six electric cylinders can be saved as files, or the instructions in a file can be sent to the six electric cylinders at a certain time interval. In the debugging interface, you can also set the receiving area and the sending area to facilitate the operator to manually send instructions to the electric cylinder or read the instructions returned by the electric cylinder. In addition, the host computer can also add an error checking function when designing. After detecting that the operator has entered illegal information, a warning pop-up window will be issued instead of terminating the program, thereby giving the operator a certain amount of error detection time and improving the portability of the operation.
[0116] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0117] Based on the same inventive concept, the embodiment of the present application also provides a robot control device for implementing the robot control method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more robot control device embodiments provided below can refer to the limitations of the robot control method above, and will not be repeated here.
[0118] In an exemplary embodiment, Fig.11 As shown, a robot control device is provided, including: an instruction response module 1102, a calculation module 1104, an instruction generation module 1106 and an instruction sending module 1108, wherein:
[0119] An instruction response module 1102 is used to respond to a first control instruction for the six-degree-of-freedom parallel robot, wherein the first control instruction includes target posture information for the moving platform;
[0120] A calculation module 1104, configured to calculate the elongation of six connecting rods in the six-degree-of-freedom parallel robot according to the target posture information of the moving platform in the first control instruction;
[0121] The instruction generation module 1106 is used to generate an instruction frame of the corresponding connecting rod according to the elongation when it is determined that the elongation is less than or equal to the maximum elongation of the corresponding connecting rod;
[0122] The instruction sending module 1108 is used to send the instruction frame to the electric cylinder corresponding to each connecting rod in sequence, and the instruction frame is used to instruct the electric cylinder to control the corresponding connecting rod to move according to the extension amount so that the moving platform reaches the target posture.
[0123] In an exemplary embodiment, the elongation of the six links in the six-degree-of-freedom parallel robot is calculated according to the target posture information of the moving platform in the first control instruction, including: determining the target lengths corresponding to the six links in the six-degree-of-freedom parallel robot based on the target posture information of the moving platform; obtaining the difference between the target lengths corresponding to the six links and the initial lengths, and determining the difference as the elongation of the corresponding link.
[0124] In an exemplary embodiment, the target lengths corresponding to the six links in the six-degree-of-freedom parallel robot are determined based on the target posture information of the moving platform, including: determining the rotation matrix of the moving coordinate system corresponding to the moving platform relative to the static coordinate system corresponding to the static platform; determining the coordinate representation of the link in the moving coordinate system based on the target posture information of the moving platform; determining the coordinate representation of the link in the static coordinate system according to the coordinate representation of the link in the moving coordinate system and the rotation matrix; determining the target length of the link according to the coordinate representation of the link in the static coordinate system.
[0125] In an exemplary embodiment, it also includes: responding to a second control instruction to the six-degree-of-freedom parallel robot, the second control instruction including a target position of a specified electric cylinder; converting the second control instruction into a corresponding instruction frame based on the target position; sending the instruction frame to the specified electric cylinder, the instruction frame being used to instruct the specified electric cylinder to control the corresponding connecting rod to extend to the target position.
[0126] In an exemplary embodiment, the second control instruction also includes a target speed of the designated electric cylinder; the method further includes: converting the second control instruction into a corresponding instruction frame based on the target position and the target speed; sending the instruction frame to the designated electric cylinder, wherein the instruction frame is used to instruct the designated electric cylinder to control the corresponding connecting rod to extend to the target position based on the target speed.
[0127] In an exemplary embodiment, it also includes: responding to a third control instruction to the six-degree-of-freedom parallel robot, the third control instruction is used to instruct the connecting rod corresponding to the designated electric cylinder to extend to the maximum, and the designated electric cylinder includes one electric cylinder or multiple electric cylinders; sending an instruction frame corresponding to the third control instruction to the designated electric cylinder, and the instruction frame is used to instruct the designated electric cylinder to control the corresponding connecting rod to extend to the maximum.
[0128] Each module in the above robot control device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0129] In an exemplary embodiment, a computer device is provided. The computer device may be a host computer, and its internal structure diagram may be as shown in FIG. Fig.12 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a robot control method is implemented. The display unit of the computer device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0130] Those skilled in the art will understand that Fig.12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0131] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0132] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0133] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0134] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0135] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0136] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0137] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A robot control method, characterized in that: The robot is a six-degree-of-freedom parallel robot, and the method comprises: In response to a first control instruction for the six-degree-of-freedom parallel robot, the first control instruction includes target posture information for a moving platform; Calculating the elongation of six connecting rods in the six-degree-of-freedom parallel robot according to the target posture information of the moving platform in the first control instruction; In the case where it is determined that the elongation is less than or equal to the maximum elongation of the corresponding connecting rod, generating a command frame of the corresponding connecting rod according to the elongation; The instruction frames are sent sequentially to the electric cylinders corresponding to the connecting rods, respectively, and the instruction frames are used to instruct the electric cylinders to control the corresponding connecting rods to move according to the elongation amount so that the moving platform reaches the target posture.
2. The method according to claim 1, characterized in that The step of calculating the elongation of six connecting rods in the six-degree-of-freedom parallel robot according to the target posture information of the moving platform in the first control instruction comprises: Based on the target posture information of the moving platform, determining the target lengths corresponding to the six connecting rods in the six-degree-of-freedom parallel robot respectively; The differences between the target lengths and the initial lengths respectively corresponding to the six connecting rods are obtained, and the differences are determined as the elongation of the corresponding connecting rods.
3. The method according to claim 2, characterized in that The step of determining target lengths corresponding to six connecting rods in the six-degree-of-freedom parallel robot based on the target posture information of the moving platform comprises: Determine a rotation matrix of a moving coordinate system corresponding to the moving platform relative to a static coordinate system corresponding to the static platform; Based on the target posture information of the moving platform, determining the coordinate representation of the connecting rod in the moving coordinate system; Determine the coordinate representation of the connecting rod in the static coordinate system according to the coordinate representation of the connecting rod in the dynamic coordinate system and the rotation matrix; The target length of the connecting rod is determined according to the coordinate representation of the connecting rod in the static coordinate system.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: In response to a second control instruction to the six-degree-of-freedom parallel robot, the second control instruction includes specifying a target position of the electric cylinder; converting the second control instruction into a corresponding instruction frame based on the target position; The instruction frame is sent to the designated electric cylinder, where the instruction frame is used to instruct the designated electric cylinder to control the corresponding connecting rod to extend to the target position.
5. The method according to claim 4, characterized in that The second control instruction also includes a target speed of the designated electric cylinder; the method further includes: converting the second control instruction into a corresponding instruction frame based on the target position and the target speed; The instruction frame is sent to the designated electric cylinder, where the instruction frame is used to instruct the designated electric cylinder to control the corresponding connecting rod to extend to the target position based on the target speed.
6. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: In response to a third control instruction to the six-degree-of-freedom parallel robot, the third control instruction is used to instruct a connecting rod corresponding to a designated electric cylinder to extend to a maximum, the designated electric cylinder comprising one electric cylinder or a plurality of electric cylinders; A command frame corresponding to the third control command is sent to the designated electric cylinder, wherein the command frame is used to instruct the designated electric cylinder to control the corresponding connecting rod to extend to the maximum.
7. A robot control device, characterized in that: The robot is a six-degree-of-freedom parallel robot, and the device comprises: An instruction response module, used to respond to a first control instruction for the six-degree-of-freedom parallel robot, wherein the first control instruction includes target posture information for the moving platform; a calculation module, configured to calculate the elongation of six connecting rods in the six-degree-of-freedom parallel robot according to the target posture information of the moving platform in the first control instruction; An instruction generation module, configured to generate an instruction frame of the corresponding connecting rod according to the elongation when it is determined that the elongation is less than or equal to the maximum elongation of the corresponding connecting rod; The instruction sending module is used to send the instruction frames to the electric cylinders corresponding to the connecting rods in sequence, and the instruction frames are used to instruct the electric cylinders to control the corresponding connecting rods to move according to the elongation amount so that the moving platform reaches the target posture.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.