WO2018129705A1 - Method and apparatus for use in determining inverse solution for robots in series connection - Google Patents

Method and apparatus for use in determining inverse solution for robots in series connection Download PDF

Info

Publication number
WO2018129705A1
WO2018129705A1 PCT/CN2017/071083 CN2017071083W WO2018129705A1 WO 2018129705 A1 WO2018129705 A1 WO 2018129705A1 CN 2017071083 W CN2017071083 W CN 2017071083W WO 2018129705 A1 WO2018129705 A1 WO 2018129705A1
Authority
WO
WIPO (PCT)
Prior art keywords
joint
random
coordinate
coordinates
end joint
Prior art date
Application number
PCT/CN2017/071083
Other languages
French (fr)
Chinese (zh)
Inventor
任岭雪
王磊
熊璟
Original Assignee
中国科学院深圳先进技术研究院
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中国科学院深圳先进技术研究院 filed Critical 中国科学院深圳先进技术研究院
Priority to PCT/CN2017/071083 priority Critical patent/WO2018129705A1/en
Publication of WO2018129705A1 publication Critical patent/WO2018129705A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B13/00Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion
    • G05B13/02Adaptive control systems, i.e. systems automatically adjusting themselves to have a performance which is optimum according to some preassigned criterion electric

Definitions

  • Embodiments of the present disclosure relate to robot control techniques, for example, to a method and apparatus for determining a reverse solution result of a tandem robot.
  • Bionic robots have been applied to many fields. Bionic robots can replace or partially replace people in difficult environments, such as earthquake disasters or the medical industry. In the medical industry, robots can be made small enough to enter spaces that cannot be reached by human hands. The natural cavity of the human body (such as the esophagus) is completed or administered at a fixed point. However, some environments do not allow the robot to operate completely autonomously, such as a medical operating environment or a very complex earthquake-stricken environment. It requires experienced people to manipulate these robots to perform the corresponding tasks.
  • the master-slave control system can be used to control the robot.
  • the master-slave control system it is generally necessary to have a master operator, a slave operator, and a control system.
  • the main operator is generally operated by a person, and the operator is generally a tandem robot.
  • the real-time requirements between the master and the slave are high.
  • the response time of the motor and controller in the control system of the master-slave robot is short, and the communication time between the master and slave robots is very short. It is easy to meet the real-time requirements.
  • the difficulty is that the calculation result of the inverse solution of the tandem robot is longer. .
  • the master-slave mode can be used to perform the master-slave operation, and the master-slave heterogeneous robot mostly uses the Jacobian algorithm to control the speed of the master robot in the three-dimensional space.
  • Kinematic modeling calculating the Jacobian matrix from the robot, inverts the Jacobian matrix.
  • the Jacobian matrix control algorithm is suitable for the case where the degree of freedom of the robot (the number of joints of the tandem robot) can be reduced to 3 or 6, but the cumulative error of the displacement is large, and the Jacobian matrix will be invalid at the singular position, thus for high redundancy.
  • the tandem robot (12 degrees of freedom or more), this method does not apply.
  • the cyclic coordinate descent method, the Newton method, the quasi-Newton method in the numerical method, or the combination of two or two of these three, neural network, etc. although they can be used, the slow speed of these algorithms is limited, and there are limitations. It is expensive to calculate and store, so it is not practical for serial robots.
  • Embodiments of the present disclosure provide a method and apparatus for determining a reverse solution result of a serial robot, which can be fast The result of the inverse solution of the tandem robot is accurately obtained.
  • an embodiment of the present disclosure provides a method for determining a reverse solution result of a serial robot, including:
  • each random joint variable group includes a joint variable corresponding to each of the front end joints
  • the approximate coordinate is a random coordinate in which the error of the random coordinate and the target coordinate is within an error threshold range.
  • an embodiment of the present disclosure further provides an apparatus for determining a result of a reverse solution of a serial robot, including:
  • a target coordinate acquiring module configured to acquire target coordinates of an end joint of the tandem robot, wherein at least one front end joint is connected in series above the end joint;
  • a random joint variable group generating module is connected to the target coordinate acquiring module, and is configured to randomly generate a plurality of random joint variable groups, wherein each random joint variable group includes a joint variable corresponding to each of the front end joints respectively;
  • a random coordinate calculation module connected to the random joint variable group generating module, configured to calculate a random coordinate of the end joint according to each of the random joint variable groups;
  • An approximate coordinate selection module coupled to the random coordinate calculation module, configured to select an approximate coordinate of the end joint in the random coordinate according to the target coordinate;
  • the inverse solution result determining module is connected to the approximate coordinate selecting module, and is configured to determine an inverse solution result of the target coordinate according to the random joint variable group corresponding to the approximate coordinate;
  • the approximate coordinate is an error of the random coordinate and the target coordinate in an error threshold Random coordinates within the perimeter.
  • the present disclosure also provides a non-transitory computer readable storage medium storing computer executable instructions arranged to perform the methods described above.
  • the present disclosure also provides a tandem robot comprising:
  • At least one processor At least one processor
  • the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the method described above.
  • the random coordinates of the end joints are calculated, and the approximate coordinates of the end joints are selected in the random coordinates to determine the inverse solution result of the target coordinates.
  • the method in the embodiment of the present disclosure can be applied to a series robot with arbitrary degrees of freedom, and the result of inverting the solution is fast, the precision of the inverse solution is high, the overhead on calculation and storage is small, and the cumulative error is small.
  • FIG. 1 is a flowchart of a method for determining a reverse solution result of a serial robot according to Embodiment 1 of the present disclosure
  • FIG. 2 is a flow chart of a method for determining a reverse solution result of a serial robot according to Embodiment 2 of the present disclosure
  • FIG. 3 is a flowchart of a method for determining a reverse solution result of a serial robot according to Embodiment 3 of the present disclosure
  • FIG. 4 is a flow chart of a method for determining a reverse solution result of a serial robot according to Embodiment 4 of the present disclosure
  • FIG. 5 is a schematic structural diagram of an apparatus for determining a reverse solution result of a serial robot according to Embodiment 5 of the present disclosure
  • FIG. 6 is a schematic diagram of a closed-loop control system of a master-slave robot for implementing a method for determining a result of a reverse solution of a serial robot according to Embodiment 6 of the present disclosure
  • FIG. 7 is a schematic diagram of a joint coordinate system in a method for determining a reverse solution result of a tandem robot according to Embodiment 6 of the present disclosure
  • FIG. 8 is a schematic structural diagram of an electronic device according to Embodiment 8 of the present disclosure.
  • Embodiment 1 is a flowchart of a method for determining an inverse solution result of a tandem robot according to Embodiment 1 of the present disclosure.
  • This embodiment is applicable to a case where a joint robot coordinates are known to solve each joint variable, and the method can determine a tandem robot.
  • the device that performs the inverse solution is implemented by software, hardware, or software and hardware.
  • the device can be integrated into a device that provides storage and computing functions, such as a typical personal computer (Personal Computer, PC). )Wait.
  • step 110 target coordinates of the end joints of the tandem robot are acquired, wherein at least one front end joint is connected in series above the end joints.
  • the tandem robot is connected in series with a plurality of joints, and the end joint is an end joint, and the joint above the end joint can be referred to as a front joint.
  • the control result can be expressed by the position and posture of the end joint of the tandem robot, but in order to enable the end joint to reach a preset position and posture, each front joint needs to cooperate with each other.
  • the target coordinates of the end joint may be represented by coordinates of a position that the desired end joint can reach and coordinates of the posture.
  • the joint variables of each front joint are calculated by the following steps, and the end joints can be adjusted above the target coordinates.
  • step 120 a plurality of random joint variable groups are randomly generated, wherein each random joint variable group includes joint variables respectively corresponding to each of the front end joints.
  • Each joint has a corresponding joint variable.
  • the joint variable can indicate the motion of the joint.
  • the motion of all joints of the entire tandem robot can be represented by a joint variable group, and the joint variable group includes joint variables of each front joint.
  • the position and posture of the corresponding end are also random, and the position and posture of the obtained end may be ideal, or may be unsatisfactory, and may be ideal after screening.
  • the random joint variable group can be generated by a random function, and the random joint variable can be limited to a certain range according to the range of motion of the joint.
  • ⁇ n is the joint angle of the nth joint
  • ⁇ Min-n is the minimum joint angle of the nth joint
  • ⁇ Max-n is the maximum joint angle of the nth joint
  • N is the total number of joint angles included in the random joint variable
  • N is consistent with the total number of front joints.
  • the number of groups of random joint variable groups generated can be set according to the accuracy of the solution, and the number of groups of random joint variable groups can be increased, which can improve the accuracy of the results.
  • the present embodiment is applicable to a tandem robot of any joint number (degree of freedom).
  • step 130 random coordinates of the end joint are calculated based on each of the random joint variable sets.
  • the position and posture of the end joint are determined, that is, the coordinates of the end joint are determined.
  • a base coordinate system and a joint coordinate system can be established, and a transformation matrix between each two coordinate systems and a coordinate transformation matrix of the end joint to the base coordinate system are determined by the connection relationship between the joints, by substituting each random joint variable group into Go to the coordinate transformation matrix and get the random coordinates of the corresponding multiple end joints.
  • step 140 approximate coordinates of the end joint are selected in the random coordinates according to the target coordinates.
  • the random joint variable group is randomly generated, and the probability that the random coordinates are the same as the target coordinates is small.
  • the error threshold can be set, and the random coordinates within the error threshold range are used as the approximate coordinates of the end joint, which is convenient for screening.
  • the number of approximate coordinates selected may be one or more. Wherein, a random coordinate with the smallest error value between the target coordinates may be used as the approximate coordinate; or a plurality of random coordinates that satisfy the preset error condition with the error value between the target coordinates may be used as the approximate coordinate.
  • step 150 an inverse solution result of the target coordinates is determined according to a random joint variable group corresponding to the approximate coordinates.
  • the approximate coordinate is a random coordinate in which the error of the random coordinate and the target coordinate is within an error threshold range.
  • the approximate coordinates of the end joints have corresponding random joint variable groups. When each joint moves according to the joint variables in the random joint variable group, the end joints can be placed at positions corresponding to the approximate coordinates close to the target coordinates. Therefore, the random joint variable group corresponding to the approximate coordinates can be used as the inverse solution result of the target coordinates.
  • the genetic algorithm can be used to take into account the principle of "multiple moving small joints, less moving large joints” and “the joint angle of each tandem robot is smaller than the last moving angle", and the inverse solution result of the target coordinates is determined. Wherein the large joint is the front joint and the small joint is the end joint.
  • the random coordinates of the end joints are calculated, and the approximate coordinates of the end joints are selected in the random coordinates to determine the inverse solution result of the target coordinates.
  • the method in this embodiment is applicable to a series robot with arbitrary degrees of freedom, and the result of inverting the solution is fast, the precision of the inverse solution is high, the overhead on calculation and storage is small, and there is no accumulated error.
  • FIG. 2 is a flowchart of a method for determining a reverse solution result of a serial robot according to Embodiment 2 of the present disclosure, and Embodiment 2 is based on the foregoing embodiment.
  • the method for determining the inverse solution result of the serial robot provided by this embodiment includes steps 210 to 280.
  • the steps 210, 220, 270, and 280 are the same as the steps 110, 120, 140, and 150 in the first embodiment, respectively.
  • step 210 target coordinates of the end joints of the tandem robot are acquired, wherein at least one front end joint is connected in series above the end joints.
  • step 220 a plurality of random joint variable groups are randomly generated, wherein each random joint variable group includes joint variables respectively corresponding to each of the front end joints.
  • step 230 a base coordinate system of the tandem robot and a joint coordinate system for each joint are established.
  • the DH modeling method can be applied to establish the base coordinate system O 0 (x 0 , y 0 , z 0 ) of the tandem robot, and the joint coordinate system O i (x i , y of each joint). i , z i ), where i ⁇ [1, n], n is the total number of joints included in the tandem robot.
  • the joint variable in each joint coordinate system represents the motion of the joint.
  • the joint variables in the joint coordinate system can be uniformly converted into the base coordinate system and represented by the coordinates in the base coordinate system.
  • step 240 a transformation matrix between adjacent two coordinate systems is determined based on the base coordinate system and the joint coordinate system.
  • connection relationship between joints determines the transformation matrix between two adjacent coordinate systems
  • the variables of the joint coordinate system can be represented by the adjacent joint coordinate system, and the joint coordinate system can be converted into a base coordinate system after several transformations.
  • step 250 a transformation matrix of the end joints in the base coordinate system is calculated as the preset coordinate transformation matrix.
  • Each set of random joint variable groups corresponds to the random coordinates of the end joints.
  • This correspondence relationship may be the transformation matrix of the end joints in the base coordinate system.
  • the connection relationship between each joint is also determined.
  • the preset coordinate transformation matrix is determined.
  • the coordinate transformation matrix of the coordinate system of the end joint to the base coordinate system O 0 (x 0 , y 0 , z 0 ) Can be transformed matrix between two adjacent coordinate systems Multiply item by item,
  • d 1x , d 1y , d 1z , d 2x , d 2y , d 2z , d 3x , d 3y , and d 3z are used to represent the posture of the end joint, and p x , p y , and p z are used to represent the end joint. position.
  • each random joint variable group is substituted into a preset coordinate transformation matrix to obtain a plurality of random coordinates corresponding to the end joint.
  • the preset coordinate transformation matrix can be transformed matrix between two adjacent coordinate systems By item by right multiplication, so d 1x , d 1y , d 1z , d 2x , d 2y , d 2z , d 3x , d 3y , d 3z , p x , p y , and p z in the preset coordinate transformation matrix
  • the value is a function of each joint variable
  • each random joint variable group is substituted into a preset coordinate transformation matrix to obtain a plurality of random coordinates corresponding to the end joint.
  • the random joint variable group represents the motion of each joint
  • the preset coordinate transformation matrix represents the connection relationship between the joints, and the combination of the two can obtain the corresponding random coordinates.
  • step 270 approximate coordinates of the end joint are selected in the random coordinates according to the target coordinates.
  • step 280 an inverse solution result of the target coordinates is determined according to a random joint variable group corresponding to the approximate coordinates.
  • each random joint variable group by substituting each random joint variable group into a preset coordinate transformation matrix, a plurality of random coordinates corresponding to the end joint are obtained, and the difference between the random coordinates and the target coordinates is verified. Whether the corresponding random joint variable group can be used as an inverse solution simplifies the process of inverting the solution of the tandem robot.
  • FIG. 3 is a flowchart of a method for determining a reverse solution result of a serial robot according to Embodiment 3 of the present disclosure, and Embodiment 3 is based on the foregoing embodiment.
  • the method for determining the reverse solution result of the serial robot provided by this embodiment includes steps 310 to 360. Steps 310-330 and step 360 are the same as steps 110-130 and 150 in the first embodiment, respectively.
  • step 310 target coordinates of the end joints of the tandem robot are acquired, wherein at least one front end joint is connected in series above the end joints.
  • step 320 a plurality of random joint variable groups are randomly generated, wherein each random joint variable group includes joint variables respectively corresponding to each of the front end joints.
  • step 330 random coordinates of the end joint are calculated based on each of the random joint variable groups.
  • step 340 an error value between the target coordinates of the end joint and the random coordinates of the end joint is calculated.
  • the coordinates of the end joint contain the position coordinates and attitude coordinates of the end joint, so the error values include position error and attitude error. Since the coordinates of the end joint are a function of the joint variable and the target coordinates of the end joint are known quantities, the error value is a function of the random joint variable.
  • calculating an error value between a target coordinate of the end joint and a random coordinate of the end joint including:
  • An error value ⁇ E between the target coordinates of the end joint and the random coordinates of the end joint is calculated.
  • ⁇ P represents the position difference
  • ⁇ R represents the attitude difference
  • ⁇ ⁇ and ⁇ ⁇ are the weights of the position difference ⁇ P and the attitude difference ⁇ R
  • P s is the target position of the end joint
  • p sj is the target position component of the end joint
  • d sj is the target pose of the end joint
  • P s , p sj and d sj can be obtained from the target coordinates of the end joint
  • P r is the random position of the end joint
  • P rj is the random position component of the end joint
  • is the calculation of the target position of the end joint and the random position of the end joint. The distance between them.
  • the appropriate ⁇ ⁇ can be selected to make the attitude error and the position error converge synchronously.
  • ⁇ ⁇ can be greater than 10 4 . If the motion state of the robot requires higher accuracy for the end position, the value of ⁇ ⁇ can be 0; if the position and attitude need to satisfy a certain precision, the value of ⁇ ⁇ can be 10 6 .
  • step 350 the random coordinates of the end joint whose error value is less than the error threshold are obtained as approximate coordinates of the end joint.
  • the error value of the random coordinates of the end joint and the target coordinate is smaller than the error threshold, indicating that the random coordinates of the end joint are very similar to the target coordinates, and the random coordinates of the end joint can be used as the approximate coordinates of the end joint.
  • step 360 an inverse solution result of the target coordinates is determined based on a random joint variable group corresponding to the approximate coordinates.
  • FIG. 4 is a flowchart of a method for determining a reverse solution result of a serial robot according to Embodiment 4 of the present disclosure, and Embodiment 4 is based on the foregoing embodiment.
  • the method for determining the inverse solution result of the serial robot provided by this embodiment includes step 410 to step 4110.
  • the steps 410-440 are the same as the steps 110-140 in the first embodiment.
  • step 410 the target coordinates of the end joints of the tandem robot are acquired, wherein at least one front end joint is connected in series above the end joint.
  • step 420 a plurality of random joint variable groups are randomly generated, wherein each random joint variable group includes joint variables respectively corresponding to each of the front end joints.
  • step 430 random coordinates of the end joint are calculated based on each of the random joint variable sets.
  • step 440 the end joint is selected in the random coordinates according to the target coordinates Approximate coordinates.
  • step 450 a random joint variable group corresponding to at least two of the approximate coordinates is acquired as a candidate random joint variable group.
  • Step 460 to step 4120 are processes for selecting an optimal inverse solution result from the group of random joint variables to be selected.
  • the tandem robot has many joints. When the joint movement amount is the same, the joint away from the end joint consumes more energy than the joint near the end joint, so it is possible to give priority to the distal joint when searching for the optimal inverse solution result.
  • the amount of joint movement is small. In summary, the minimum amount of joint movement can be found one by one from the joint farthest from the end joint and toward the end joint.
  • step 460 a front end joint that is furthest from the end joint is selected as the current alignment joint.
  • a method for selecting the optimal inverse solution result from the selected random joint variable group is to select the candidate random joint variable group with the smallest joint movement amount as the optimal inverse solution result. Since the tandem robot has multiple joints, the minimum amount of joint movement can be found one by one. When the amount of joint movement is the same, the energy of the joint away from the end is much more consumed than the joint near the end, and it is possible to preferentially ensure that the amount of joint movement away from the end joint is small. So at the beginning you can select the front joint that is furthest from the end joint as the current comparison joint.
  • step 470 joint variables corresponding to the current comparison joint are acquired in each of the selected random joint variable groups.
  • the joint variable of each joint is included in the group of random joint variables to be selected.
  • Each candidate random joint variable group corresponds to a set of joint variables. Because it is a joint-by-joint comparison, the joint variable of the current alignment joint can be obtained for each comparison.
  • step 480 a joint movement amount of the current comparison joint corresponding to each of the candidate random joint variable groups is determined according to the joint variable.
  • step 490 the joint movement amount of at least two of the current comparison joints is compared, and the candidate random joint variable group corresponding to the minimum joint movement amount of the current comparison joint is taken as the preferred random joint variable group.
  • the random joint variable group is selected for screening, and the minimum joint movement amount of the current joint is found, and the candidate random joint corresponding to the joint movement amount of the smallest current comparison joint is selected.
  • the variable group is the preferred random joint variable group.
  • the preferred random joint variable group is the current optimal inverse solution result. Optimization can continue when there are more than one set of preferred random joint variable groups.
  • step 4100 it is determined whether the number of preferred random joint variable groups is greater than 1. If the number of preferred random joint variable groups is greater than 1, step 4110 is performed, and if the number of preferred random joint variable groups is 1, then step 4120 is performed.
  • step 4110 the front end joint adjacent to the current alignment joint is selected as the current alignment joint toward the end joint, and the flow returns to step 470.
  • the front end joint adjacent to the current alignment joint is selected as the current comparison joint toward the end joint, and the smallest current ratio is selected.
  • the candidate random joint variable group corresponding to the joint movement amount of the joint is selected as the preferred random joint variable group.
  • the new current alignment joint can also select the second or third front joint adjacent to the current alignment joint near the end joint.
  • step 4120 the preferred set of random joint variables is taken as the inverse of the target coordinates.
  • the error between the random coordinates of the end joint corresponding to the random joint variable group and the target coordinate is within the error threshold range, and preferably the energy consumption of the joint movement of the random joint variable group is the smallest, which can be used as the inverse solution result of the target coordinate.
  • the group of random joint variables to be selected corresponding to the minimum joint movement amount is the inverse of the least energy consumed when the tandem robot moves the joint. Solve the result.
  • FIG. 5 is a schematic structural diagram of an apparatus for determining a reverse solution result of a serial robot according to Embodiment 5 of the present disclosure. It is intended that the apparatus can perform the method of determining the inverse solution result of the tandem robot in the above embodiment.
  • the apparatus includes: a target coordinate acquisition module 501, a random joint variable group generation module 502, a random coordinate calculation module 503, an approximate coordinate selection module 504, and an inverse solution result determination module 505.
  • the target coordinate acquisition module 501 is configured to acquire target coordinates of the end joints of the tandem robot, wherein at least one front end joint is connected in series above the end joint.
  • the random joint variable group generating module 502 is connected to the target coordinate acquiring module 501 and configured to randomly generate a plurality of random joint variable groups, wherein each random joint variable group includes a joint corresponding to each of the front end joints respectively variable.
  • the random coordinate calculation module 503 is connected to the random joint variable group generation module 502, and is configured to calculate the random coordinates of the end joint according to each of the random joint variable groups.
  • the approximate coordinate selection module 504 is connected to the random coordinate calculation module 503, and is configured to select an approximate coordinate of the end joint in the random coordinate according to the target coordinate.
  • the inverse solution result determining module 505 is connected to the approximate coordinate selecting module 504, and is configured to determine an inverse solution result of the target coordinate according to the random joint variable group corresponding to the approximate coordinate.
  • the random coordinates of the end joints are calculated, and the approximate coordinates of the end joints are selected in the random coordinates to determine the inverse solution result of the target coordinates.
  • the method in this embodiment is applicable to a series robot with arbitrary degrees of freedom, and the result of inverting the solution is fast, the precision of the inverse solution is high, the overhead on calculation and storage is small, and there is no accumulated error.
  • the random coordinate calculation module includes a coordinate transformation matrix unit configured to substitute each random joint variable group into a preset coordinate transformation matrix to obtain a plurality of random coordinates corresponding to the end joint.
  • the random coordinate calculation module further includes a coordinate system establishing unit, a transformation matrix determining unit, and a coordinate transformation matrix calculating unit.
  • a coordinate system establishing unit is configured to establish a base coordinate system O 0 (x 0 , y 0 , z 0 ) of the tandem robot, and a joint coordinate system O i (x i , y i , z i ) of each joint, wherein i ⁇ [1, n], n is the total number of joints included in the tandem robot.
  • a transformation matrix determining unit connected to the coordinate system establishing unit, configured to determine a transformation matrix between two adjacent coordinate systems according to the base coordinate system and the joint coordinate system
  • a coordinate transformation matrix calculation unit respectively connected to the transformation matrix determination unit and the coordinate transformation matrix unit, and configured to be according to a formula Calculating a transformation matrix of the end joint in the base coordinate system O 0 (x 0 , y 0 , z 0 ) Will be said As the preset coordinate transformation matrix.
  • d 1x , d 1y , d 1z , d 2x , d 2y , d 2z , d 3x , d 3y , and d 3z are used to represent the posture of the end joint
  • p x , p y , and p z are used to represent the end joint.
  • a position the values of d 1x , d 1y , d 1z , d 2x , d 2y , d 2z , d 3x , d 3y , d 3z , p x , p y , and p z are determined by each of the front ends
  • the joint variables corresponding to the joints are determined.
  • each random joint variable group by substituting each random joint variable group into a preset coordinate transformation matrix, a plurality of random coordinates corresponding to the end joint are obtained, and the corresponding random joint can be determined by checking the difference between the random coordinates and the target coordinates. Whether the variable group can be used as an inverse solution simplifies the process of inverting the solution of the tandem robot.
  • the approximate coordinate selection module includes an error value calculation unit and an error value determination unit.
  • the error value calculation unit is configured to calculate an error value between the target coordinates of the end joint and the random coordinates of the end joint.
  • the error value judging unit is connected to the error value calculating unit and configured to acquire the random coordinates of the end joint whose error value is smaller than the error threshold as the approximate coordinates of the end joint.
  • the inverse solution result determining module includes a random joint variable group acquiring unit to be selected, a current matching joint selecting unit, a joint variable acquiring unit, a movement amount determining unit, a screening random joint variable group unit, and a reduced random joint variable group quantity value.
  • Unit and inverse solution result acquisition unit are included in the inverse solution result determining module.
  • the candidate random joint variable group obtaining unit is configured to acquire a random joint variable group respectively corresponding to at least two of the approximate coordinates as a candidate random joint variable group.
  • the current comparison joint selection unit is connected to the candidate random joint variable group acquisition unit, and is configured to select a front end joint farthest from the end joint as the current comparison joint.
  • the joint variable acquiring unit is connected to the current matching joint selecting unit, and is configured to acquire a joint variable corresponding to the current matching joint in each of the selected random joint variable groups.
  • the movement amount determining unit is connected to the joint variable acquiring unit, and is configured to determine, according to the joint variable, a joint movement amount of the current comparison joint corresponding to each of the candidate random joint variable groups.
  • the random joint variable group unit is screened, and is connected to the movement amount determining unit, and the candidate random joint variable group corresponding to the minimum joint movement amount of the current comparison joint is used as the preferred random joint variable group.
  • the front end joint adjacent to the joint serves as a current alignment joint, and returns an operation of acquiring a joint variable corresponding to the current comparison joint in each of the selected random joint variable groups.
  • the group of random joint variables to be selected corresponding to the minimum amount of joint movement is taken as the opposite of the minimum energy consumed when the tandem robot moves the joint. Solve the result.
  • ⁇ P represents the position difference
  • ⁇ R represents the attitude difference
  • ⁇ ⁇ and ⁇ ⁇ are the weights of the position difference ⁇ P and the attitude difference ⁇ R
  • P s is the target position of the end joint
  • p sj is the target position component of the end joint
  • d sj is the target pose of the end joint
  • P s , p sj and d sj can be obtained from the target coordinates of the end joint
  • P r is the random position of the end joint
  • p rj is the random position component of the end joint
  • is the calculation of the target position of the end joint and the random position of the end joint. The distance between them.
  • the apparatus for determining the inverse solution result of the serial robot provided by the embodiment of the present disclosure may be used to perform the method for determining the inverse solution result of the serial robot provided by any embodiment of the present disclosure, and has the corresponding functions and beneficial effects of performing the method.
  • FIG. 6 is a schematic diagram of a closed-loop control system of a master-slave robot for implementing a method for determining a result of a reverse solution of a tandem robot according to a sixth embodiment of the present disclosure
  • FIG. 7 is a method for determining an inverse solution result of a tandem robot according to a sixth embodiment of the present disclosure. Schematic diagram of the joint coordinate system.
  • a system for determining the inverse solution result of the tandem robot includes: an operator 601, a master robot 602, a PC 603, a controller 604, a slave robot 605, and an optical tracker 606, as shown in FIG.
  • the master robot 602 communicates with the PC 603 via a Transmission Control Protocol/Internet Protocol (TCP/IP) protocol, and the controller 604 communicates with the PC 603 via Ethernet.
  • TCP/IP Transmission Control Protocol/Internet Protocol
  • Figure 7 shows three joints of the slave robot, including a first joint 701, a second joint 702, and an end joint 703, and a base coordinate system is established on the first joint, and an intermediate coordinate system is established on the second joint 702. An end coordinate system is established on the end joint 703. It will be understood by those skilled in the art that the number of joints from the robot can be any other value.
  • the operator 601 operates the master robot 602, and transmits the motion command of the master robot 601 to the slave robot 605 via the PC 603 and the controller 604.
  • the optical tracker 606 feeds the operator 601 back to the current motion state and position state of the slave robot 605.
  • the motion command received by the PC 603 from the master robot 602 is the target coordinate of the end joint 703 from the robot 605, and the PC 603 applies the method of determining the inverse solution result of the tandem robot provided by the above-described embodiment of the present disclosure to obtain the first slave robot 605.
  • the joint variables of the joint 701 and the second joint 702, the controller 604 controls the movement of each joint from the robot 605 according to the joint variable such that the end joint is at the target coordinates.
  • the present embodiment provides a master-slave robot system and a joint structure of the slave robot using a method for determining the inverse solution result of the tandem robot, so that the PC can quickly and accurately obtain the target coordinates of the end joint of the robot according to the master robot.
  • the joint variable from each joint of the robot is obtained, and the controller controls the movement of the slave robot in real time according to the joint variable.
  • the present disclosure also provides a non-transitory computer readable storage medium storing computer executable instructions arranged to perform the method of any of the above embodiments.
  • the present disclosure also provides a hardware structure diagram of an electronic device.
  • the electronic device includes:
  • At least one processor 80 which is exemplified by a processor 80 in FIG. 8; and a memory 81, may further include a communication interface 82 and a bus 83.
  • the processor 80, the communication interface 82, and the memory 81 can complete communication with each other through the bus 83.
  • Communication interface 82 can transmit information.
  • the processor 80 can call the logic instructions in the memory 81 to perform a method of determining the result of the tandem robot inverse solution.
  • logic instructions in the memory 81 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
  • the memory 81 is a computer readable storage medium, and can store a software program, a computer executable program, a program instruction or a module corresponding to the method in the embodiment of the present disclosure.
  • the processor 80 executes the functional application and the data processing by running a software program, an instruction or a module stored in the memory 81, that is, a method of determining the inverse solution result of the tandem robot.
  • the memory 81 may include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to use of the terminal device, and the like. Further, the memory 81 may include a high speed random access memory, and may also include a nonvolatile memory.
  • the technical solution of the present disclosure may be embodied in the form of a software product stored in a storage medium, including one or more instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) Performing all or part of the steps of the method of the embodiments of the present disclosure.
  • the foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • the method and device for determining the inverse solution result of the serial robot provided by the embodiment of the present disclosure can be quickly quasi-standard Calculate the result of the inverse solution.

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Manipulator (AREA)

