CN-121973220-A - Robot bolt and nut assembling method
Abstract
The invention provides a robot bolt and nut assembling method which comprises the steps of obtaining physical coordinates of a bolt and a nut in a three-dimensional space according to image pixel coordinates of the bolt and the nut and a double-view positioning algorithm, generating and executing a training strategy for grabbing and transferring the nut according to the physical coordinates of the nut in the three-dimensional space and the tail end pose of the robot so as to control the robot to execute grabbing and transferring operations, generating and executing an axis alignment strategy of the bolt and the nut according to the physical coordinates of the bolt and the nut in the three-dimensional space, a standard spiral line equation, an elliptic spiral line long axis growth coefficient and a long axis direction so as to control the robot to execute the axis alignment of the bolt and the nut, and utilizing a tail end impedance controller of the robot and a screwing state machine to generate and execute the screwing strategy of the bolt and the nut so as to complete an automatic assembling process of the bolt and the nut. According to the technical scheme provided by the embodiment of the invention, the bolt and nut assembly under the condition of taking grabbing and positioning errors into consideration can be realized.
Inventors
- CHEN GANG
- LV GUOHUI
- JI NING
- HUANG ZEYUAN
- YAO JIPENG
- HAO ZIXUAN
- Lv Haoyang
Assignees
- 北京邮电大学
Dates
- Publication Date
- 20260505
- Application Date
- 20260206
Claims (5)
- 1. A method of robotic bolt-nut assembly, the method comprising: S1, acquiring physical coordinates of a bolt and a nut in a three-dimensional space according to image pixel coordinates of the bolt and the nut and a double-view positioning algorithm; Step S2, generating and executing a training strategy for grabbing and transferring the nuts according to physical coordinates of the nuts in a three-dimensional space and the tail end pose of the robot so as to control the robot to execute the actions of grabbing and transferring operations; S3, generating and executing an axis alignment strategy of the bolt and the nut according to physical coordinates of the bolt and the nut in a three-dimensional space, a standard spiral line equation, an elliptical spiral line long axis growth coefficient and a long axis direction so as to control the robot to execute the action of aligning the axis of the bolt and the nut; and S4, generating and executing a screwing strategy of the bolt and the nut by utilizing a robot tail end impedance controller and a screwing state machine, wherein the screwing strategy comprises an action sequence formed by a plurality of screwing actions so as to control the robot to execute the action sequence contained in the screwing strategy.
- 2. The method according to claim 1, wherein the step S1 of obtaining the physical coordinates of the bolt and the nut in the three-dimensional space according to the image pixel coordinates of the bolt and the nut and according to the two-view positioning algorithm includes: The image pixel coordinates of the bolt and nut are processed using the following two-view positioning algorithm to convert the image pixel coordinates of the bolt and nut to a camera coordinate system: Wherein, the And The direction vectors of the bolts and nuts represented by the pixel points under the sight of the first camera and the second camera are respectively shown; And (3) with The internal reference matrix is respectively a first camera and a second camera; And Image pixel coordinates in the first camera and the second camera for the bolt and nut; the direction vector of the bolt and the nut in the camera coordinate system is converted into the world coordinate system: Wherein, the And A unit direction vector of the line of sight of the first camera and the second camera in a world coordinate system; And A rotation matrix for the first camera and the second camera coordinate system relative to the world coordinate system; calculating three-dimensional space coordinates of the bolt and the nut in a world coordinate system based on the first camera sight line and the second camera sight line respectively: Wherein, the And The three-dimensional space coordinates of the bolt and the nut under the world coordinate system are obtained along the sight directions of the first camera and the second camera respectively; And Position vectors for the first camera and the second camera relative to the world coordinate system; And (3) with Taking a function of the distance between the line of sight of the first camera and the second camera and the origin of the world coordinate system Results at minimum; Averaging the three-dimensional space coordinates obtained by the first camera and the second camera respectively to obtain three-dimensional space coordinates of the bolt and the nut in a world coordinate system: Wherein, the Is the three-dimensional space coordinate of the bolt and the nut under the world coordinate system.
- 3. The method according to claim 1, wherein the step S2 of generating and executing the training strategy for capturing and transferring the nut according to the physical coordinates of the nut in the three-dimensional space and the pose of the end of the robot comprises: The training strategy for generating and executing nut grabbing and transferring is realized by constructing a conditional diffusion model, and the model is used for randomly diffusing time step in the forward direction process The following noise sample construction algorithm is: Wherein, the For the original sample Through the process of Obtaining samples after Gaussian noise Conditional probability of (2); Is normally distributed; represent the first The retention ratio of the original data information in the diffusion time steps, On the first hand for the original sample information Cumulative retention ratio in each diffusion time step; Is a unit matrix; scheduling for noise gain; the reverse generation process of the conditional diffusion model comprises the following steps: Wherein, the To be in the current environment state Down, diffusion process Conditional probability of (2); is shown at the moment From the initial action To full noise action Is a sequence of all intermediate variables of (a); A priori distribution of diffusion processes; To be at the moment Number of steps Action noise at the time; For each moment of robot movement; For each moment of movement Action Total number of steps of the diffusion process; To be in motion noise And the current environmental state Under the condition of (a) the previous time step action Conditional probability of (2); For the current moment The environment states comprise three-dimensional space coordinates of the nut, the tail end pose of the robot and other environment states; the mean value prediction function is used for denoising the neural network; A covariance prediction function of the denoising neural network; Performing action generation according to the training strategy for capturing and transferring the generated nut, and specifically, learning a mean value prediction function in the reverse generation process by training a noise predictor, wherein the training method comprises the following steps: Wherein, the To be in state information First, the The step noise action is The mean value of the gaussian noise at the time, To be in a time step The diffusion process proceeds to the first The mid-noise action of the steps, Is the first The signal to noise ratio factor of the step, Is a noise predictor; In the process of training a noise predictor, the action space and the state space are constrained and defined according to the motion control requirement of the robot: Wherein, the The joint angle of the robot is the last dimension of the gripper action at the tail end of the robot; images acquired for the first camera and the second camera; The robot joint angle at the time t; The position and the posture of the tail end of the robot; The three-dimensional space coordinate of the nut under the world coordinate system is obtained; Is the three-dimensional space coordinate of the bolt under the world coordinate system; By aligning , , Code embedding is carried out as input of a converter decoder module so as to obtain noise of each step in the diffusion process, and finally the current motion moment is obtained 。
- 4. The method according to claim 1, wherein the generating and executing the axis alignment strategy of the bolt and the nut according to the physical coordinates of the bolt and the nut in the three-dimensional space, the standard spiral equation, the elliptical spiral long axis growth coefficient and the long axis direction in the step S3 comprises: Based on the axis alignment strategy of the bolt and the nut, adjusting a standard spiral line to obtain a search spiral line so as to finish the axis alignment strategy of the bolt and the nut, wherein the mathematical expression of the search spiral line is as follows: Wherein, the And For the robot end at time under world coordinate system The x-axis and y-axis desired positions at that time, And At the moment for the robot End position at time; The ratio of the major axis to the minor axis of the elliptical spiral line; the expansion period is a spiral line expansion period; And (3) with The spiral line parameters based on the visual positioning result are respectively used for controlling the long axis growth coefficient and the long axis direction of the elliptical spiral line, and the calculation method comprises the following steps: Wherein, the In order to scale-up the coefficient of the coefficient, For the physical coordinates of the nut in three dimensions on the x-axis and the y-axis, The physical coordinates of the x axis and the y axis of the bolt in the three-dimensional space; constructing a search spiral track of a robot end effector according to the position of the robot end; based on bolt and nut axis alignment strategy, the position of the tail end of the robot in the world coordinate system is aligned The axial movement is set as: Wherein, the For the robot end at time under world coordinate system The desired position of the z-axis at that time, And (3) with The z-axis coordinates of the bolt and the nut under visual positioning are respectively; Is a safe offset; the position of the tail end of the z-axis of the robot under the world coordinate system; Is a scaling factor; Based on the searching spiral track, calculating expected positions of the tail end of the robot at all moments, and converting the expected positions into corresponding robot motion control instructions so as to drive the tail end actuator of the robot to move along the searching spiral track, thereby completing the axis alignment operation of the bolt and the nut.
- 5. The method according to claim 1, wherein generating a screw-on strategy for the screw-on nut using the robot tip impedance controller and the screw-on state machine in step S4 comprises: according to the screwing strategy, impedance control is carried out on the robot operation space, so that the tail end shows the dynamic characteristics of a second-order system as follows: Wherein, the Representing a difference between the desired pose and the actual pose of the tip; The actual pose of the tail end of the robot; is a target inertia matrix; Is a target damping matrix; Is a target stiffness matrix; External force is applied to the tail end of the robot; Based on the dynamic equation of the robot, the second-order mass-damping-spring dynamic equation and the mapping relation between the terminal acceleration and the joint space, the obtained robot joint moment control quantity is as follows: Wherein, the Controlling moment vectors for the joints; The robot joint space inertia matrix; The matrix is a robot jacobian matrix; the acceleration is expected for the tip of the robot; the joint speed of the robot; Compensating terms for coriolis force, centrifugal force and gravity; According to the screwing strategy, a screwing state machine is constructed, the screwing process of the bolt and the nut is controlled by the screwing state machine, so that the automatic screwing operation of the bolt and the nut is realized, and the screwing state machine comprises: step1, acquiring the pose of the tail end of the robot and the opening state of a tail end clamp holder, opening tail end impedance control, and setting a default expected pose and expected force; step2, when the pose of the tail end of the robot is in the initial pose and the tail end clamp holder is in a closed state, applying expected force along the z-axis direction, controlling the tail end of the robot to screw the expected pose along the z-axis, otherwise executing step3; step3, when the tail end pose of the robot is not in the initial pose and the tail end clamp is in a closed state, controlling the robot to open the tail end clamp, otherwise, executing step4; step4, when the pose of the tail end of the robot is not in the initial pose and the tail end clamp is in an open state, returning the tail end of the robot to the initial pose, otherwise, executing step5; step5, when the tail end pose of the robot is in the initial pose and the tail end clamp is in an open state, controlling the robot to close the tail end clamp, otherwise, executing step6; step6 when And (3) returning to the step2, otherwise, ending the screwing process and finishing the assembling process of the bolts and the nuts.
Description
Robot bolt and nut assembling method Technical Field The invention belongs to the field of intelligent operation and flexible control of space mechanical arms, and relates to a robot bolt and nut assembly method in a dynamic scene. Background With the advancement of industrial intelligence, the autonomous robot assembly technology has increasingly highlighted roles in the development of the social industry, wherein bolt-nut assembly is widely applied to outdoor maintenance operations and on-orbit installation and maintenance of spacecraft as a typical robot operation skill. Compared with the bolt-nut assembly in a fixed scene in a manufacturing factory, the uncertainty exists in the position of an operation object (nut) due to the complexity of the environment in the scene, and when the problem of dynamic change of the position of the operation object is solved by the traditional movement method, the operation task cannot be completed due to the fact that the limitation of an algorithm is difficult to respond to the dynamic position change in real time. The artificial intelligence method based on data driving has unique advantages in the aspect of processing the robot motion planning problem in a dynamic scene due to the generalization of the method. The reinforcement learning method based on exploration is difficult to converge due to overlarge exploration space when the problems are processed, and the imitation learning method based on expert data can directly learn a stable and reasonable strategy from expert demonstration, so that the imitation learning method becomes a key technology for improving the environment adaptability of a robot. Disclosure of Invention In view of the above, the present invention provides a method for assembling a robot bolt and nut, so that the robot can effectively grasp nuts with positions dynamically changed in real time, and the problem of rapid alignment and screwing assembly of the bolts and nuts considering the errors of grasping and positioning is solved. The invention provides a robot bolt and nut assembly method, which comprises the following steps: S1, acquiring physical coordinates of a bolt and a nut in a three-dimensional space according to image pixel coordinates of the bolt and the nut and a double-view positioning algorithm; Step S2, generating and executing a training strategy for grabbing and transferring the nuts according to physical coordinates of the nuts in a three-dimensional space and the tail end pose of the robot so as to control the robot to execute the actions of grabbing and transferring operations; S3, generating and executing an axis alignment strategy of the bolt and the nut according to physical coordinates of the bolt and the nut in a three-dimensional space, a standard spiral line equation, an elliptical spiral line long axis growth coefficient and a long axis direction so as to control the robot to execute the action of aligning the axis of the bolt and the nut; and S4, generating and executing a screwing strategy of the bolt and the nut by utilizing a robot tail end impedance controller and a screwing state machine, wherein the screwing strategy comprises an action sequence formed by a plurality of screwing actions so as to control the robot to execute the action sequence contained in the screwing strategy. In the step S1, according to the image pixel coordinates of the bolt and the nut and according to the double-view positioning algorithm, the physical coordinates of the bolt and the nut in the three-dimensional space are obtained, including: The image pixel coordinates of the bolt and nut are processed using the following two-view positioning algorithm to convert the image pixel coordinates of the bolt and nut to a camera coordinate system: Wherein, the AndThe direction vectors of the bolts and nuts represented by the pixel points under the sight of the first camera and the second camera are respectively shown; And (3) with The internal reference matrix is respectively a first camera and a second camera; And Image pixel coordinates in the first camera and the second camera for the bolt and nut; the direction vector of the bolt and the nut in the camera coordinate system is converted into the world coordinate system: Wherein, the AndA unit direction vector of the line of sight of the first camera and the second camera in a world coordinate system; And A rotation matrix for the first camera and the second camera coordinate system relative to the world coordinate system; calculating three-dimensional space coordinates of the bolt and the nut in a world coordinate system based on the first camera sight line and the second camera sight line respectively: Wherein, the AndThe three-dimensional space coordinates of the bolt and the nut under the world coordinate system are obtained along the sight directions of the first camera and the second camera respectively; And Position vectors for the first camera and the second camera relative to th