Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a robot-based cooperative target six-dimensional pose full-automatic positioning method and system.
The invention provides a robot-based cooperative target six-dimensional pose full-automatic positioning method, which comprises the following steps:
Establishing a hand-eye coordinate relation, namely establishing a robot hand-eye coordinate relation through switching of a tool coordinate system and a vision sensor coordinate system;
leveling, namely measuring and adjusting the plane normal through cooperative target plane normal measuring equipment, wherein the measuring and adjusting process is a full-automatic process;
establishing an initial workpiece coordinate system by utilizing cooperative target plane normal measuring equipment;
Adjusting the photographing posture and position of the vision sensor;
photographing by using the vision sensor after the adjustment step, and calculating a coordinate system of the workpiece on the surface of the cooperative target;
And the positioning step is to establish a coordinate system of the workpiece on the surface of the cooperative target according to the photographing result, so as to complete the full-automatic positioning of the six-dimensional pose of the cooperative target.
Preferably, the step of establishing the hand-eye coordinate relationship includes:
Setting up a coordinate system, namely arranging 3 laser displacement sensors around the drilling robot tool, and setting up a robot tool coordinate system O tXtYtZt by using a robot 4-point method and a robot 2-point method, setting up a point tool below a vision sensor light source, ensuring that a center shaft of the point tool is coaxial with a center line of an optical axis of the vision sensor, and setting up a robot vision sensor coordinate system O cXcYcZc by using the 4-point method and the 2-point method;
and switching the O tXtYtZt and the O cXcYcZc in a robot tool coordinate system to obtain a robot hand-eye coordinate relationship.
Preferably, the leveling step includes:
The motion step is to execute the teaching track of the robot to move to the area near the target plane, wherein the teaching program does not require position and gesture accuracy;
The calculation step, the measured value of the normal measurement device of the cooperative target plane is sent to a calculation program in real time, and the included angle and the distance between the tool coordinate system O tXtYtZt and the surface of the cooperative target are calculated through a specific algorithm;
an included angle adjusting step, namely adjusting the gesture of the robot through an included angle between the coordinate system and the surface of the cooperative target, so that the tool coordinate system O tXtYtZt is perpendicular to the surface of the cooperative target;
And recording the coordinates (X 1,Y1,Z1,A1,B1,C1) of the current tool coordinate system O tXtYtZt under the robot root coordinate system and the vertical distance H between the tool coordinate system and the surface of the cooperative target after the posture of the robot is adjusted.
Preferably, the step of establishing the initial workpiece coordinate system includes:
A reading step of reading the coordinates (X 1,Y1,Z1,A1,B1,C1) and the vertical distance H in the recording step;
The conversion step is that the coordinate (X 2,Y2,Z2) of the initial coordinate system of the cooperative target under the robot root coordinate system is obtained according to the coordinate transformation;
obtaining Euler angles, namely obtaining Euler angles of an initial coordinate system of the cooperative target by utilizing the mutual relation between the tool coordinate system and the surface of the cooperative target;
And establishing a cooperative target initial coordinate system, namely establishing a cooperative target initial workpiece coordinate system O b1Xb1Yb1Zb1 through the conversion step and the step of obtaining Euler angles (X 2,Y2,Z2,A2,B2,C2).
Preferably, the adjusting step includes:
The gesture adjusting step, namely adjusting the gesture angle of the robot to enable the optical axis of the visual sensor to be perpendicular to the surface of the cooperative target by C=0 and B=0 of a coordinate system O cXcYcZc of the visual sensor under an initial workpiece coordinate system O b1Xb1Yb1Zb1 of the cooperative target;
The position adjusting step is that after the posture of the visual sensor is adjusted, the position of the visual sensor is adjusted to a photographing fixed height, so that the posture and the position of the visual sensor are within the allowable range, and the photographing definition can be ensured;
the positioning step comprises the following steps:
A step of establishing a plane coordinate system, in which an image is obtained by photographing through a visual sensor, proper geometric elements are selected according to the image properties, and the plane coordinate system of the image under the visual sensor coordinate system is established;
the photographing step comprises the following steps:
The reading step, photographing through a vision sensor to obtain XY coordinates of an origin of a workpiece coordinate system on the surface of a cooperative target under the vision sensor coordinate system, fixedly calculating Z coordinates of the origin under the vision sensor coordinate system by photographing height, and reading coordinates (X c,Yc,Zc,Ac,Bc,Cc) of the vision sensor coordinate system under a robot root coordinate system at the moment;
The conversion step comprises the steps of obtaining a coordinate (X 4,Y4,Z4) of an origin under a robot root coordinate system according to a robot coordinate conversion matrix, obtaining an included angle A 3 between a cooperative target surface workpiece coordinate system and a visual sensor coordinate system according to a connecting line of the origin and a visual sensor photographing object, and obtaining an Euler angle (A 4,B4,C4) of the cooperative target surface workpiece coordinate system under the robot root coordinate system according to a reverse Euler angle formula;
Establishing a cooperative target surface workpiece coordinate system (X 4,Y4,Z4,A4,B4,C4) according to the coordinate and Euler angle obtained in the conversion step;
the positioning step comprises the following steps:
And converting the root coordinate system, namely converting the planar coordinate system of the image under the coordinate system of the visual sensor into the root coordinate system of the robot through coordinate transformation to complete full-automatic positioning of the six-dimensional pose of the cooperative target, wherein the Z value is the photographing height of the camera, the angle B, C is the pose angle of the camera, and the A is the included angle between the coordinate system of the workpiece on the surface of the cooperative target and the coordinate system of the visual sensor.
A robot-based cooperative target six-dimensional pose full-automatic positioning system comprises:
The hand-eye coordinate relation establishing module is used for establishing a robot hand-eye coordinate relation through switching of a tool coordinate system and a vision sensor coordinate system;
The leveling module is used for measuring and adjusting the plane normal through the cooperative target plane normal measuring equipment, wherein the measuring and adjusting process is a full-automatic process;
Establishing an initial workpiece coordinate system module, namely establishing a cooperative target initial workpiece coordinate system by utilizing cooperative target plane normal measuring equipment;
The adjusting module is used for adjusting the photographing posture and position of the vision sensor;
the photographing module is used for photographing by using the vision sensor after the adjusting module and calculating a coordinate system of the workpiece on the surface of the cooperative target;
And the positioning module is used for establishing a coordinate system of the workpiece on the surface of the cooperative target according to the photographing result to complete the full-automatic positioning of the six-dimensional pose of the cooperative target.
Preferably, the establishing the hand-eye coordinate relation module includes:
Setting up a coordinate system module, namely arranging 3 laser displacement sensors around the drilling robot tool, and setting up a robot tool coordinate system O tXtYtZt by using a robot 4-point method and a robot 2-point method, setting up a point tool below a vision sensor light source, ensuring that a center shaft of the point tool is coaxial with a center line of an optical axis of the vision sensor, and setting up a robot vision sensor coordinate system O cXcYcZc by using the 4-point method and the 2-point method;
And the switching module is used for switching the O tXtYtZt and the O cXcYcZc in the robot tool coordinate system to obtain the robot hand-eye coordinate relation.
Preferably, the leveling module includes:
the motion module is used for executing the teaching track of the robot to move to the area near the target plane, wherein the teaching program does not require position and gesture accuracy;
the calculation module is used for sending the measured value of the cooperative target plane normal measurement device to a calculation program in real time, and calculating the included angle and the distance between the tool coordinate system O tXtYtZt and the surface of the cooperative target through a specific algorithm;
The included angle adjusting module is used for adjusting the gesture of the robot through the included angle between the coordinate system and the surface of the cooperative target, so that the tool coordinate system O tXtYtZt is perpendicular to the surface of the cooperative target;
And the recording module is used for recording the coordinates (X 1,Y1,Z1,A1,B1,C1) of the current tool coordinate system O tXtYtZt under the robot root coordinate system and the vertical distance H between the tool coordinate system and the surface of the cooperative target after the posture of the robot is adjusted.
Preferably, the establishing an initial workpiece coordinate system module includes:
The reading module is used for reading the coordinates (X 1,Y1,Z1,A1,B1,C1) and the vertical distance H in the recording module;
The conversion module is used for obtaining a coordinate (X 2,Y2,Z2) of the initial coordinate system of the cooperative target under the root coordinate system of the robot according to the coordinate transformation;
The Euler angle obtaining module is used for obtaining Euler angles of an initial coordinate system of the cooperative target by utilizing the mutual relation between the tool coordinate system and the surface of the cooperative target;
And establishing a cooperative target initial coordinate system module, namely establishing a cooperative target initial workpiece coordinate system O b1Xb1Yb1Zb1 through the conversion module and the (X 2,Y2,Z2,A2,B2,C2) obtained by the Euler angle obtaining module.
Preferably, the adjusting module includes:
The gesture adjustment module is used for adjusting the gesture angle of the robot so that the C=0 and the B=0 of the visual sensor coordinate system O cXcYcZc under the initial workpiece coordinate system O b1Xb1Yb1Zb1 of the cooperative target and the optical axis of the visual sensor is vertical to the surface of the cooperative target;
The position adjusting module is used for adjusting the position of the visual sensor to a photographing fixed height after adjusting the posture of the visual sensor, so that the posture and the position of the visual sensor are in an allowable range, and the photographing definition can be ensured;
the positioning module comprises:
the plane coordinate system establishing module is used for acquiring an image through photographing of the visual sensor, selecting proper geometric elements according to the image property, and establishing a plane coordinate system of the image under the coordinate system of the visual sensor;
the photographing module comprises:
the reading module is used for photographing through the vision sensor to obtain XY coordinates of an origin of the workpiece coordinate system on the surface of the cooperative target under the vision sensor coordinate system, and fixedly calculating Z coordinates of the origin under the vision sensor coordinate system by photographing height, and reading coordinates (X c,Yc,Zc,Ac,Bc,Cc) of the vision sensor coordinate system under the robot root coordinate system at the moment;
The conversion module is used for obtaining a coordinate (X 4,Y4,Z4) of the origin under the robot root coordinate system according to the robot coordinate conversion matrix, obtaining an included angle A 3 between the coordinate system of the workpiece on the surface of the cooperative target and the coordinate system of the vision sensor according to the connecting line of the origin and the photographed object of the vision sensor, and obtaining an Euler angle (A 4,B4,C4) of the coordinate system of the workpiece on the surface of the cooperative target under the robot root coordinate system according to a reverse Euler angle formula;
A cooperative target surface workpiece coordinate system module is established, wherein a cooperative target surface workpiece coordinate system (X 4,Y4,Z4,A4,B4,C4) is established according to the coordinates and Euler angles obtained by the conversion module;
the positioning module comprises:
the root coordinate system conversion module converts an image into a robot root coordinate system under a plane coordinate system under a visual sensor coordinate system through coordinate transformation, and completes full-automatic positioning of six-dimensional pose of a cooperative target, wherein a Z value is a photographing height of a camera, a B, C angle is a pose angle of the camera, and A is an included angle between a workpiece coordinate system on the surface of the cooperative target and the visual sensor coordinate system.
Compared with the prior art, the invention has the following beneficial effects:
1. According to the invention, the hand-eye relation between the robot tool coordinate system and the vision sensor coordinate system is calibrated according to the 4-point method and the 2-point method of the robot workpiece coordinate system, the method is simple and effective, and the tedious process of using a laser interferometer for calibration is avoided.
2. According to the invention, the automatic photographing adjustment and the automatic height adjustment of the vision sensor can be realized according to normal leveling, the photographing definition and the measuring precision can be ensured, the automation of the whole processing process can be realized, and the invention can be suitable for different cooperative target surfaces.
Detailed Description
The present invention will be described in detail with reference to specific examples. The following examples will assist those skilled in the art in further understanding the present invention, but are not intended to limit the invention in any way. It should be noted that variations and modifications could be made by those skilled in the art without departing from the inventive concept. These are all within the scope of the present invention.
Example 1:
As shown in fig. 1 to 4, the present embodiment provides a robot-based cooperative target six-dimensional pose full-automatic positioning method, which includes:
Establishing a hand-eye coordinate relation, namely establishing a robot hand-eye coordinate relation through switching of a tool coordinate system and a vision sensor coordinate system; the step of establishing the hand-eye coordinate relation specifically comprises the following steps:
Setting up a coordinate system, namely arranging 3 laser displacement sensors around a drilling robot tool, setting up a robot tool coordinate system O tXtYtZt by using a 4-point method and a 2-point method of the robot, installing a point tool below a light source of the vision sensor, ensuring the center shaft of the point tool to be coaxial with the center line of an optical axis of the vision sensor, setting up a robot vision sensor coordinate system O cXcYcZc by using the 4-point method and the 2-point method, wherein the 4-point method represents a method for setting up the tool coordinate system by the robot, determining a reference point near the robot, enabling a tool center point to be aligned with the reference point by controlling the gesture of the robot, repeating the steps for 3 times, changing the gesture of the robot, enabling the tool center point to be aligned with the same reference point, setting up an equation set under the condition that coordinates of four tool center points are equal in the world coordinate system, and solving the equation set up, and realizing the establishment of the position of the tool coordinate system;
The switching step comprises the step of switching O tXtYtZt and O cXcYcZc in a robot tool coordinate system to obtain a robot hand-eye coordinate relationship, wherein the robot hand-eye coordinate relationship refers to a tool coordinate system established by a current installation tool of the robot, the eye refers to a tool coordinate system established by a visual sensor as a tool, and the hand-eye coordinate relationship is a transformation matrix between the two coordinate systems.
The leveling step is to measure and adjust the plane normal through the cooperative target plane normal measuring equipment, wherein the measuring and adjusting process is a full-automatic process, and the leveling step specifically comprises the following steps:
The motion step is to execute the teaching track of the robot to move to the area near the target plane, wherein the teaching program does not require position and gesture accuracy;
The calculation step, the measured value of the normal measurement device of the cooperative target plane is sent to a calculation program in real time, and the included angle and the distance between the tool coordinate system O tXtYtZt and the surface of the cooperative target are calculated through a specific algorithm;
an included angle adjusting step, namely adjusting the gesture of the robot through an included angle between the coordinate system and the surface of the cooperative target, so that the tool coordinate system O tXtYtZt is perpendicular to the surface of the cooperative target;
And recording the coordinates (X 1,Y1,Z1,A1,B1,C1) of the current tool coordinate system O tXtYtZt under the robot root coordinate system and the vertical distance H between the tool coordinate system and the surface of the cooperative target after the posture of the robot is adjusted.
The step of establishing the initial workpiece coordinate system comprises the steps of utilizing cooperative target plane normal measuring equipment to establish the cooperative target initial workpiece coordinate system, wherein the step of establishing the initial workpiece coordinate system specifically comprises the following steps:
A reading step of reading the coordinates (X 1,Y1,Z1,A1,B1,C1) and the vertical distance H in the recording step;
The conversion step is to obtain the coordinate (X 2,Y2,Z2) of the initial coordinate system of the cooperative target under the robot root coordinate system according to the coordinate transformation, wherein the robot root coordinate system is fixed at the center of the robot base, namely the origin of the robot, and the function is the basic coordinate system of the internal coordinate transformation of the robot;
obtaining Euler angles, namely obtaining Euler angles of an initial coordinate system of the cooperative target by utilizing the mutual relation between the tool coordinate system and the surface of the cooperative target;
And establishing a cooperative target initial coordinate system, namely establishing a cooperative target initial workpiece coordinate system O b1Xb1Yb1Zb1 through the conversion step and the step of obtaining Euler angles (X 2,Y2,Z2,A2,B2,C2).
Adjusting the photographing posture and position of the vision sensor; the adjusting step specifically comprises the following steps:
The gesture adjusting step, namely adjusting the gesture angle of the robot to enable the optical axis of the visual sensor to be perpendicular to the surface of the cooperative target by C=0 and B=0 of a coordinate system O cXcYcZc of the visual sensor under an initial workpiece coordinate system O b1Xb1Yb1Zb1 of the cooperative target;
And the position adjusting step is to adjust the position of the visual sensor to a photographing fixed height after adjusting the posture of the visual sensor, so that the posture and the position of the visual sensor are in an allowable range, and the photographing definition can be ensured.
The photographing step is to photograph by using the visual sensor after the adjustment step and calculate the coordinate system of the workpiece on the surface of the cooperative target, and specifically comprises the following steps:
The reading step, photographing through a vision sensor to obtain XY coordinates of an origin of a workpiece coordinate system on the surface of a cooperative target under the vision sensor coordinate system, fixedly calculating Z coordinates of the origin under the vision sensor coordinate system by photographing height, and reading coordinates (X c,Yc,Zc,Ac,Bc,Cc) of the vision sensor coordinate system under a robot root coordinate system at the moment;
The conversion step comprises the steps of obtaining a coordinate (X 4,Y4,Z4) of an origin under a robot root coordinate system according to a robot coordinate conversion matrix, obtaining an included angle A 3 between a cooperative target surface workpiece coordinate system and a visual sensor coordinate system according to a connecting line of the origin and a visual sensor photographing object, and obtaining an Euler angle (A 4,B4,C4) of the cooperative target surface workpiece coordinate system under the robot root coordinate system according to a reverse Euler angle formula;
And establishing a cooperative target surface workpiece coordinate system (X 4,Y4,Z4,A4,B4,C4) according to the coordinates and Euler angles obtained in the conversion step.
The positioning step is to establish a coordinate system of the workpiece on the surface of the cooperative target according to the photographing result to complete the full-automatic positioning of the six-dimensional pose of the cooperative target, and specifically comprises the following steps:
A step of establishing a plane coordinate system, in which an image is obtained by photographing through a visual sensor, proper geometric elements are selected according to the image properties, and the plane coordinate system of the image under the visual sensor coordinate system is established;
And converting the root coordinate system, namely converting the planar coordinate system of the image under the coordinate system of the visual sensor into the root coordinate system of the robot through coordinate transformation to complete full-automatic positioning of the six-dimensional pose of the cooperative target, wherein the Z value is the photographing height of the camera, the angle B, C is the pose angle of the camera, and the A is the included angle between the coordinate system of the workpiece on the surface of the cooperative target and the coordinate system of the visual sensor.
The invention also provides a robot-based cooperative target six-dimensional pose full-automatic positioning system, which can be realized by executing the flow steps of the robot-based cooperative target six-dimensional pose full-automatic positioning method, namely, a person skilled in the art can understand the robot-based cooperative target six-dimensional pose full-automatic positioning method as a preferred implementation mode of the robot-based cooperative target six-dimensional pose full-automatic positioning system.
Example 2:
the embodiment provides a robot-based cooperative target six-dimensional pose full-automatic positioning system, which comprises:
the hand-eye coordinate relation establishing module establishes a robot hand-eye coordinate relation through switching of a tool coordinate system and a vision sensor coordinate system, and specifically comprises the following modules:
Setting up a coordinate system module, namely arranging 3 laser displacement sensors around the drilling robot tool, and setting up a robot tool coordinate system O tXtYtZt by using a robot 4-point method and a robot 2-point method, setting up a point tool below a vision sensor light source, ensuring that a center shaft of the point tool is coaxial with a center line of an optical axis of the vision sensor, and setting up a robot vision sensor coordinate system O cXcYcZc by using the 4-point method and the 2-point method;
And the switching module is used for switching the O tXtYtZt and the O cXcYcZc in the robot tool coordinate system to obtain the robot hand-eye coordinate relation.
The leveling module is used for measuring and adjusting the plane normal through the cooperative target plane normal measuring equipment, wherein the measuring and adjusting process is a full-automatic process, and the leveling module specifically comprises the following modules:
the motion module is used for executing the teaching track of the robot to move to the area near the target plane, wherein the teaching program does not require position and gesture accuracy;
the calculation module is used for sending the measured value of the cooperative target plane normal measurement device to a calculation program in real time, and calculating the included angle and the distance between the tool coordinate system O tXtYtZt and the surface of the cooperative target through a specific algorithm;
The included angle adjusting module is used for adjusting the gesture of the robot through the included angle between the coordinate system and the surface of the cooperative target, so that the tool coordinate system O tXtYtZt is perpendicular to the surface of the cooperative target;
And the recording module is used for recording the coordinates (X 1,Y1,Z1,A1,B1,C1) of the current tool coordinate system O tXtYtZt under the robot root coordinate system and the vertical distance H between the tool coordinate system and the surface of the cooperative target after the posture of the robot is adjusted.
The initial workpiece coordinate system establishing module establishes a cooperative target initial workpiece coordinate system by utilizing cooperative target plane normal measuring equipment, and specifically comprises the following modules:
The reading module is used for reading the coordinates (X 1,Y1,Z1,A1,B1,C1) and the vertical distance H in the recording module;
The conversion module is used for obtaining a coordinate (X 2,Y2,Z2) of the initial coordinate system of the cooperative target under the root coordinate system of the robot according to the coordinate transformation;
The Euler angle obtaining module is used for obtaining Euler angles of an initial coordinate system of the cooperative target by utilizing the mutual relation between the tool coordinate system and the surface of the cooperative target;
And establishing a cooperative target initial coordinate system module, namely establishing a cooperative target initial workpiece coordinate system O b1Xb1Yb1Zb1 through the conversion module and the (X 2,Y2,Z2,A2,B2,C2) obtained by the Euler angle obtaining module.
The adjusting module is used for adjusting the photographing posture and the photographing position of the visual sensor, and specifically comprises the following modules:
The gesture adjustment module is used for adjusting the gesture angle of the robot so that the C=0 and the B=0 of the visual sensor coordinate system O cXcYcZc under the initial workpiece coordinate system O b1Xb1Yb1Zb1 of the cooperative target and the optical axis of the visual sensor is vertical to the surface of the cooperative target;
And the position adjusting module is used for adjusting the position of the visual sensor to a photographing fixed height after adjusting the posture of the visual sensor, so that the posture and the position of the visual sensor are in an allowable range, and the photographing definition can be ensured.
The photographing module is used for photographing by using the vision sensor after the adjusting module and calculating a coordinate system of the workpiece on the surface of the cooperative target, and specifically comprises the following modules:
the reading module is used for photographing through the vision sensor to obtain XY coordinates of an origin of the workpiece coordinate system on the surface of the cooperative target under the vision sensor coordinate system, and fixedly calculating Z coordinates of the origin under the vision sensor coordinate system by photographing height, and reading coordinates (X c,Yc,Zc,Ac,Bc,Cc) of the vision sensor coordinate system under the robot root coordinate system at the moment;
The conversion module is used for obtaining a coordinate (X 4,Y4,Z4) of the origin under the robot root coordinate system according to the robot coordinate conversion matrix, obtaining an included angle A 3 between the coordinate system of the workpiece on the surface of the cooperative target and the coordinate system of the vision sensor according to the connecting line of the origin and the photographed object of the vision sensor, and obtaining an Euler angle (A 4,B4,C4) of the coordinate system of the workpiece on the surface of the cooperative target under the robot root coordinate system according to a reverse Euler angle formula;
And establishing a cooperative target surface workpiece coordinate system module, namely establishing a cooperative target surface workpiece coordinate system (X 4,Y4,Z4,A4,B4,C4) according to the coordinates and Euler angles obtained by the conversion module.
The positioning module is used for establishing a coordinate system of the workpiece on the surface of the cooperative target according to the photographing result to complete full-automatic positioning of the six-dimensional pose of the cooperative target, and specifically comprises the following modules:
the plane coordinate system establishing module is used for acquiring an image through photographing of the visual sensor, selecting proper geometric elements according to the image property, and establishing a plane coordinate system of the image under the coordinate system of the visual sensor;
the root coordinate system conversion module converts an image into a robot root coordinate system under a plane coordinate system under a visual sensor coordinate system through coordinate transformation, and completes full-automatic positioning of six-dimensional pose of a cooperative target, wherein a Z value is a photographing height of a camera, a B, C angle is a pose angle of the camera, and A is an included angle between a workpiece coordinate system on the surface of the cooperative target and the visual sensor coordinate system.
Example 3:
the present embodiment will be understood by those skilled in the art as more specific descriptions of embodiment 1 and embodiment 2.
The embodiment provides a robot vision posture adjustment method based on normal leveling, and belongs to the technical field of industrial robot calibration. The entire hole making robotic workstation system is shown in fig. 2. The method comprises the steps of firstly calibrating a tool coordinate system O tXtYtZt of a robot hole making executor and a visual sensor coordinate system O cXcYcZc, then measuring the relation between 2 angles B, C and a distance H between the surface of a cooperative target and the tool coordinate system O tXtYtZt by using 3 laser displacement sensors, establishing an initial workpiece coordinate system O b1Xb1Yb1Zb1, converting the robot into a visual photographing teaching posture, respectively adjusting C and B of the visual sensor coordinate system O cXcYcZc under the initial workpiece coordinate system O b1Xb1Yb1Zb1 to be zero, adjusting Z values to be fixed values, enabling an optical axis of the visual sensor to be parallel to a normal line of a processing surface, photographing 2 mark points of the surface of the cooperative target, carrying out coordinate transformation according to a photographing result, and establishing a workpiece coordinate system O b2Xb2Yb2Zb2 comprising hole position data information for guiding a drill bit to carry out hole making processing.
Step one, establishing a hand-eye coordinate relation of the hole making robot.
The method comprises the steps of arranging 3 laser displacement sensors around a drilling robot tool, calibrating a drilling robot tool coordinate system O tXtYtZt by using a robot 4-point method and a robot 2-point method, installing a sharp point tool below a visual sensor light source, ensuring that a central shaft of the sharp point tool is coaxial with the central line of an optical axis of the visual sensor, establishing a drilling robot visual sensor coordinate system O cXcYcZc by using the 4-point method and the 2-point method, and obtaining a robot hand-eye coordinate relation by switching O tXtYtZt and O cXcYcZc in the robot tool coordinate system. An example is shown in fig. 3.
And step two, executing a laser normal leveling program by the hole making robot.
The drilling robot executes a laser normal leveling teaching program, moves to a region to be processed, obtains an included angle B, C and a distance H between a tool coordinate system O tXtYtZt and the surface of a cooperative target through the distance relation between three laser displacement sensors and the surface of the cooperative target, enables the tool coordinate system O tXtYtZt to be perpendicular to the surface of the cooperative target through gesture adjustment, allows the tolerance to be 0.5 degrees, records the coordinate (X 1,Y1,Z1,A1,B1,C1) of a current tool coordinate system O tXtYtZt under a robot root coordinate system and the perpendicular distance H between the tool coordinate system and the surface of the cooperative target, and returns to a Home point after normal leveling. The normal leveling flow is shown in fig. 1.
And thirdly, establishing an initial workpiece coordinate system O b1Xb1Yb1Zb1 of the cooperative target surface.
Reading the coordinate (X 1,Y1,Z1,A1,B1,C1) of the tool coordinate system O tXtYtZt with the laser normal line leveled under the robot root coordinate and the displacement H of the laser ranging, and obtaining the coordinate system (X 2,Y2,Z2) of the initial workpiece coordinate system of the cooperative target surface under the robot root coordinate system according to the coordinate transformation
Based on the tool coordinate system being parallel to the cooperative target surface, the Euler angle A 2=A1;B2=B1;C2=C1 of the initial workpiece coordinate system of the tool surface is obtained, and the initial workpiece coordinate system O b1Xb1Yb1Zb1 can be established by using the coordinates (X2, Y2, Z2, A2, B2 and C2).
And step four, the robot executes a vision sensor photographing posture adjustment subroutine.
The robot runs from a Home point to a photographing initial position of the robot, a workpiece coordinate system of the robot is switched to an initial workpiece coordinate system O b1Xb1Yb1Zb1, a tool coordinate system is switched to a vision sensor coordinate system O cXcYcZc, and angles C and B are sequentially adjusted, so that the angles C=0 and B=0 of the vision sensor coordinate system O cXcYcZc in the initial workpiece coordinate system O b1Xb1Yb1Zb1 are adjusted, then Z values are adjusted, the position of the vision sensor is adjusted to a photographing fixed height, the optical axis of the vision sensor is ensured to be perpendicular to the surface of a cooperative target, the height is ensured to be fixed, and photographing clarity is ensured.
Shooting by a vision sensor, and calculating a coordinate system of the workpiece on the surface of the cooperative target;
And (3) invoking a vision sensor photographing program, wherein a vision sensor photographing object is 2 marking points, the coordinate system of the workpiece on the surface of the cooperative target takes the marking point 1 as an origin, and the connecting line of the marking points 2 and 1 is in the Y-axis direction. The XY coordinates (X 3,Y3) of the mark point 1 under the coordinate system of the visual sensor are obtained through photographing of the visual sensor, the Z coordinate Z3 of the mark point 1 under the coordinate system of the visual sensor can be calculated due to the fact that photographing height is fixed, the coordinates (X c,Yc,Zc,Ac,Bc,Cc) of the coordinate system of the visual sensor under the root coordinate system of the robot at the moment are read, and the coordinates (X 4,Y4,Z4) of the mark point 1 under the root coordinate system of the robot can be obtained according to the coordinate conversion matrix of the robot.
And obtaining an included angle A 3 between the coordinate system of the workpiece on the surface of the cooperative target and the coordinate system of the visual sensor according to the connecting line of the marking points. And obtaining Euler angles (A 4,B4,C4) of the cooperative target surface workpiece coordinate system under the robot root coordinate system according to the reverse Euler angle formula.
T=T1*T2
A4=a tan 2(T(2,1),T(1,1))
B4=atan2(-T(3,1),k)
C4=a tan2(T(3,2),T(3,3))
A cooperative target surface workpiece coordinate system (X 4,Y4,Z4,A4,B4,C4) may thus be established.
And step six, executing a hole making program by the robot.
The robot runs to the drilling teaching position, firstly performs normal leveling, then switches the workpiece coordinate system to a cooperative target surface workpiece coordinate system (X 4,Y4,Z4,A4,B4,C4), reads corresponding position coordinates in the database, and the tool coordinate system moves to the corresponding coordinates.
The embodiment also provides a robot-based cooperative target six-dimensional pose full-automatic positioning system, which can be realized by executing the flow steps of the robot-based cooperative target six-dimensional pose full-automatic positioning method, namely, a person skilled in the art can understand the robot-based cooperative target six-dimensional pose full-automatic positioning method as a preferred implementation mode of the XX system.
A robot-based cooperative target six-dimensional pose full-automatic positioning system comprises:
The system comprises a tool coordinate system, a vision sensor coordinate system, a robot hand-eye coordinate system establishing module, a leveling module, an initial workpiece coordinate system establishing module, a vision sensor shooting attitude and position adjusting module, a hand-eye coordinate system establishing module, a vision sensor shooting attitude and position adjusting module and a vision sensor shooting attitude and position adjusting module, wherein the tool coordinate system and the vision sensor coordinate system are switched;
The positioning module establishes the coordinate system of the work piece on the surface of the cooperative target according to the photographing result to complete the full-automatic positioning of the six-dimensional pose of the cooperative target.
The hand-eye coordinate relation establishing module comprises a coordinate system establishing module, a switching module and a robot hand-eye coordinate relation obtaining module, wherein the coordinate system establishing module is used for arranging 3 laser displacement sensors around a drilling robot tool, establishing a robot tool coordinate system O tXtYtZt by using a robot 4-point method and a robot 2-point method, installing a point tool below a vision sensor light source, ensuring that a center shaft of the point tool is coaxial with a center line of an optical axis of the vision sensor, establishing a robot vision sensor coordinate system O cXcYcZc by using the 4-point method and the 2-point method, and switching the O tXtYtZt and the O cXcYcZc in the robot tool coordinate system to obtain the robot hand-eye coordinate relation.
The leveling module comprises a motion module, a calculation module, an included angle adjusting module and a recording module, wherein the motion module executes teaching track motion of a robot to an area near a target plane, the teaching program does not require position and posture accuracy, the calculation module sends measured values of normal measurement equipment of the target plane to the calculation program in real time, an included angle and a distance between a tool coordinate system O tXtYtZt and the surface of the target are calculated through a specific algorithm, the robot posture is adjusted through the included angle between the coordinate system and the surface of the target, the tool coordinate system O tXtYtZt is perpendicular to the surface of the target, and the recording module records coordinates (X 1,Y1,Z1,A1,B1,C1) of the current tool coordinate system O tXtYtZt under a root coordinate system of the robot and a perpendicular distance H between the tool coordinate system and the surface of the target after the robot posture is adjusted.
The initial workpiece coordinate system establishing module comprises a reading module, a conversion module, an Euler angle obtaining module and a cooperative target initial coordinate system establishing module, wherein the reading module is used for reading coordinates (X 1,Y1,Z1,A1,B1,C1) and vertical distance H in the recording module, the conversion module is used for obtaining the coordinates (X 2,Y2,Z2) of the cooperative target initial coordinate system under a robot root coordinate system according to coordinate transformation, the Euler angle obtaining module is used for obtaining Euler angles of the cooperative target initial coordinate system by means of the mutual relation between a tool coordinate system and a cooperative target surface, and the cooperative target initial coordinate system establishing module is used for establishing a cooperative target initial workpiece coordinate system O b1Xb1Yb1Zb1 through the conversion module and the Euler angle obtaining module.
The adjusting module comprises an attitude adjusting module, a position adjusting module, a shooting fixing module and a shooting adjusting module, wherein the attitude adjusting module is used for adjusting the attitude angle of the robot so that the C=0 and the B=0 of the visual sensor coordinate system O cXcYcZc under the initial workpiece coordinate system O b1Xb1Yb1Zb1 of the cooperative target and enabling the optical axis of the visual sensor to be perpendicular to the surface of the cooperative target;
The positioning module comprises a plane coordinate system establishing module, a positioning module and a positioning module, wherein the plane coordinate system establishing module is used for acquiring an image by photographing through a visual sensor, selecting proper geometric elements according to the image property and establishing a plane coordinate system of the image under the visual sensor coordinate system;
The photographing module comprises a reading module, a conversion module, a coordinate system establishing module and a cooperative target surface workpiece coordinate system establishing module, wherein the reading module is used for photographing through a vision sensor to obtain an XY coordinate of an origin of a cooperative target surface workpiece coordinate system under the vision sensor coordinate system, the Z coordinate of the origin under the vision sensor coordinate system is fixedly calculated according to photographing height, the coordinate (X c,Yc,Zc,Ac,Bc,Cc) of the vision sensor coordinate system under a robot root coordinate system at the moment is read, the conversion module is used for obtaining the coordinate (X 4,Y4,Z4) of the origin under the robot root coordinate system according to a robot coordinate conversion matrix, obtaining an included angle A 3 between the cooperative target surface workpiece coordinate system and the vision sensor coordinate system according to a connecting line of the origin and the vision sensor photographing object, obtaining an Euler angle (A 4,B4,C4) of the cooperative target surface workpiece coordinate system under the robot root coordinate system according to a reverse Euler angle formula, and establishing the cooperative target surface workpiece coordinate system (X 4,Y4,Z4,A4,B4,C4) according to the coordinate and the Euler angle obtained by the conversion module;
The positioning module comprises a root coordinate system conversion module, wherein an image is converted into a robot root coordinate system under a plane coordinate system under a vision sensor coordinate system through coordinate transformation, and full-automatic positioning of six-dimensional pose of a cooperative target is completed, wherein a Z value is the photographing height of a camera, a B, C angle is the pose angle of the camera, and A is the included angle between the coordinate system of a workpiece on the surface of the cooperative target and the vision sensor coordinate system.
Those skilled in the art will appreciate that the invention provides a system and its individual devices, modules, units, etc. that can be implemented entirely by logic programming of method steps, in addition to being implemented as pure computer readable program code, in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Therefore, the system and the devices, modules and units thereof provided by the invention can be regarded as a hardware component, and the devices, modules and units for realizing various functions included in the system can be regarded as structures in the hardware component, and the devices, modules and units for realizing various functions can be regarded as structures in the hardware component as well as software modules for realizing the method.
The foregoing describes specific embodiments of the present application. It is to be understood that the application is not limited to the particular embodiments described above, and that various changes or modifications may be made by those skilled in the art within the scope of the appended claims without affecting the spirit of the application. The embodiments of the application and the features of the embodiments may be combined with each other arbitrarily without conflict.