Abstract

A method and an apparatus for use in determining an inverse solution for robots in series connection. The method comprises: acquiring a target coordinate of a terminal joint of a robot in series connection, wherein at least one front end joint is connected in series above the terminal joint (110); randomly generating a plurality of random joint variable sets, wherein each random joint variable set comprises therein a joint variable which corresponds to each front end joint (120) respectively; calculating random coordinates of the terminal joint according to each random joint variable set (130); selecting an approximate coordinate of the terminal joint from the random coordinates according to the target coordinate (140); and determining an inverse solution of the target coordinate according to a random joint variable set which corresponds to the approximate coordinate (150); the approximate coordinate is a random coordinate wherein an error of the random coordinate and the target coordinate is within an error threshold.

Description

确定串联机器人反解结果的方法及装置Method and device for determining reverse solution result of serial robot 技术领域Technical field
本公开实施例涉及机器人控制技术,例如涉及一种确定串联机器人反解结果的方法及装置。Embodiments of the present disclosure relate to robot control techniques, for example, to a method and apparatus for determining a reverse solution result of a tandem robot.
背景技术Background technique
仿生机器人已应用到很多领域,仿生机器人可以代替或部分代替人去完成危险环境中的作业,如地震灾害或者医疗行业,医疗行业中可以将机器人尺寸做到足够小进入人手无法达到的空间,如人体自然腔道(如食道)完成手术或定点给药。但是,有些环境不能让机器人完全自主运行,如医疗手术环境或者非常复杂的地震灾区环境等,需要有经验的人来操控这些机器人完成相应的任务,可以使用主从控制系统来操控机器人。Bionic robots have been applied to many fields. Bionic robots can replace or partially replace people in difficult environments, such as earthquake disasters or the medical industry. In the medical industry, robots can be made small enough to enter spaces that cannot be reached by human hands. The natural cavity of the human body (such as the esophagus) is completed or administered at a fixed point. However, some environments do not allow the robot to operate completely autonomously, such as a medical operating environment or a very complex earthquake-stricken environment. It requires experienced people to manipulate these robots to perform the corresponding tasks. The master-slave control system can be used to control the robot.
在主从控制系统中,一般需要有主操作手、从操作手和控制系统。主操作手一般由人来操作,从操作手一般为串联机器人,在主从机器人的控制系统中,对主、从机器人之间的实时性要求高。对于高实时性,主从机器人的控制系统中电机、控制器的响应时间、主从机器人间的通信时间很短,比较容易满足实时性要求,难点在于串联机器人的反解结果的计算时间较长。In the master-slave control system, it is generally necessary to have a master operator, a slave operator, and a control system. The main operator is generally operated by a person, and the operator is generally a tandem robot. In the control system of the master-slave robot, the real-time requirements between the master and the slave are high. For high real-time performance, the response time of the motor and controller in the control system of the master-slave robot is short, and the communication time between the master and slave robots is very short. It is easy to meet the real-time requirements. The difficulty is that the calculation result of the inverse solution of the tandem robot is longer. .
在相关技术中,对于串联机器人,可以采用主从异构的方式来进行主从操作,主从异构机器人大多采用雅克比算法进行控制,拾取主机器人在三维空间内速度变化,对从机器人进行运动学建模,计算从机器人的雅克比矩阵,对雅克比矩阵求逆。雅克比矩阵控制算法适用于从机器人自由度(串联机器人的关节个数)可以简化为3或者6的情况,但位移累积误差大,在奇异位置时,雅克比矩阵会失效,因而对于高度冗余的串联机器人(12自由度或者更多),这种方法不适用。此外,数值法中的循环坐标下降法、牛顿法、拟牛顿法、或者这三者中的两两结合、神经网络等虽然可以被使用,但这些算法求反解的速度慢,有局限性、计算和存储上开销大,因而对于串联机器人不实用。In the related art, for the tandem robot, the master-slave mode can be used to perform the master-slave operation, and the master-slave heterogeneous robot mostly uses the Jacobian algorithm to control the speed of the master robot in the three-dimensional space. Kinematic modeling, calculating the Jacobian matrix from the robot, inverts the Jacobian matrix. The Jacobian matrix control algorithm is suitable for the case where the degree of freedom of the robot (the number of joints of the tandem robot) can be reduced to 3 or 6, but the cumulative error of the displacement is large, and the Jacobian matrix will be invalid at the singular position, thus for high redundancy. The tandem robot (12 degrees of freedom or more), this method does not apply. In addition, the cyclic coordinate descent method, the Newton method, the quasi-Newton method in the numerical method, or the combination of two or two of these three, neural network, etc., although they can be used, the slow speed of these algorithms is limited, and there are limitations. It is expensive to calculate and store, so it is not practical for serial robots.
发明内容Summary of the invention
本公开实施例提供一种确定串联机器人反解结果的方法及装置,可以快速 而准确地求出串联机器人的反解结果。Embodiments of the present disclosure provide a method and apparatus for determining a reverse solution result of a serial robot, which can be fast The result of the inverse solution of the tandem robot is accurately obtained.
第一方面,本公开实施例提供了一种确定串联机器人反解结果的方法,包括:In a first aspect, an embodiment of the present disclosure provides a method for determining a reverse solution result of a serial robot, including:
获取串联机器人的末端关节的目标坐标,其中,在所述末端关节之上,以串联的方式连接有至少一个前端关节;Obtaining target coordinates of the end joint of the tandem robot, wherein at least one front end joint is connected in series above the end joint;
随机产生多个随机关节变量组,其中,每个随机关节变量组中包括与每个所述前端关节分别对应的关节变量;Randomly generating a plurality of random joint variable groups, wherein each random joint variable group includes a joint variable corresponding to each of the front end joints;
根据每个所述随机关节变量组,计算所述末端关节的随机坐标;Calculating random coordinates of the end joint according to each of the random joint variable groups;
根据所述目标坐标,在所述随机坐标中选取所述末端关节的近似坐标;以及Selecting approximate coordinates of the end joints in the random coordinates according to the target coordinates;
根据与所述近似坐标对应的随机关节变量组,确定所述目标坐标的反解结果;Determining an inverse solution result of the target coordinate according to a random joint variable group corresponding to the approximate coordinate;
其中,所述近似坐标为所述随机坐标和所述目标坐标的误差在误差阈值范围内的随机坐标。The approximate coordinate is a random coordinate in which the error of the random coordinate and the target coordinate is within an error threshold range.
第二方面,本公开实施例还提供了一种确定串联机器人反解结果的装置,包括:In a second aspect, an embodiment of the present disclosure further provides an apparatus for determining a result of a reverse solution of a serial robot, including:
目标坐标获取模块,设置为获取串联机器人的末端关节的目标坐标,其中,在所述末端关节之上,以串联的方式连接有至少一个前端关节;a target coordinate acquiring module, configured to acquire target coordinates of an end joint of the tandem robot, wherein at least one front end joint is connected in series above the end joint;
随机关节变量组产生模块,与所述目标坐标获取模块相连,设置为随机产生多个随机关节变量组,其中,每个随机关节变量组中包括与每个所述前端关节分别对应的关节变量;a random joint variable group generating module is connected to the target coordinate acquiring module, and is configured to randomly generate a plurality of random joint variable groups, wherein each random joint variable group includes a joint variable corresponding to each of the front end joints respectively;
随机坐标计算模块,与所述随机关节变量组产生模块相连,设置为根据每个所述随机关节变量组,计算所述末端关节的随机坐标;a random coordinate calculation module, connected to the random joint variable group generating module, configured to calculate a random coordinate of the end joint according to each of the random joint variable groups;
近似坐标选取模块,与所述随机坐标计算模块相连,设置为根据所述目标坐标,在所述随机坐标中选取所述末端关节的近似坐标;以及An approximate coordinate selection module, coupled to the random coordinate calculation module, configured to select an approximate coordinate of the end joint in the random coordinate according to the target coordinate;
反解结果确定模块,与所述近似坐标选取模块相连,设置为根据与所述近似坐标对应的随机关节变量组,确定所述目标坐标的反解结果;The inverse solution result determining module is connected to the approximate coordinate selecting module, and is configured to determine an inverse solution result of the target coordinate according to the random joint variable group corresponding to the approximate coordinate;
其中,所述近似坐标为所述随机坐标和所述目标坐标的误差在误差阈值范 围内的随机坐标。Wherein the approximate coordinate is an error of the random coordinate and the target coordinate in an error threshold Random coordinates within the perimeter.
本公开还提供了一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述的方法。The present disclosure also provides a non-transitory computer readable storage medium storing computer executable instructions arranged to perform the methods described above.
本公开还提供了一种串联机器人,包括:The present disclosure also provides a tandem robot comprising:
至少一个处理器;以及At least one processor;
与所述至少一个处理器通信连接的存储器;其中,a memory communicatively coupled to the at least one processor; wherein
所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器执行上述方法。The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to cause the at least one processor to perform the method described above.
本公开实施例通过随机产生多个随机关节变量组,计算末端关节的随机坐标,在随机坐标中选取末端关节的近似坐标,来确定目标坐标的反解结果。本公开实施例中的方法可适用于任意自由度的串联机器人,求反解结果速度快,反解结果的精度高,计算和存储上开销小,累积误差小。In the embodiment of the present disclosure, by randomly generating a plurality of random joint variable groups, the random coordinates of the end joints are calculated, and the approximate coordinates of the end joints are selected in the random coordinates to determine the inverse solution result of the target coordinates. The method in the embodiment of the present disclosure can be applied to a series robot with arbitrary degrees of freedom, and the result of inverting the solution is fast, the precision of the inverse solution is high, the overhead on calculation and storage is small, and the cumulative error is small.
附图说明DRAWINGS
图1是本公开实施例一提供的一种确定串联机器人反解结果的方法流程图;1 is a flowchart of a method for determining a reverse solution result of a serial robot according to Embodiment 1 of the present disclosure;
图2是本公开实施例二提供的一种确定串联机器人反解结果的方法流程图;2 is a flow chart of a method for determining a reverse solution result of a serial robot according to Embodiment 2 of the present disclosure;
图3是本公开实施例三提供的一种确定串联机器人反解结果的方法流程图;3 is a flowchart of a method for determining a reverse solution result of a serial robot according to Embodiment 3 of the present disclosure;
图4是本公开实施例四提供的一种确定串联机器人反解结果的方法流程图;4 is a flow chart of a method for determining a reverse solution result of a serial robot according to Embodiment 4 of the present disclosure;
图5是本公开实施例五提供的一种确定串联机器人反解结果的装置结构示意图;5 is a schematic structural diagram of an apparatus for determining a reverse solution result of a serial robot according to Embodiment 5 of the present disclosure;
图6是本公开实施例六提供的用于实施确定串联机器人反解结果的方法的主从机器人的闭环控制系统示意图;6 is a schematic diagram of a closed-loop control system of a master-slave robot for implementing a method for determining a result of a reverse solution of a serial robot according to Embodiment 6 of the present disclosure;
图7是本公开实施例六提供的一种确定串联机器人反解结果的方法中的关节坐标系示意图;以及7 is a schematic diagram of a joint coordinate system in a method for determining a reverse solution result of a tandem robot according to Embodiment 6 of the present disclosure;
图8是本公开实施例八提供的电子设备的结构示意图。FIG. 8 is a schematic structural diagram of an electronic device according to Embodiment 8 of the present disclosure.
具体实施方式 detailed description
下面结合附图和实施例对本公开进行详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释本公开,而非对本公开的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本公开相关的部分而非全部结构。在不冲突的情况下,以下实施例以及实施例中的特征可以相互任意组合。The present disclosure will be described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the disclosure and are not intended to be limiting. In addition, it should be noted that, for the convenience of description, only some but not all of the structures related to the present disclosure are shown in the drawings. The features of the following embodiments and embodiments may be arbitrarily combined with each other without conflict.
实施例一Embodiment 1
图1是本公开实施例一提供的一种确定串联机器人反解结果的方法流程图,本实施例可适用于已知串联机器人末端坐标求解每个关节变量的情况,该方法可以由确定串联机器人反解结果的装置来执行,该装置可以由软件、硬件,或软件和硬件的方式实现,该装置可以集成在提供存储和运算功能的设备中,例如典型的是工业个人计算机(Personal Computer,PC)等。1 is a flowchart of a method for determining an inverse solution result of a tandem robot according to Embodiment 1 of the present disclosure. This embodiment is applicable to a case where a joint robot coordinates are known to solve each joint variable, and the method can determine a tandem robot. The device that performs the inverse solution is implemented by software, hardware, or software and hardware. The device can be integrated into a device that provides storage and computing functions, such as a typical personal computer (Personal Computer, PC). )Wait.
在步骤110中,获取串联机器人的末端关节的目标坐标,其中,在所述末端关节之上,以串联的方式连接有至少一个前端关节。串联机器人以串联的方式连接有多个关节,最末端的关节为末端关节,位于该末端关节之上的关节相对于该关节都可以被称为前端关节。In step 110, target coordinates of the end joints of the tandem robot are acquired, wherein at least one front end joint is connected in series above the end joints. The tandem robot is connected in series with a plurality of joints, and the end joint is an end joint, and the joint above the end joint can be referred to as a front joint.
在对机器人进行控制时,控制结果可以通过串联机器人的末端关节的位置以及姿态来体现的,但是为了使末端关节能够达到一个预设的位置以及姿态,各前端关节需要共同配合运动。When controlling the robot, the control result can be expressed by the position and posture of the end joint of the tandem robot, but in order to enable the end joint to reach a preset position and posture, each front joint needs to cooperate with each other.
在本实施例中,所述末端关节的目标坐标,可以采用与期望末端关节能够达到的位置的坐标以及姿态的坐标表示。在获取串联机器人的末端关节的目标坐标后,通过下面的步骤计算每个前端关节的关节变量(关节变量可以是位置以及姿态),能够将所述末端关节调整至该目标坐标之上。In this embodiment, the target coordinates of the end joint may be represented by coordinates of a position that the desired end joint can reach and coordinates of the posture. After acquiring the target coordinates of the end joints of the tandem robot, the joint variables of each front joint (the joint variables may be positions and postures) are calculated by the following steps, and the end joints can be adjusted above the target coordinates.
在步骤120中,随机产生多个随机关节变量组,其中,每个随机关节变量组中包括与每个所述前端关节分别对应的关节变量。In step 120, a plurality of random joint variable groups are randomly generated, wherein each random joint variable group includes joint variables respectively corresponding to each of the front end joints.
每个关节都有对应的关节变量,关节变量可以表示该关节的运动情况,整个串联机器人的所有关节的运动情况可以用关节变量组表示,关节变量组中包括每个前端关节的关节变量。当随机产生多个随机关节变量组时,与之对应的末端的位置和姿态也是随机的,得到的末端的位置和姿态有可能是理想的,也有可能是不理想的,经过筛选后可以得到理想的位置和姿态。随机关节变量组可由随机函数产生,随机关节变量可根据关节的运动范围限制在一定范围。例如当关节变量为关节角时,可通过公式θn=θMin-nMax-n×Random()产生多个随机关 节角,Random()为一种随机函数,用于产生一个随机数。θn为第n个关节的关节角,θMin-n为第n个关节的最小关节角,θMax-n为第n个关节的最大关节角,并组成随机关节角组(θ1,θ2,...,θN),n∈[1,N],N为随机关节变量中包括的关节角总数,N与前端关节的总数一致。Each joint has a corresponding joint variable. The joint variable can indicate the motion of the joint. The motion of all joints of the entire tandem robot can be represented by a joint variable group, and the joint variable group includes joint variables of each front joint. When a plurality of random joint variable groups are randomly generated, the position and posture of the corresponding end are also random, and the position and posture of the obtained end may be ideal, or may be unsatisfactory, and may be ideal after screening. The position and posture. The random joint variable group can be generated by a random function, and the random joint variable can be limited to a certain range according to the range of motion of the joint. For example, when the joint variable is a joint angle, a plurality of random joint angles can be generated by the formula θ n = θ Min-n + θ Max-n × Random(), and Random() is a random function for generating a random number. . θ n is the joint angle of the nth joint, θ Min-n is the minimum joint angle of the nth joint, θ Max-n is the maximum joint angle of the nth joint, and constitutes a random joint angle group (θ 1 , θ 2 ,...,θ N ),n∈[1,N], N is the total number of joint angles included in the random joint variable, and N is consistent with the total number of front joints.
产生的随机关节变量组的组数可根据求解的精确度设置,增大随机关节变量组的组数,能提高结果的精确度。The number of groups of random joint variable groups generated can be set according to the accuracy of the solution, and the number of groups of random joint variable groups can be increased, which can improve the accuracy of the results.
当串联机器人的关节数增加一个时,只是在产生的随机关节变量组里增加一个关节变量,计算的复杂度是线性增加,所以本实施例适用于任意关节数(自由度)的串联机器人。When the number of joints of the tandem robot is increased by one, only one joint variable is added to the generated random joint variable group, and the computational complexity is linearly increased. Therefore, the present embodiment is applicable to a tandem robot of any joint number (degree of freedom).
在步骤130中,根据每个所述随机关节变量组,计算所述末端关节的随机坐标。In step 130, random coordinates of the end joint are calculated based on each of the random joint variable sets.
当每个前端关节的关节变量确定时,末端关节的位置和姿态就确定了,也即确定了末端关节的坐标。例如可建立基坐标系和关节坐标系,由关节之间的连接关系确定每两个坐标系之间的变换矩阵及末端关节到基坐标系的坐标变换矩阵,通过把每个随机关节变量组代入到坐标变换矩阵,得到对应的多个末端关节的随机坐标。When the joint variable of each front joint is determined, the position and posture of the end joint are determined, that is, the coordinates of the end joint are determined. For example, a base coordinate system and a joint coordinate system can be established, and a transformation matrix between each two coordinate systems and a coordinate transformation matrix of the end joint to the base coordinate system are determined by the connection relationship between the joints, by substituting each random joint variable group into Go to the coordinate transformation matrix and get the random coordinates of the corresponding multiple end joints.
在步骤140中,根据所述目标坐标,在所述随机坐标中选取所述末端关节的近似坐标。In step 140, approximate coordinates of the end joint are selected in the random coordinates according to the target coordinates.
因为随机关节变量组有多组,所以对应的末端关节的随机坐标有多个。随机坐标和目标坐标的差异有大有小,随机关节变量组是随机产生的,随机坐标与目标坐标相同的概率很小。可设置误差阈值,将误差阈值范围内的随机坐标作为末端关节的近似坐标,便于筛选。Because there are multiple sets of random joint variable groups, there are multiple random coordinates of the corresponding end joints. The difference between the random coordinates and the target coordinates is large or small, the random joint variable group is randomly generated, and the probability that the random coordinates are the same as the target coordinates is small. The error threshold can be set, and the random coordinates within the error threshold range are used as the approximate coordinates of the end joint, which is convenient for screening.
因为误差阈值可人为设置,所以可以控制结果的误差。本实施例中的结果是通过随机的实验试出来的,而不是由计算得出,所以没有累积误差。Since the error threshold can be set artificially, the error of the result can be controlled. The results in this example were tried by random experiments, not by calculations, so there is no cumulative error.
其中,选取的近似坐标的数量可以为1个也可以为多个。其中,可以将与目标坐标之间的误差值最小的一个随机坐标作为所述近似坐标;也可以将与目标坐标之间的误差值满足预设误差条件的多个随机坐标作为所述近似坐标。The number of approximate coordinates selected may be one or more. Wherein, a random coordinate with the smallest error value between the target coordinates may be used as the approximate coordinate; or a plurality of random coordinates that satisfy the preset error condition with the error value between the target coordinates may be used as the approximate coordinate.
在步骤150中,根据与所述近似坐标对应的随机关节变量组,确定所述目标坐标的反解结果。 In step 150, an inverse solution result of the target coordinates is determined according to a random joint variable group corresponding to the approximate coordinates.
其中,所述近似坐标为所述随机坐标和所述目标坐标的误差在误差阈值范围内的随机坐标。末端关节的近似坐标有对应的随机关节变量组,当每个关节按该随机关节变量组中的关节变量进行运动时,可使末端关节处于与目标坐标相接近的近似坐标对应的位置上。所以可将近似坐标对应的随机关节变量组作为目标坐标的反解结果。可以采用遗传算法,兼顾“多动小关节,少动大关节”和“每个串联机器人的关节较上次移动角度最小”的原则,确定所述目标坐标的反解结果。其中,大关节为所述前端关节,小关节为所述末端关节。The approximate coordinate is a random coordinate in which the error of the random coordinate and the target coordinate is within an error threshold range. The approximate coordinates of the end joints have corresponding random joint variable groups. When each joint moves according to the joint variables in the random joint variable group, the end joints can be placed at positions corresponding to the approximate coordinates close to the target coordinates. Therefore, the random joint variable group corresponding to the approximate coordinates can be used as the inverse solution result of the target coordinates. The genetic algorithm can be used to take into account the principle of "multiple moving small joints, less moving large joints" and "the joint angle of each tandem robot is smaller than the last moving angle", and the inverse solution result of the target coordinates is determined. Wherein the large joint is the front joint and the small joint is the end joint.
本实施例通过随机产生多个随机关节变量组,计算末端关节的随机坐标,在随机坐标中选取末端关节的近似坐标,来确定目标坐标的反解结果。本实施例中的方法适用于任意自由度的串联机器人,求反解结果速度快,反解结果的精度高,计算和存储上开销小,没有累积误差。In this embodiment, by randomly generating a plurality of random joint variable groups, the random coordinates of the end joints are calculated, and the approximate coordinates of the end joints are selected in the random coordinates to determine the inverse solution result of the target coordinates. The method in this embodiment is applicable to a series robot with arbitrary degrees of freedom, and the result of inverting the solution is fast, the precision of the inverse solution is high, the overhead on calculation and storage is small, and there is no accumulated error.
实施例二Embodiment 2
图2是本公开实施例二提供的一种确定串联机器人反解结果的方法流程图,实施例二以上述实施例为基础。FIG. 2 is a flowchart of a method for determining a reverse solution result of a serial robot according to Embodiment 2 of the present disclosure, and Embodiment 2 is based on the foregoing embodiment.
本实施例提供的确定串联机器人反解结果的方法包括步骤210至步骤280。其中,步骤210、220、270以及280分别与实施例一中的步骤110、120、140和150相同。The method for determining the inverse solution result of the serial robot provided by this embodiment includes steps 210 to 280. The steps 210, 220, 270, and 280 are the same as the steps 110, 120, 140, and 150 in the first embodiment, respectively.
在步骤210中,获取串联机器人的末端关节的目标坐标,其中,在所述末端关节之上,以串联的方式连接有至少一个前端关节。In step 210, target coordinates of the end joints of the tandem robot are acquired, wherein at least one front end joint is connected in series above the end joints.
在步骤220中,随机产生多个随机关节变量组,其中,每个随机关节变量组中包括与每个所述前端关节分别对应的关节变量。In step 220, a plurality of random joint variable groups are randomly generated, wherein each random joint variable group includes joint variables respectively corresponding to each of the front end joints.
在步骤230中,建立串联机器人的基坐标系以及每一个关节的关节坐标系。In step 230, a base coordinate system of the tandem robot and a joint coordinate system for each joint are established.
例如可根据空间机器人的连杆参数,应用D-H建模方法,建立串联机器人的基坐标系O0(x0,y0,z0)、每一个关节的关节坐标系Oi(xi,yi,zi),其中,i∈[1,n],n为所述串联机器人包括的关节总数。每个关节坐标系中的关节变量表示了该关节的运动情况。关节坐标系中的关节变量可统一转换至基坐标系中,用基坐标系中的坐标表示。For example, according to the link parameters of the space robot, the DH modeling method can be applied to establish the base coordinate system O 0 (x 0 , y 0 , z 0 ) of the tandem robot, and the joint coordinate system O i (x i , y of each joint). i , z i ), where i ∈ [1, n], n is the total number of joints included in the tandem robot. The joint variable in each joint coordinate system represents the motion of the joint. The joint variables in the joint coordinate system can be uniformly converted into the base coordinate system and represented by the coordinates in the base coordinate system.
在步骤240中,根据所述基坐标系以及所述关节坐标系,确定相邻两坐标系之间的变换矩阵。 In step 240, a transformation matrix between adjacent two coordinate systems is determined based on the base coordinate system and the joint coordinate system.
关节之间的连接关系确定相邻两个坐标系之间的变换矩阵
Figure PCTCN2017071083-appb-000001
关节坐标系的变量可用相邻关节坐标系表示,关节坐标系经几次变换后都可转换成用基坐标系表示。
The connection relationship between joints determines the transformation matrix between two adjacent coordinate systems
Figure PCTCN2017071083-appb-000001
The variables of the joint coordinate system can be represented by the adjacent joint coordinate system, and the joint coordinate system can be converted into a base coordinate system after several transformations.
在步骤250中,计算所述末端关节在所述基坐标系中的变换矩阵,作为所述预设的坐标变换矩阵。In step 250, a transformation matrix of the end joints in the base coordinate system is calculated as the preset coordinate transformation matrix.
每组随机关节变量组对应着末端关节的随机坐标,这个对应关系可以是末端关节在所述基坐标系中的变换矩阵,串联机器人确定后,每个关节之间的连接关系也就确定了,预设的坐标变换矩阵就确定了。末端关节所在的坐标系到基坐标系O0(x0,y0,z0)的坐标变换矩阵
Figure PCTCN2017071083-appb-000002
可由相邻两个坐标系之间的变换矩阵
Figure PCTCN2017071083-appb-000003
逐项右乘得到,
Each set of random joint variable groups corresponds to the random coordinates of the end joints. This correspondence relationship may be the transformation matrix of the end joints in the base coordinate system. After the tandem robot is determined, the connection relationship between each joint is also determined. The preset coordinate transformation matrix is determined. The coordinate transformation matrix of the coordinate system of the end joint to the base coordinate system O 0 (x 0 , y 0 , z 0 )
Figure PCTCN2017071083-appb-000002
Can be transformed matrix between two adjacent coordinate systems
Figure PCTCN2017071083-appb-000003
Multiply item by item,
Figure PCTCN2017071083-appb-000004
Figure PCTCN2017071083-appb-000004
其中,d1x、d1y、d1z、d2x、d2y、d2z、d3x、d3y及d3z用于表示末端关节的姿态,px、py及pz用于表示末端关节的位置。Wherein, d 1x , d 1y , d 1z , d 2x , d 2y , d 2z , d 3x , d 3y , and d 3z are used to represent the posture of the end joint, and p x , p y , and p z are used to represent the end joint. position.
在步骤260中,把每个随机关节变量组代入到预设的坐标变换矩阵中,得到与所述末端关节对应的多个随机坐标。In step 260, each random joint variable group is substituted into a preset coordinate transformation matrix to obtain a plurality of random coordinates corresponding to the end joint.
因为预设的坐标变换矩阵
Figure PCTCN2017071083-appb-000005
可由相邻两个坐标系之间的变换矩阵
Figure PCTCN2017071083-appb-000006
逐项右乘得到,所以预设的坐标变换矩阵中的d1x、d1y、d1z、d2x、d2y、d2z、d3x、d3y、d3z、px、py及pz的取值是每个关节变量的函数,把每个随机关节变量组代入到预设的坐标变换矩阵中,得到与所述末端关节对应的多个随机坐标。随机关节变量组表示每个关节的运动情况,预设的坐标变换矩阵表示关节之间的连接关系,二者结合可得到对应的随机坐标。
Because of the preset coordinate transformation matrix
Figure PCTCN2017071083-appb-000005
Can be transformed matrix between two adjacent coordinate systems
Figure PCTCN2017071083-appb-000006
By item by right multiplication, so d 1x , d 1y , d 1z , d 2x , d 2y , d 2z , d 3x , d 3y , d 3z , p x , p y , and p z in the preset coordinate transformation matrix The value is a function of each joint variable, and each random joint variable group is substituted into a preset coordinate transformation matrix to obtain a plurality of random coordinates corresponding to the end joint. The random joint variable group represents the motion of each joint, and the preset coordinate transformation matrix represents the connection relationship between the joints, and the combination of the two can obtain the corresponding random coordinates.
在步骤270中,根据所述目标坐标,在所述随机坐标中选取所述末端关节的近似坐标。In step 270, approximate coordinates of the end joint are selected in the random coordinates according to the target coordinates.
在步骤280中,根据与所述近似坐标对应的随机关节变量组,确定所述目标坐标的反解结果。In step 280, an inverse solution result of the target coordinates is determined according to a random joint variable group corresponding to the approximate coordinates.
本实施例通过把每个随机关节变量组代入到预设的坐标变换矩阵中,得到与所述末端关节对应的多个随机坐标,通过检验随机坐标与目标坐标的差异确 定对应的随机关节变量组是否可作为反解,简化了串联机器人求反解的过程。In this embodiment, by substituting each random joint variable group into a preset coordinate transformation matrix, a plurality of random coordinates corresponding to the end joint are obtained, and the difference between the random coordinates and the target coordinates is verified. Whether the corresponding random joint variable group can be used as an inverse solution simplifies the process of inverting the solution of the tandem robot.
实施例三Embodiment 3
图3是本公开实施例三提供的一种确定串联机器人反解结果的方法流程图,实施例三以上述实施例为基础。FIG. 3 is a flowchart of a method for determining a reverse solution result of a serial robot according to Embodiment 3 of the present disclosure, and Embodiment 3 is based on the foregoing embodiment.
本实施例提供的确定串联机器人反解结果的方法包括步骤310至步骤360。其中,步骤310-330和步骤360分别与实施例一中的步骤110-130和150相同。The method for determining the reverse solution result of the serial robot provided by this embodiment includes steps 310 to 360. Steps 310-330 and step 360 are the same as steps 110-130 and 150 in the first embodiment, respectively.
在步骤310中,获取串联机器人的末端关节的目标坐标,其中,在所述末端关节之上,以串联的方式连接有至少一个前端关节。In step 310, target coordinates of the end joints of the tandem robot are acquired, wherein at least one front end joint is connected in series above the end joints.
在步骤320中,随机产生多个随机关节变量组,其中,每个随机关节变量组中包括与每个所述前端关节分别对应的关节变量。In step 320, a plurality of random joint variable groups are randomly generated, wherein each random joint variable group includes joint variables respectively corresponding to each of the front end joints.
在步骤330中,根据每个所述随机关节变量组,计算所述末端关节的随机坐标。In step 330, random coordinates of the end joint are calculated based on each of the random joint variable groups.
在步骤340中,计算所述末端关节的目标坐标与所述末端关节的随机坐标之间的误差值。In step 340, an error value between the target coordinates of the end joint and the random coordinates of the end joint is calculated.
末端关节的随机坐标有多个,它们与末端关节的目标坐标之间的差异可用误差值表示。末端关节的坐标包含末端关节的位置坐标和姿态坐标,所以误差值包括位置误差和姿态误差。因为末端关节的坐标是关节变量的函数,且末端关节的目标坐标是已知量,所以误差值是随机关节变量的函数。There are multiple random coordinates of the end joints, and the difference between them and the target coordinates of the end joints can be represented by an error value. The coordinates of the end joint contain the position coordinates and attitude coordinates of the end joint, so the error values include position error and attitude error. Since the coordinates of the end joint are a function of the joint variable and the target coordinates of the end joint are known quantities, the error value is a function of the random joint variable.
可选地,计算所述末端关节的目标坐标与所述末端关节的随机坐标之间的误差值,包括:Optionally, calculating an error value between a target coordinate of the end joint and a random coordinate of the end joint, including:
根据公式ΔE=ΔP+ΔR以及According to the formula ΔE=ΔP+ΔR and
Figure PCTCN2017071083-appb-000007
计算所述末端关节的目标坐标与所述末端关节的随机坐标之间的误差值ΔE。
Figure PCTCN2017071083-appb-000007
An error value ΔE between the target coordinates of the end joint and the random coordinates of the end joint is calculated.
其中,ΔP表示位置差异,ΔR表示姿态差异,ωρ和ωγ为所述位置差异ΔP和所述姿态差异ΔR的权重,Ps为末端关节的目标位置,psj为末端关节的目标位置分量,dsj为末端关节的目标姿态,Ps、psj及dsj可从所述末端关节的目标坐标 获得,Pr为末端关节的随机位置,Prj为末端关节的随机位置分量,drj为末端关节的随机姿态,Pr、prj及drj可从所述末端关节的随机坐标中获得,||Ps-Pr||为计算末端关节的目标位置和末端关节的随机位置之间的距离。Where ΔP represents the position difference, ΔR represents the attitude difference, ω ρ and ω γ are the weights of the position difference ΔP and the attitude difference ΔR, P s is the target position of the end joint, and p sj is the target position component of the end joint , d sj is the target pose of the end joint, P s , p sj and d sj can be obtained from the target coordinates of the end joint, P r is the random position of the end joint, P rj is the random position component of the end joint, d rj For the random pose of the end joint, P r , p rj and d rj can be obtained from the random coordinates of the end joint, and ||P s -P r || is the calculation of the target position of the end joint and the random position of the end joint. The distance between them.
其中,可以选择合适的ωγ使姿态误差与位置误差同步收敛,例如,ωγ可以大于104。如果机器人的运动状态对末端位置的精度要求更高一些,则ωγ的取值可以为0;若是对位置和姿态都需要满足一定的精度,则ωγ的取值可以为106Among them, the appropriate ω γ can be selected to make the attitude error and the position error converge synchronously. For example, ω γ can be greater than 10 4 . If the motion state of the robot requires higher accuracy for the end position, the value of ω γ can be 0; if the position and attitude need to satisfy a certain precision, the value of ω γ can be 10 6 .
在步骤350中,获取所述误差值小于误差阈值的末端关节的随机坐标,作为所述末端关节的近似坐标。In step 350, the random coordinates of the end joint whose error value is less than the error threshold are obtained as approximate coordinates of the end joint.
末端关节的随机坐标与目标坐标的误差值小于误差阈值,说明末端关节的随机坐标与目标坐标很近似,可将该末端关节的随机坐标作为末端关节的近似坐标。The error value of the random coordinates of the end joint and the target coordinate is smaller than the error threshold, indicating that the random coordinates of the end joint are very similar to the target coordinates, and the random coordinates of the end joint can be used as the approximate coordinates of the end joint.
在步骤360中,根据与所述近似坐标对应的随机关节变量组,确定所述目标坐标的反解结果。In step 360, an inverse solution result of the target coordinates is determined based on a random joint variable group corresponding to the approximate coordinates.
本实施例通过计算末端关节的目标坐标与末端关节的随机坐标之间的误差值,可知与末端关节的随机坐标对应的随机关节变量组能否作为反解,能快速筛选出反解结果。In this embodiment, by calculating the error value between the target coordinates of the end joint and the random coordinates of the end joint, it can be known whether the random joint variable group corresponding to the random coordinates of the end joint can be used as an inverse solution, and the inverse solution result can be quickly screened out.
实施例四Embodiment 4
图4是本公开实施例四提供的一种确定串联机器人反解结果的方法流程图,实施例四以上述实施例为基础。FIG. 4 is a flowchart of a method for determining a reverse solution result of a serial robot according to Embodiment 4 of the present disclosure, and Embodiment 4 is based on the foregoing embodiment.
本实施例提供的确定串联机器人反解结果的方法包括步骤410至步骤4110。其中,步骤410-440分别与实施例一中的步骤110-140相同。The method for determining the inverse solution result of the serial robot provided by this embodiment includes step 410 to step 4110. The steps 410-440 are the same as the steps 110-140 in the first embodiment.
在步骤410中,获取串联机器人的末端关节的目标坐标,其中,在末端关节之上,以串联的方式连接有至少一个前端关节。In step 410, the target coordinates of the end joints of the tandem robot are acquired, wherein at least one front end joint is connected in series above the end joint.
在步骤420中,随机产生多个随机关节变量组,其中,每个随机关节变量组中包括与每个所述前端关节分别对应的关节变量。In step 420, a plurality of random joint variable groups are randomly generated, wherein each random joint variable group includes joint variables respectively corresponding to each of the front end joints.
在步骤430中,根据每个所述随机关节变量组,计算所述末端关节的随机坐标。In step 430, random coordinates of the end joint are calculated based on each of the random joint variable sets.
在步骤440中,根据所述目标坐标,在所述随机坐标中选取所述末端关节 的近似坐标。In step 440, the end joint is selected in the random coordinates according to the target coordinates Approximate coordinates.
在步骤450中,获取与至少两个所述近似坐标分别对应随机关节变量组,作为待选随机关节变量组。In step 450, a random joint variable group corresponding to at least two of the approximate coordinates is acquired as a candidate random joint variable group.
满足误差阈值的末端关节的近似坐标有多个,与之对应的随机关节变量组也有多个,这些随机关节变量组可以作为目标坐标的反解结果,但它们未必是最优的反解结果。可以从待选随机关节变量组中选出最优的反解结果。There are multiple approximate joint coordinates of the end joint satisfying the error threshold, and there are also multiple random joint variable groups corresponding to them. These random joint variable groups can be used as the inverse solution results of the target coordinates, but they are not necessarily the optimal inverse solution results. The optimal inverse solution result can be selected from the group of random joint variables to be selected.
步骤460至步骤4120为从待选随机关节变量组中选出最优反解结果的过程。关节移动量越小时所消耗的能量越少,所以要以关节移动量小的待选随机关节变量组作为最优反解结果。串联机器人有很多个关节,在关节移动量相同的情况下,远离末端关节的关节消耗的能量比靠近末端关节的关节消耗的能量多,所以在寻找最优反解结果时可以优先保证远离末端关节的关节移动量小。综上,可从离末端关节最远的关节开始,朝着靠近末端关节的方向,逐个关节地找最小的关节移动量。Step 460 to step 4120 are processes for selecting an optimal inverse solution result from the group of random joint variables to be selected. The smaller the amount of movement of the joint is, the less energy is consumed. Therefore, the group of random joints to be selected with a small amount of joint movement is used as the optimal inverse solution. The tandem robot has many joints. When the joint movement amount is the same, the joint away from the end joint consumes more energy than the joint near the end joint, so it is possible to give priority to the distal joint when searching for the optimal inverse solution result. The amount of joint movement is small. In summary, the minimum amount of joint movement can be found one by one from the joint farthest from the end joint and toward the end joint.
在步骤460中,选取距离所述末端关节最远的一个前端关节,作为当前比对关节。In step 460, a front end joint that is furthest from the end joint is selected as the current alignment joint.
一种从待选随机关节变量组中选出最优反解结果的方法是,选关节移动量最小的待选随机关节变量组作为最优反解结果。因为串联机器人有多个关节,可以逐个关节地找关节移动量的最小值。当关节移动量相同时,远离末端的关节消耗的能量比靠近末端的关节消耗得多,可以优先保证远离末端关节的关节移动量小。所以开始时可以选取距离末端关节最远的前端关节作为当前比对关节。A method for selecting the optimal inverse solution result from the selected random joint variable group is to select the candidate random joint variable group with the smallest joint movement amount as the optimal inverse solution result. Since the tandem robot has multiple joints, the minimum amount of joint movement can be found one by one. When the amount of joint movement is the same, the energy of the joint away from the end is much more consumed than the joint near the end, and it is possible to preferentially ensure that the amount of joint movement away from the end joint is small. So at the beginning you can select the front joint that is furthest from the end joint as the current comparison joint.
在步骤470中,分别在每个所述待选随机关节变量组中,获取与所述当前比对关节对应的关节变量。In step 470, joint variables corresponding to the current comparison joint are acquired in each of the selected random joint variable groups.
待选随机关节变量组中包括每个关节的关节变量。每个待选随机关节变量组对应着一组关节变量。因为是逐个关节进行比较的,所以每次比较的时候可以获取当前比对关节的关节变量。The joint variable of each joint is included in the group of random joint variables to be selected. Each candidate random joint variable group corresponds to a set of joint variables. Because it is a joint-by-joint comparison, the joint variable of the current alignment joint can be obtained for each comparison.
在步骤480中,根据所述关节变量,确定与每个所述待选随机关节变量组分别对应的当前比对关节的关节移动量。In step 480, a joint movement amount of the current comparison joint corresponding to each of the candidate random joint variable groups is determined according to the joint variable.
关节移动量越小消耗的能量越少,根据关节变量确定当前比对关节的关节 移动量。The smaller the amount of joint movement, the less energy is consumed, and the joint of the current joint is determined according to the joint variable. The amount of movement.
在步骤490中,比较至少两个所述当前比对关节的关节移动量,将最小的所述当前比对关节的关节移动量对应的待选随机关节变量组作为优选随机关节变量组。In step 490, the joint movement amount of at least two of the current comparison joints is compared, and the candidate random joint variable group corresponding to the minimum joint movement amount of the current comparison joint is taken as the preferred random joint variable group.
根据当前比对关节的关节移动量对待选随机关节变量组进行一次筛选,找出最小的当前比对关节的关节移动量,将与最小的当前比对关节的关节移动量对应的待选随机关节变量组作为优选随机关节变量组。当优选随机关节变量组为一组时,该优选随机关节变量组即为当前最优的反解结果。当优选随机关节变量组不止一组时,可以继续优化。According to the current comparison of the joint movement amount of the joint, the random joint variable group is selected for screening, and the minimum joint movement amount of the current joint is found, and the candidate random joint corresponding to the joint movement amount of the smallest current comparison joint is selected. The variable group is the preferred random joint variable group. When the preferred random joint variable group is a group, the preferred random joint variable group is the current optimal inverse solution result. Optimization can continue when there are more than one set of preferred random joint variable groups.
在步骤4100中,判断优选随机关节变量组的数量是否大于1,如果优选随机关节变量组的数量大于1,则执行步骤4110,如果优选随机关节变量组的数量为1则执行步骤4120。In step 4100, it is determined whether the number of preferred random joint variable groups is greater than 1. If the number of preferred random joint variable groups is greater than 1, step 4110 is performed, and if the number of preferred random joint variable groups is 1, then step 4120 is performed.
在步骤4110中,朝着靠近末端关节的方向,选取与当前比对关节相邻的前端关节作为当前比对关节,返回执行步骤470。In step 4110, the front end joint adjacent to the current alignment joint is selected as the current alignment joint toward the end joint, and the flow returns to step 470.
如果优选随机关节变量组的数量大于1,说明没有找到最优反解结果,则朝着靠近末端关节的方向,选取与当前比对关节相邻前端关节作为当前比对关节,选取最小的当前比对关节的关节移动量对应的待选随机关节变量组作为优选随机关节变量组。当串联机器人的关节数量较多时,新的当前比对关节还可以选择靠近末端关节的与当前比对关节相邻的第2个或者第3个前端关节。If the number of preferred random joint variable groups is greater than 1, indicating that the optimal inverse solution result is not found, then the front end joint adjacent to the current alignment joint is selected as the current comparison joint toward the end joint, and the smallest current ratio is selected. The candidate random joint variable group corresponding to the joint movement amount of the joint is selected as the preferred random joint variable group. When the number of joints of the tandem robot is large, the new current alignment joint can also select the second or third front joint adjacent to the current alignment joint near the end joint.
在步骤4120中,将所述优选随机关节变量组,作为所述目标坐标的反解结果。In step 4120, the preferred set of random joint variables is taken as the inverse of the target coordinates.
优选随机关节变量组对应的末端关节的随机坐标与目标坐标之间的误差在误差阈值范围内,优选随机关节变量组的关节移动的能量消耗是最小的,可作为目标坐标的反解结果。Preferably, the error between the random coordinates of the end joint corresponding to the random joint variable group and the target coordinate is within the error threshold range, and preferably the energy consumption of the joint movement of the random joint variable group is the smallest, which can be used as the inverse solution result of the target coordinate.
本实施例从距离末端关节最远的前端关节开始,朝着靠近末端关节的方向,与最小的关节移动量对应的待选随机关节变量组,即为使串联机器人移动关节时消耗最少能量的反解结果。In this embodiment, starting from the front end joint farthest from the end joint, toward the end joint, the group of random joint variables to be selected corresponding to the minimum joint movement amount is the inverse of the least energy consumed when the tandem robot moves the joint. Solve the result.
实施例五Embodiment 5
图5是本公开实施例五提供的一种确定串联机器人反解结果的装置结构示 意图,该装置可以执行上述实施例中的确定串联机器人反解结果的方法。该装置包括:目标坐标获取模块501、随机关节变量组产生模块502、随机坐标计算模块503、近似坐标选取模块504和反解结果确定模块505。FIG. 5 is a schematic structural diagram of an apparatus for determining a reverse solution result of a serial robot according to Embodiment 5 of the present disclosure. It is intended that the apparatus can perform the method of determining the inverse solution result of the tandem robot in the above embodiment. The apparatus includes: a target coordinate acquisition module 501, a random joint variable group generation module 502, a random coordinate calculation module 503, an approximate coordinate selection module 504, and an inverse solution result determination module 505.
目标坐标获取模块501设置为获取串联机器人的末端关节的目标坐标,其中,在所述末端关节之上,以串联的方式连接有至少一个前端关节。The target coordinate acquisition module 501 is configured to acquire target coordinates of the end joints of the tandem robot, wherein at least one front end joint is connected in series above the end joint.
随机关节变量组产生模块502,与所述目标坐标获取模块501相连,设置为随机产生多个随机关节变量组,其中,每个随机关节变量组中包括与每个所述前端关节分别对应的关节变量。The random joint variable group generating module 502 is connected to the target coordinate acquiring module 501 and configured to randomly generate a plurality of random joint variable groups, wherein each random joint variable group includes a joint corresponding to each of the front end joints respectively variable.
随机坐标计算模块503,与所述随机关节变量组产生模块502相连,设置为根据每个所述随机关节变量组,计算所述末端关节的随机坐标。The random coordinate calculation module 503 is connected to the random joint variable group generation module 502, and is configured to calculate the random coordinates of the end joint according to each of the random joint variable groups.
近似坐标选取模块504,与所述随机坐标计算模块503相连,设置为根据所述目标坐标,在所述随机坐标中选取所述末端关节的近似坐标。The approximate coordinate selection module 504 is connected to the random coordinate calculation module 503, and is configured to select an approximate coordinate of the end joint in the random coordinate according to the target coordinate.
反解结果确定模块505,与所述近似坐标选取模块504相连,设置为根据与所述近似坐标对应的随机关节变量组,确定所述目标坐标的反解结果。The inverse solution result determining module 505 is connected to the approximate coordinate selecting module 504, and is configured to determine an inverse solution result of the target coordinate according to the random joint variable group corresponding to the approximate coordinate.
本实施例通过随机产生多个随机关节变量组,计算末端关节的随机坐标,在随机坐标中选取末端关节的近似坐标,来确定目标坐标的反解结果。本实施例中的方法适用于任意自由度的串联机器人,求反解结果速度快,反解结果的精度高,计算和存储上开销小,没有累积误差。In this embodiment, by randomly generating a plurality of random joint variable groups, the random coordinates of the end joints are calculated, and the approximate coordinates of the end joints are selected in the random coordinates to determine the inverse solution result of the target coordinates. The method in this embodiment is applicable to a series robot with arbitrary degrees of freedom, and the result of inverting the solution is fast, the precision of the inverse solution is high, the overhead on calculation and storage is small, and there is no accumulated error.
可选地,所述随机坐标计算模块包括坐标变换矩阵单元,设置为把每个随机关节变量组代入到预设的坐标变换矩阵中,得到与所述末端关节对应的多个随机坐标。Optionally, the random coordinate calculation module includes a coordinate transformation matrix unit configured to substitute each random joint variable group into a preset coordinate transformation matrix to obtain a plurality of random coordinates corresponding to the end joint.
可选地,所述随机坐标计算模块还包括坐标系建立单元、变换矩阵确定单元及坐标变换矩阵计算单元。Optionally, the random coordinate calculation module further includes a coordinate system establishing unit, a transformation matrix determining unit, and a coordinate transformation matrix calculating unit.
坐标系建立单元设置为建立所述串联机器人的基坐标系O0(x0,y0,z0)、每一个关节的关节坐标系Oi(xi,yi,zi),其中,i∈[1,n],n为所述串联机器人包括的关节总数。a coordinate system establishing unit is configured to establish a base coordinate system O 0 (x 0 , y 0 , z 0 ) of the tandem robot, and a joint coordinate system O i (x i , y i , z i ) of each joint, wherein i ∈ [1, n], n is the total number of joints included in the tandem robot.
变换矩阵确定单元,与所述坐标系建立单元相连,设置为根据所述基坐标系以及所述关节坐标系,确定相邻两个坐标系之间的变换矩阵
Figure PCTCN2017071083-appb-000008
a transformation matrix determining unit, connected to the coordinate system establishing unit, configured to determine a transformation matrix between two adjacent coordinate systems according to the base coordinate system and the joint coordinate system
Figure PCTCN2017071083-appb-000008
坐标变换矩阵计算单元,分别与所述变换矩阵确定单元及所述坐标变换矩 阵单元相连,设置为根据公式
Figure PCTCN2017071083-appb-000009
计算所述末端关节在所述基坐标系O0(x0,y0,z0)中的变换矩阵
Figure PCTCN2017071083-appb-000010
将所述
Figure PCTCN2017071083-appb-000011
作为所述预设的坐标变换矩阵。
a coordinate transformation matrix calculation unit respectively connected to the transformation matrix determination unit and the coordinate transformation matrix unit, and configured to be according to a formula
Figure PCTCN2017071083-appb-000009
Calculating a transformation matrix of the end joint in the base coordinate system O 0 (x 0 , y 0 , z 0 )
Figure PCTCN2017071083-appb-000010
Will be said
Figure PCTCN2017071083-appb-000011
As the preset coordinate transformation matrix.
其中,d1x、d1y、d1z、d2x、d2y、d2z、d3x、d3y及d3z用于表示末端关节的姿态,px、py及pz用于表示末端关节的位置,所述d1x、d1y、d1z、d2x、d2y、d2z、d3x、d3y、d3z、px、py及pz的取值,由与每个所述前端关节分别对应的关节变量确定。Wherein, d 1x , d 1y , d 1z , d 2x , d 2y , d 2z , d 3x , d 3y , and d 3z are used to represent the posture of the end joint, and p x , p y , and p z are used to represent the end joint. a position, the values of d 1x , d 1y , d 1z , d 2x , d 2y , d 2z , d 3x , d 3y , d 3z , p x , p y , and p z are determined by each of the front ends The joint variables corresponding to the joints are determined.
本实施例通过把每个随机关节变量组代入到预设的坐标变换矩阵中,得到与所述末端关节对应的多个随机坐标,通过检验随机坐标与目标坐标的差异即可确定对应的随机关节变量组是否可作为反解,简化了串联机器人求反解的过程。In this embodiment, by substituting each random joint variable group into a preset coordinate transformation matrix, a plurality of random coordinates corresponding to the end joint are obtained, and the corresponding random joint can be determined by checking the difference between the random coordinates and the target coordinates. Whether the variable group can be used as an inverse solution simplifies the process of inverting the solution of the tandem robot.
可选地,所述近似坐标选取模块包括误差值计算单元及误差值判断单元。Optionally, the approximate coordinate selection module includes an error value calculation unit and an error value determination unit.
误差值计算单元设置为计算所述末端关节的目标坐标与所述末端关节的随机坐标之间的误差值。The error value calculation unit is configured to calculate an error value between the target coordinates of the end joint and the random coordinates of the end joint.
误差值判断单元,与所述误差值计算单元相连,设置为获取所述误差值小于误差阈值的末端关节的随机坐标,作为所述末端关节的近似坐标。The error value judging unit is connected to the error value calculating unit and configured to acquire the random coordinates of the end joint whose error value is smaller than the error threshold as the approximate coordinates of the end joint.
本实施例通过计算末端关节的目标坐标与末端关节的随机坐标之间的误差值,可知与末端关节的随机坐标对应的随机关节变量组能否作为反解,能快速地筛选出反解结果。In this embodiment, by calculating the error value between the target coordinates of the end joint and the random coordinates of the end joint, it can be known whether the random joint variable group corresponding to the random coordinates of the end joint can be used as an inverse solution, and the inverse solution result can be quickly screened out.
可选地,反解结果确定模块包括待选随机关节变量组获取单元、当前比对关节选取单元、关节变量获取单元、移动量确定单元、筛选随机关节变量组单元、缩减随机关节变量组数量值单元及反解结果获取单元。Optionally, the inverse solution result determining module includes a random joint variable group acquiring unit to be selected, a current matching joint selecting unit, a joint variable acquiring unit, a movement amount determining unit, a screening random joint variable group unit, and a reduced random joint variable group quantity value. Unit and inverse solution result acquisition unit.
待选随机关节变量组获取单元设置为获取与至少两个所述近似坐标分别对应的随机关节变量组,作为待选随机关节变量组。The candidate random joint variable group obtaining unit is configured to acquire a random joint variable group respectively corresponding to at least two of the approximate coordinates as a candidate random joint variable group.
当前比对关节选取单元,与所述待选随机关节变量组获取单元相连,设置为选取距离所述末端关节最远的一个前端关节,作为当前比对关节。 The current comparison joint selection unit is connected to the candidate random joint variable group acquisition unit, and is configured to select a front end joint farthest from the end joint as the current comparison joint.
关节变量获取单元,与所述当前比对关节选取单元相连,设置为分别在每个所述待选随机关节变量组中,获取与所述当前比对关节对应的关节变量。The joint variable acquiring unit is connected to the current matching joint selecting unit, and is configured to acquire a joint variable corresponding to the current matching joint in each of the selected random joint variable groups.
移动量确定单元,与所述关节变量获取单元相连,设置为根据所述关节变量,确定与每个所述待选随机关节变量组分别对应的当前比对关节的关节移动量。The movement amount determining unit is connected to the joint variable acquiring unit, and is configured to determine, according to the joint variable, a joint movement amount of the current comparison joint corresponding to each of the candidate random joint variable groups.
筛选随机关节变量组单元,与所述移动量确定单元相连,将最小的所述当前比对关节的关节移动量对应的待选随机关节变量组作为优选随机关节变量组。The random joint variable group unit is screened, and is connected to the movement amount determining unit, and the candidate random joint variable group corresponding to the minimum joint movement amount of the current comparison joint is used as the preferred random joint variable group.
缩减随机关节变量组数量单元,与所述筛选随机关节变量组单元相连,设置为如果优选随机关节变量组的数量大于1,则朝着靠近所述末端关节的方向,选取与所述当前比对关节相邻的前端关节作为当前比对关节,并返回执行分别在每个所述待选随机关节变量组中,获取与所述当前比对关节对应的关节变量的操作。Reducing the random joint variable group number unit, and connecting to the screening random joint variable group unit, and setting, if the number of preferred random joint variable groups is greater than 1, selecting the current comparison with the direction toward the end joint The front end joint adjacent to the joint serves as a current alignment joint, and returns an operation of acquiring a joint variable corresponding to the current comparison joint in each of the selected random joint variable groups.
保留随机关节变量组单元,与所述缩减随机关节变量组数量值单元相连,设置为如果优选随机关节变量组的数量为1,将所述优选随机关节变量组,作为所述目标坐标的反解结果。Retaining a random joint variable group unit, and connecting the reduced random joint variable group number value unit, and setting the preferred random joint variable group as the inverse of the target coordinate if the number of preferred random joint variable groups is 1. result.
本实施例从距离末端关节最远的前端关节开始,朝着靠近末端关节的方向,将与最小的关节移动量对应的待选随机关节变量组作为,使串联机器人移动关节时消耗最少能量的反解结果。In this embodiment, starting from the front end joint farthest from the end joint, toward the direction of the end joint, the group of random joint variables to be selected corresponding to the minimum amount of joint movement is taken as the opposite of the minimum energy consumed when the tandem robot moves the joint. Solve the result.
可选地,误差值计算单元设置为根据公式ΔE=ΔP+ΔR以及
Figure PCTCN2017071083-appb-000012
计算所述末端关节的目标坐标与所述末端关节的随机坐标之间的误差值ΔE。
Optionally, the error value calculation unit is set according to the formula ΔE=ΔP+ΔR and
Figure PCTCN2017071083-appb-000012
An error value ΔE between the target coordinates of the end joint and the random coordinates of the end joint is calculated.
其中,ΔP表示位置差异,ΔR表示姿态差异,ωρ和ωγ为所述位置差异ΔP和所述姿态差异ΔR的权重,Ps为末端关节的目标位置,psj为末端关节的目标位置分量,dsj为末端关节的目标姿态,Ps、psj及dsj可从所述末端关节的目标坐标获得,Pr为末端关节的随机位置,prj为末端关节的随机位置分量,drj为末端关节的随机姿态,Pr、prj及drj可从所述末端关节的随机坐标中获得,||Ps-Pr||为计算末端关节的目标位置和末端关节的随机位置之间的距离。 Where ΔP represents the position difference, ΔR represents the attitude difference, ω ρ and ω γ are the weights of the position difference ΔP and the attitude difference ΔR, P s is the target position of the end joint, and p sj is the target position component of the end joint , d sj is the target pose of the end joint, P s , p sj and d sj can be obtained from the target coordinates of the end joint, P r is the random position of the end joint, p rj is the random position component of the end joint, d rj For the random pose of the end joint, P r , p rj and d rj can be obtained from the random coordinates of the end joint, and ||P s -P r || is the calculation of the target position of the end joint and the random position of the end joint. The distance between them.
本公开实施例所提供的确定串联机器人反解结果的装置可用于执行本公开任意实施例所提供的确定串联机器人反解结果的方法,具备执行该方法相应的功能和有益效果。The apparatus for determining the inverse solution result of the serial robot provided by the embodiment of the present disclosure may be used to perform the method for determining the inverse solution result of the serial robot provided by any embodiment of the present disclosure, and has the corresponding functions and beneficial effects of performing the method.
实施例六Embodiment 6
图6是本公开实施例六提供的实施确定串联机器人反解结果的方法的主从机器人的闭环控制系统示意图,图7是本公开实施例六提供的一种确定串联机器人反解结果的方法中的关节坐标系示意图。6 is a schematic diagram of a closed-loop control system of a master-slave robot for implementing a method for determining a result of a reverse solution of a tandem robot according to a sixth embodiment of the present disclosure, and FIG. 7 is a method for determining an inverse solution result of a tandem robot according to a sixth embodiment of the present disclosure. Schematic diagram of the joint coordinate system.
一种确定串联机器人反解结果的方法所在的系统包括:操作者601、主机器人602、PC 603、控制器604、从机器人605及光学跟踪仪606,如图6所示。其中,主机器人602与PC 603之间通过传输控制协议/因特网互联协议(Transmission Control Protocol/Internet Protocol,TCP/IP)协议来通信,控制器604与PC 603之间通过以太网来通信。A system for determining the inverse solution result of the tandem robot includes: an operator 601, a master robot 602, a PC 603, a controller 604, a slave robot 605, and an optical tracker 606, as shown in FIG. The master robot 602 communicates with the PC 603 via a Transmission Control Protocol/Internet Protocol (TCP/IP) protocol, and the controller 604 communicates with the PC 603 via Ethernet.
图7示出了从机器人的三个关节,包括第一关节701、第二关节702和末端关节703,并在第一关节上建立了基坐标系,在第二关节702上建立了中间坐标系,在末端关节703上建立了末端坐标系。本领域技术人员可以理解的是,从机器人的关节的个数可以是其他的任意值。Figure 7 shows three joints of the slave robot, including a first joint 701, a second joint 702, and an end joint 703, and a base coordinate system is established on the first joint, and an intermediate coordinate system is established on the second joint 702. An end coordinate system is established on the end joint 703. It will be understood by those skilled in the art that the number of joints from the robot can be any other value.
操作者601操作主机器人602,把主机器人601的运动指令通过PC 603和控制器604传递给从机器人605,光学跟踪仪606给操作者601反馈从机器人605的当前运动状态和位置状态。The operator 601 operates the master robot 602, and transmits the motion command of the master robot 601 to the slave robot 605 via the PC 603 and the controller 604. The optical tracker 606 feeds the operator 601 back to the current motion state and position state of the slave robot 605.
PC 603从主机器人602接收到的运动指令是从机器人605的末端关节703的目标坐标,PC 603应用本公开上述实施例提供的确定串联机器人反解结果的方法,来获得从机器人605的第一关节701和第二关节702的关节变量,控制器604根据该关节变量控制从机器人605每个关节的运动,使末端关节处于目标坐标。The motion command received by the PC 603 from the master robot 602 is the target coordinate of the end joint 703 from the robot 605, and the PC 603 applies the method of determining the inverse solution result of the tandem robot provided by the above-described embodiment of the present disclosure to obtain the first slave robot 605. The joint variables of the joint 701 and the second joint 702, the controller 604 controls the movement of each joint from the robot 605 according to the joint variable such that the end joint is at the target coordinates.
本实施例给出了一种应用确定串联机器人反解结果的方法的主从机器人系统和从机器人的关节结构,使得PC能够根据主机器人给出的从机器人的末端关节的目标坐标,快速而准确地求出从机器人每个关节的关节变量,控制器根据该关节变量控制从机器人实时跟随主机器人的运动。The present embodiment provides a master-slave robot system and a joint structure of the slave robot using a method for determining the inverse solution result of the tandem robot, so that the PC can quickly and accurately obtain the target coordinates of the end joint of the robot according to the master robot. The joint variable from each joint of the robot is obtained, and the controller controls the movement of the slave robot in real time according to the joint variable.
实施例七 Example 7
本公开还提供了一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述任一实施例中的方法。The present disclosure also provides a non-transitory computer readable storage medium storing computer executable instructions arranged to perform the method of any of the above embodiments.
实施例八Example eight
本公开还提供了一种电子设备的硬件结构示意图。参见图8,该电子设备包括:The present disclosure also provides a hardware structure diagram of an electronic device. Referring to FIG. 8, the electronic device includes:
至少一个处理器(Processor)80,图8中以一个处理器80为例;和存储器(Memory)81,还可以包括通信接口(Communications Interface)82和总线83。其中,处理器80、通信接口82、存储器81可以通过总线83完成相互间的通信。通信接口82可以传输信息。处理器80可以调用存储器81中的逻辑指令,以执行确定串联机器人反解结果的方法。At least one processor 80, which is exemplified by a processor 80 in FIG. 8; and a memory 81, may further include a communication interface 82 and a bus 83. The processor 80, the communication interface 82, and the memory 81 can complete communication with each other through the bus 83. Communication interface 82 can transmit information. The processor 80 can call the logic instructions in the memory 81 to perform a method of determining the result of the tandem robot inverse solution.
此外,上述的存储器81中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。In addition, the logic instructions in the memory 81 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
存储器81作为一种计算机可读存储介质,可存储软件程序、计算机可执行程序,如本公开实施例中的方法对应的程序指令或模块。处理器80通过运行存储在存储器81中的软件程序、指令或模块,从而执行功能应用以及数据处理,即实现确定串联机器人反解结果的方法。The memory 81 is a computer readable storage medium, and can store a software program, a computer executable program, a program instruction or a module corresponding to the method in the embodiment of the present disclosure. The processor 80 executes the functional application and the data processing by running a software program, an instruction or a module stored in the memory 81, that is, a method of determining the inverse solution result of the tandem robot.
存储器81可包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端设备的使用所创建的数据等。此外,存储器81可以包括高速随机存取存储器,还可以包括非易失性存储器。The memory 81 may include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to use of the terminal device, and the like. Further, the memory 81 may include a high speed random access memory, and may also include a nonvolatile memory.
本公开的技术方案可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括一个或多个指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开实施例所述方法的全部或部分步骤。而前述的存储介质可以是非暂态存储介质,包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等多种可以存储程序代码的介质,也可以是暂态存储介质。The technical solution of the present disclosure may be embodied in the form of a software product stored in a storage medium, including one or more instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) Performing all or part of the steps of the method of the embodiments of the present disclosure. The foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. A medium that can store program code, or a transitory storage medium.
工业实用性Industrial applicability
本公开实施例提供的确定串联机器人反解结果的方法及装置,能够快速准 确地计算反解结果。 The method and device for determining the inverse solution result of the serial robot provided by the embodiment of the present disclosure can be quickly quasi-standard Calculate the result of the inverse solution.

Claims (13)

  1. 一种确定串联机器人反解结果的方法,包括:A method for determining the inverse solution result of a tandem robot includes:
    获取串联机器人的末端关节的目标坐标,其中,在所述末端关节之上,以串联的方式连接有至少一个前端关节;Obtaining target coordinates of the end joint of the tandem robot, wherein at least one front end joint is connected in series above the end joint;
    随机产生多个随机关节变量组,其中,每个随机关节变量组中包括与每个所述前端关节分别对应的关节变量;Randomly generating a plurality of random joint variable groups, wherein each random joint variable group includes a joint variable corresponding to each of the front end joints;
    根据每个所述随机关节变量组,计算所述末端关节的随机坐标;Calculating random coordinates of the end joint according to each of the random joint variable groups;
    根据所述目标坐标,在所述随机坐标中选取所述末端关节的近似坐标;以及Selecting approximate coordinates of the end joints in the random coordinates according to the target coordinates;
    根据与所述近似坐标对应的随机关节变量组,确定所述目标坐标的反解结果;Determining an inverse solution result of the target coordinate according to a random joint variable group corresponding to the approximate coordinate;
    其中,所述近似坐标为所述随机坐标和所述目标坐标的误差在误差阈值范围内的随机坐标。The approximate coordinate is a random coordinate in which the error of the random coordinate and the target coordinate is within an error threshold range.
  2. 根据权利要求1所述的方法,其中,根据每个所述随机关节变量组,计算所述末端关节的随机坐标包括:The method of claim 1, wherein calculating the random coordinates of the end joint according to each of the random joint variable sets comprises:
    把每个随机关节变量组代入到预设的坐标变换矩阵中,得到与所述末端关节对应的多个随机坐标。Each random joint variable group is substituted into a preset coordinate transformation matrix to obtain a plurality of random coordinates corresponding to the end joint.
  3. 根据权利要求2所述的方法,在把每个随机关节变量组代入到预设的坐标变换矩阵中,得到与所述末端关节对应的多个随机坐标之前,所述方法还包括:The method according to claim 2, before substituting each set of random joint variables into a preset coordinate transformation matrix to obtain a plurality of random coordinates corresponding to the end joints, the method further comprises:
    建立所述串联机器人的基坐标系O0(x0,y0,z0)以及每一个关节的关节坐标系Oi(xi,yi,zi),其中,i∈[1,n],n为所述串联机器人包括的关节总数;Establishing a base coordinate system O 0 (x 0 , y 0 , z 0 ) of the tandem robot and a joint coordinate system O i (x i , y i , z i ) of each joint, where i∈[1,n ], n is the total number of joints included in the tandem robot;
    根据所述基坐标系以及所述关节坐标系,确定相邻两个坐标系之间的变换矩阵
    Figure PCTCN2017071083-appb-100001
    以及
    Determining a transformation matrix between two adjacent coordinate systems according to the base coordinate system and the joint coordinate system
    Figure PCTCN2017071083-appb-100001
    as well as
    根据公式
    Figure PCTCN2017071083-appb-100002
    计算所述末端关节在所述基坐标系O0(x0,y0,z0)中的变换矩阵
    Figure PCTCN2017071083-appb-100003
    将所述
    Figure PCTCN2017071083-appb-100004
    作为所述预设的坐标变换矩阵;
    According to the formula
    Figure PCTCN2017071083-appb-100002
    Calculating a transformation matrix of the end joint in the base coordinate system O 0 (x 0 , y 0 , z 0 )
    Figure PCTCN2017071083-appb-100003
    Will be said
    Figure PCTCN2017071083-appb-100004
    As the preset coordinate transformation matrix;
    其中,d1x、d1y、d1z、d2x、d2y、d2z、d3x、d3y及d3z用于表示末端关节的姿态,px、py及pz用于表示末端关节的位置;Wherein, d 1x , d 1y , d 1z , d 2x , d 2y , d 2z , d 3x , d 3y , and d 3z are used to represent the posture of the end joint, and p x , p y , and p z are used to represent the end joint. position;
    所述d1x、d1y、d1z、d2x、d2y、d2z、d3x、d3y、d3z、px、py及pz的取值,由与每个所述前端关节分别对应的关节变量确定。The values of d 1x , d 1y , d 1z , d 2x , d 2y , d 2z , d 3x , d 3y , d 3z , p x , p y , and p z are determined by each of the front joints The corresponding joint variable is determined.
  4. 根据权利要求3所述的方法,其中,根据所述目标坐标,在所述随机坐标中选取所述末端关节的近似坐标,包括:The method according to claim 3, wherein the approximate coordinates of the end joint are selected in the random coordinates according to the target coordinates, including:
    计算所述末端关节的目标坐标与所述末端关节的随机坐标之间的误差值;以及Calculating an error value between a target coordinate of the end joint and a random coordinate of the end joint;
    获取所述误差值小于误差阈值的末端关节的随机坐标,作为所述末端关节的近似坐标。Obtaining a random coordinate of the end joint whose error value is smaller than the error threshold as an approximate coordinate of the end joint.
  5. 根据权利要求4所述的方法,其中,根据与所述近似坐标对应的随机关节变量组,确定所述目标坐标的反解结果,包括:The method according to claim 4, wherein determining an inverse solution result of said target coordinates based on a random joint variable group corresponding to said approximate coordinates comprises:
    获取与至少两个所述近似坐标分别对应的随机关节变量组,作为待选随机关节变量组;Obtaining a random joint variable group respectively corresponding to at least two of the approximate coordinates as a candidate random joint variable group;
    选取距离所述末端关节最远的一个前端关节,作为当前比对关节;Selecting a front end joint that is furthest from the end joint as the current alignment joint;
    分别在每个所述待选随机关节变量组中,获取与所述当前比对关节对应的关节变量;Obtaining a joint variable corresponding to the current comparison joint in each of the selected random joint variable groups;
    根据所述关节变量,确定与每个所述待选随机关节变量组分别对应的当前比对关节的关节移动量; Determining, according to the joint variable, a joint movement amount of a current comparison joint corresponding to each of the candidate random joint variable groups;
    将最小的所述当前比对关节的关节移动量对应的待选随机关节变量组作为优选随机关节变量组;如果优选随机关节变量组的数量大于1,则朝着靠近所述末端关节的方向,选取与所述当前比对关节相邻的前端关节作为当前比对关节,并返回执行分别在每个所述待选随机关节变量组中,获取与所述当前比对关节对应的关节变量的操作;以及a set of candidate random joint variables corresponding to the minimum amount of joint movement of the current comparison joint is taken as a preferred random joint variable group; if the number of preferred random joint variable groups is greater than 1, toward a direction close to the end joint, Selecting a front end joint adjacent to the current comparison joint as a current comparison joint, and returning to perform an operation of acquiring a joint variable corresponding to the current comparison joint in each of the to-be-selected random joint variable groups ;as well as
    如果优选随机关节变量组的数量为1,将所述优选随机关节变量组,作为所述目标坐标的反解结果。If the number of preferred random joint variable groups is 1, the preferred random joint variable group is taken as the inverse of the target coordinates.
  6. 根据权利要求4所述的方法,其中,计算所述末端关节的目标坐标与所述末端关节的随机坐标之间的误差值,包括:The method of claim 4, wherein calculating an error value between a target coordinate of the end joint and a random coordinate of the end joint comprises:
    根据公式ΔE=ΔP+ΔR以及According to the formula ΔE=ΔP+ΔR and
    Figure PCTCN2017071083-appb-100005
    计算所述末端关节的目标坐标与所述末端关节的随机坐标之间的误差值ΔE;
    Figure PCTCN2017071083-appb-100005
    Calculating an error value ΔE between a target coordinate of the end joint and a random coordinate of the end joint;
    其中,ΔP表示位置差异,ΔR表示姿态差异,ωρ和ωγ为所述位置差异ΔP和所述姿态差异ΔR的权重,Ps为末端关节的目标位置,psj为末端关节的目标位置分量,dsj为末端关节的目标姿态,Ps、psj及dsj可从所述末端关节的目标坐标获得,Pr为末端关节的随机位置,prj为末端关节的随机位置分量,drj为末端关节的随机姿态,Pr、prj及drj可从所述末端关节的随机坐标中获得,||Ps-Pr||为计算末端关节的目标位置和末端关节的随机位置之间的距离。Where ΔP represents the position difference, ΔR represents the attitude difference, ω ρ and ω γ are the weights of the position difference ΔP and the attitude difference ΔR, P s is the target position of the end joint, and p sj is the target position component of the end joint , d sj is the target pose of the end joint, P s , p sj and d sj can be obtained from the target coordinates of the end joint, P r is the random position of the end joint, p rj is the random position component of the end joint, d rj For the random pose of the end joint, P r , p rj and d rj can be obtained from the random coordinates of the end joint, and ||P s -P r || is the calculation of the target position of the end joint and the random position of the end joint. The distance between them.
  7. 一种确定串联机器人反解结果的装置,包括:A device for determining the inverse solution result of a tandem robot, comprising:
    目标坐标获取模块,设置为获取串联机器人的末端关节的目标坐标,其中,在所述末端关节之上,以串联的方式连接有至少一个前端关节;a target coordinate acquiring module, configured to acquire target coordinates of an end joint of the tandem robot, wherein at least one front end joint is connected in series above the end joint;
    随机关节变量组产生模块,与所述目标坐标获取模块相连,设置为随机产 生多个随机关节变量组,其中,每个随机关节变量组中包括与每个所述前端关节分别对应的关节变量;a random joint variable group generating module, connected to the target coordinate acquiring module, and set to random production Generating a plurality of random joint variable groups, wherein each random joint variable group includes a joint variable corresponding to each of the front end joints;
    随机坐标计算模块,与所述随机关节变量组产生模块相连,设置为根据每个所述随机关节变量组,计算所述末端关节的随机坐标;a random coordinate calculation module, connected to the random joint variable group generating module, configured to calculate a random coordinate of the end joint according to each of the random joint variable groups;
    近似坐标选取模块,与所述随机坐标计算模块相连,设置为根据所述目标坐标,在所述随机坐标中选取所述末端关节的近似坐标;以及An approximate coordinate selection module, coupled to the random coordinate calculation module, configured to select an approximate coordinate of the end joint in the random coordinate according to the target coordinate;
    反解结果确定模块,与所述近似坐标选取模块相连,设置为根据与所述近似坐标对应的随机关节变量组,确定所述目标坐标的反解结果;The inverse solution result determining module is connected to the approximate coordinate selecting module, and is configured to determine an inverse solution result of the target coordinate according to the random joint variable group corresponding to the approximate coordinate;
    其中,所述近似坐标为所述随机坐标和所述目标坐标的误差在误差阈值范围内的随机坐标。The approximate coordinate is a random coordinate in which the error of the random coordinate and the target coordinate is within an error threshold range.
  8. 根据权利要求7所述的装置,其中,所述随机坐标计算模块包括:The apparatus of claim 7, wherein the random coordinate calculation module comprises:
    坐标变换矩阵单元,设置为把每个随机关节变量组代入到预设的坐标变换矩阵中,得到与所述末端关节对应的多个随机坐标。The coordinate transformation matrix unit is arranged to substitute each random joint variable group into a preset coordinate transformation matrix to obtain a plurality of random coordinates corresponding to the end joint.
  9. 根据权利要求8所述的装置,其中,所述随机坐标计算模块还包括:The apparatus according to claim 8, wherein the random coordinate calculation module further comprises:
    坐标系建立单元,设置为建立所述串联机器人的基坐标系O0(x0,y0,z0)以及每一个关节的关节坐标系Oi(xi,yi,zi),其中,i∈[1,n],n为所述串联机器人包括的关节总数;a coordinate system establishing unit configured to establish a base coordinate system O 0 (x 0 , y 0 , z 0 ) of the tandem robot and a joint coordinate system O i (x i , y i , z i ) of each joint, wherein , i ∈ [1, n], n is the total number of joints included in the tandem robot;
    变换矩阵确定单元,与所述坐标系建立单元相连,设置为根据所述基坐标系以及所述关节坐标系,确定相邻两个坐标系之间的变换矩阵
    Figure PCTCN2017071083-appb-100006
    以及
    a transformation matrix determining unit, connected to the coordinate system establishing unit, configured to determine a transformation matrix between two adjacent coordinate systems according to the base coordinate system and the joint coordinate system
    Figure PCTCN2017071083-appb-100006
    as well as
    坐标变换矩阵计算单元,分别与所述变换矩阵确定单元及所述坐标变换矩阵单元相连,设置为根据公式
    Figure PCTCN2017071083-appb-100007
    计算所述末端关节在所述基坐标系O0(x0,y0,z0)中的变换矩阵
    Figure PCTCN2017071083-appb-100008
    将所述
    Figure PCTCN2017071083-appb-100009
    作为所述预设 的坐标变换矩阵;
    a coordinate transformation matrix calculation unit respectively connected to the transformation matrix determination unit and the coordinate transformation matrix unit, and configured to be according to a formula
    Figure PCTCN2017071083-appb-100007
    Calculating a transformation matrix of the end joint in the base coordinate system O 0 (x 0 , y 0 , z 0 )
    Figure PCTCN2017071083-appb-100008
    Will be said
    Figure PCTCN2017071083-appb-100009
    As the preset coordinate transformation matrix;
    其中,d1x、d1y、d1z、d2x、d2y、d2z、d3x、d3y及d3z用于表示末端关节的姿态,px、py及pz用于表示末端关节的位置;Wherein, d 1x , d 1y , d 1z , d 2x , d 2y , d 2z , d 3x , d 3y , and d 3z are used to represent the posture of the end joint, and p x , p y , and p z are used to represent the end joint. position;
    所述d1x、d1y、d1z、d2x、d2y、d2z、d3x、d3y、d3z、px、py及pz的取值,由与每个所述前端关节分别对应的关节变量确定。The values of d 1x , d 1y , d 1z , d 2x , d 2y , d 2z , d 3x , d 3y , d 3z , p x , p y , and p z are determined by each of the front joints The corresponding joint variable is determined.
  10. 根据权利要求9所述的装置,其中,所述近似坐标选取模块包括:The apparatus of claim 9, wherein the approximate coordinate selection module comprises:
    误差值计算单元,设置为计算所述末端关节的目标坐标与所述末端关节的随机坐标之间的误差值;以及An error value calculation unit configured to calculate an error value between a target coordinate of the end joint and a random coordinate of the end joint;
    误差值判断单元,与所述误差值计算单元相连,设置为获取所述误差值小于误差阈值的末端关节的随机坐标,作为所述末端关节的近似坐标。The error value judging unit is connected to the error value calculating unit and configured to acquire the random coordinates of the end joint whose error value is smaller than the error threshold as the approximate coordinates of the end joint.
  11. 根据权利要求10所述的装置,其中,反解结果确定模块包括:The apparatus according to claim 10, wherein the inverse solution result determining module comprises:
    待选随机关节变量组获取单元,设置为获取与至少两个所述近似坐标分别对应的随机关节变量组,作为待选随机关节变量组;The candidate random joint variable group acquiring unit is configured to acquire a random joint variable group respectively corresponding to at least two of the approximate coordinates, as a candidate random joint variable group;
    当前比对关节选取单元,与所述待选随机关节变量组获取单元相连,设置为选取距离所述末端关节最远的一个前端关节,作为当前比对关节;The current comparison joint selection unit is connected to the to-be-selected random joint variable group acquisition unit, and is configured to select a front end joint farthest from the end joint as the current comparison joint;
    关节变量获取单元,与所述当前比对关节选取单元相连,设置为分别在每个所述待选随机关节变量组中,获取与所述当前比对关节对应的关节变量;a joint variable acquiring unit is connected to the current matching joint selecting unit, and configured to acquire a joint variable corresponding to the current matching joint in each of the selected random joint variable groups;
    移动量确定单元,与所述关节变量获取单元相连,设置为根据所述关节变量,确定与每个所述待选随机关节变量组分别对应的当前比对关节的关节移动量;a movement amount determining unit, connected to the joint variable acquiring unit, configured to determine, according to the joint variable, a joint movement amount of a current comparison joint corresponding to each of the candidate random joint variable groups;
    筛选随机关节变量组单元,与所述移动量确定单元相连,设置为将最小的所述当前比对关节的关节移动量对应的待选随机关节变量组作为优选随机关节变量组; Screening a random joint variable group unit, and connecting the movement amount determining unit, and setting the candidate random joint variable group corresponding to the minimum joint movement amount of the current comparison joint as a preferred random joint variable group;
    缩减随机关节变量组数量单元,与所述筛选随机关节变量组单元相连,设置为如果优选随机关节变量组的数量大于1,则朝着靠近所述末端关节的方向,选取与所述当前比对关节相邻的前端关节作为当前比对关节,并返回执行分别在每个所述待选随机关节变量组中,获取与所述当前比对关节对应的关节变量的操作;以及Reducing the random joint variable group number unit, and connecting to the screening random joint variable group unit, and setting, if the number of preferred random joint variable groups is greater than 1, selecting the current comparison with the direction toward the end joint a front end joint adjacent to the joint as a current alignment joint, and returning to perform an operation of acquiring a joint variable corresponding to the current comparison joint in each of the selected random joint variable groups;
    反解结果获取单元,与所述缩减随机关节变量组数量单元相连,设置为如果优选随机关节变量组的数量为1,将所述优选随机关节变量组,作为所述目标坐标的反解结果。The inverse solution result obtaining unit is connected to the reduced random joint variable group number unit, and is set such that if the number of preferred random joint variable groups is 1, the preferred random joint variable group is used as the inverse solution result of the target coordinates.
  12. 根据权利要求10所述的装置,其中,误差值计算单元设置为:The apparatus according to claim 10, wherein the error value calculation unit is configured to:
    根据公式ΔE=ΔP+ΔR以及According to the formula ΔE=ΔP+ΔR and
    Figure PCTCN2017071083-appb-100010
    计算所述末端关节的目标坐标与所述末端关节的随机坐标之间的误差值ΔE;
    Figure PCTCN2017071083-appb-100010
    Calculating an error value ΔE between a target coordinate of the end joint and a random coordinate of the end joint;
    其中,ΔP表示位置差异,ΔR表示姿态差异,ωρ和ωγ为所述位置差异ΔP和所述姿态差异ΔR的权重,Ps为末端关节的目标位置,psj为末端关节的目标位置分量,dsj为末端关节的目标姿态,Ps、psj及dsj可从所述末端关节的目标坐标获得,Pr为末端关节的随机位置,prj为末端关节的随机位置分量,drj为末端关节的随机姿态,Pr、prj及drj可从所述末端关节的随机坐标中获得,||Ps-Pr||为计算末端关节的目标位置和末端关节的随机位置之间的距离。Where ΔP represents the position difference, ΔR represents the attitude difference, ω ρ and ω γ are the weights of the position difference ΔP and the attitude difference ΔR, P s is the target position of the end joint, and p sj is the target position component of the end joint , d sj is the target pose of the end joint, P s , p sj and d sj can be obtained from the target coordinates of the end joint, P r is the random position of the end joint, p rj is the random position component of the end joint, d rj For the random pose of the end joint, P r , p rj and d rj can be obtained from the random coordinates of the end joint, and ||P s -P r || is the calculation of the target position of the end joint and the random position of the end joint. The distance between them.
  13. 一种非暂态计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行权利要求1-6中任一项的方法。 A non-transitory computer readable storage medium storing computer executable instructions arranged to perform the method of any of claims 1-6.
PCT/CN2017/071083 2017-01-13 2017-01-13 Method and apparatus for use in determining inverse solution for robots in series connection WO2018129705A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/071083 WO2018129705A1 (en) 2017-01-13 2017-01-13 Method and apparatus for use in determining inverse solution for robots in series connection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/071083 WO2018129705A1 (en) 2017-01-13 2017-01-13 Method and apparatus for use in determining inverse solution for robots in series connection

Publications (1)

Publication Number Publication Date
WO2018129705A1 true WO2018129705A1 (en) 2018-07-19

Family

ID=62839229

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/071083 WO2018129705A1 (en) 2017-01-13 2017-01-13 Method and apparatus for use in determining inverse solution for robots in series connection

Country Status (1)

Country Link
WO (1) WO2018129705A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1250986A2 (en) * 2001-04-16 2002-10-23 Fanuc Ltd Robot controller including bending compensation means
US20110224958A1 (en) * 2010-03-12 2011-09-15 Kyungpook National University Industryacademic Cooperation Foundation Error compensation method for multi-axis controlled machines
CN105404174A (en) * 2015-11-11 2016-03-16 华中科技大学 Solving method for six-degree-of-freedom series robot inverse kinematics solution
CN105904462A (en) * 2016-05-27 2016-08-31 湖南科瑞特科技股份有限公司 Control method of six-degree-of-freedom intelligent robot body

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1250986A2 (en) * 2001-04-16 2002-10-23 Fanuc Ltd Robot controller including bending compensation means
US20110224958A1 (en) * 2010-03-12 2011-09-15 Kyungpook National University Industryacademic Cooperation Foundation Error compensation method for multi-axis controlled machines
CN105404174A (en) * 2015-11-11 2016-03-16 华中科技大学 Solving method for six-degree-of-freedom series robot inverse kinematics solution
CN105904462A (en) * 2016-05-27 2016-08-31 湖南科瑞特科技股份有限公司 Control method of six-degree-of-freedom intelligent robot body

Similar Documents

Publication Publication Date Title
US20230330848A1 (en) Reinforcement and imitation learning for a task
Qian et al. Developing a gesture based remote human-robot interaction system using kinect
CN111152218B (en) Action mapping method and system of heterogeneous humanoid mechanical arm
JP7324932B2 (en) dynamic planning controller
US11440183B2 (en) Hybrid machine learning-based systems and methods for training an object picking robot with real and simulated performance data
US20230055206A1 (en) Legged robot motion control method, apparatus, and device, and medium
Aleotti et al. An affordance sensitive system for robot to human object handover
Sayour et al. Autonomous robotic manipulation: Real-time, deep-learning approach for grasping of unknown objects
Wang et al. A real-time human imitation system
CN107553496B (en) Method and device for determining and correcting errors of inverse kinematics solving method of mechanical arm
WO2020190166A1 (en) Method and system for grasping an object by means of a robotic device
WO2022134702A1 (en) Action learning method and apparatus, storage medium, and electronic device
US20200331144A1 (en) Machine Learning-Based Systems and Methods for Controlling Robotic Object Picking and Placement in Training and Run Time Environments
CN112906118A (en) Construction robot remote operation method under virtual-real coupling environment
CN113119104B (en) Mechanical arm control method, mechanical arm control device, computing equipment and system
JP2012157955A (en) Device and method for controlling movement, and computer program
CN106647248B (en) Method and device for determining inverse solution result of serial robot
Zhao et al. A learning-based multiscale modelling approach to real-time serial manipulator kinematics simulation
Zhao et al. A novel algorithm of human-like motion planning for robotic arms
US20180215044A1 (en) Image processing device, robot control device, and robot
JP6792230B1 (en) Information processing equipment, methods and programs
WO2018129705A1 (en) Method and apparatus for use in determining inverse solution for robots in series connection
Ostanin et al. Programming by Demonstration Using Two-Step Optimization for Industrial Robot.
CN110114195B (en) Action transfer device, action transfer method, and non-transitory computer-readable medium storing action transfer program
Chan et al. Collision-free path planning based on new navigation function for an industrial robotic manipulator in human-robot coexistence environments

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17891866

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 21.11.2019)

122 Ep: pct application non-entry in european phase

Ref document number: 17891866

Country of ref document: EP

Kind code of ref document: A1