Background
With the transition from analog quantity transmission mode of 'mould line-sample plate' to digital quantity transmission mode in the aviation manufacturing industry, the measurement of the appearance of product parts is also developed from straight ruler, feeler gauge, clamping plate, etc. to digital measurement method mainly based on laser scanning and structured light measurement. The digital measurement method brings high-precision measurement results and measurement data which are easy to store, but also has the problems of heavy equipment volume, low handheld stability and difficulty in guaranteeing the measurement attitude, and the adoption of the mechanical arm to carry the measurement equipment for automatic measurement is a reasonable solution.
A key problem of adopting a mechanical arm to carry digital measuring equipment for automatic measurement is how to plan a measuring path of a robot. At present, a robot measuring path planning method mainly comprises two methods of artificial teaching programming and measuring path planning based on a three-dimensional model. The method adopting teaching programming not only has long teaching time and large labor intensity, but also is difficult to ensure the relative pose relationship between the measuring equipment and the measured object. The method for planning the measurement path based on the three-dimensional model can well solve the problem of teaching programming, but the operation is complex, the software development difficulty is high, and the existing robot off-line programming software such as Robotstatsidio, Roboguguie, KUKASim, RobotMaster and the like does not realize the robot path planning function aiming at automatic measurement. Therefore, it is necessary to design a simple and reliable path planning method for the problem of automatic measurement path planning of the robot.
Disclosure of Invention
The invention aims to solve the problems in the prior art and provides a mechanical arm measuring path planning method based on laser guidance, which is convenient to use and simple to operate.
In order to achieve the above object, the technical solution of the present invention is as follows:
a measuring path planning method based on laser guidance is characterized by comprising the following steps:
step 1, projecting a laser pattern to a position to be measured by adopting a laser projection device, wherein the geometric center of the projected pattern is superposed with the central point of the position to be measured;
step 2, after the projected position pattern is stable, controlling a double-camera system to shoot the laser pattern, and transmitting the shot image to a controller for processing;
step 3, establishing an image coordinate system
Solving the center point of the image
In a dual camera system coordinate system
Coordinates of lower
And image coordinate system
To dual camera system coordinate system
Position and attitude transformation matrix of
;
Step 4, solving the pose transfer relation between the mechanical arm tail end coordinate system and the base coordinate system through the transformation matrix among the image coordinate system, the dual-camera system coordinate system, the mechanical arm base coordinate system and the mechanical arm tail end coordinate system as follows:
wherein,
a pose transformation matrix between the camera and the mechanical arm base coordinate system;
a pose transformation matrix between the image coordinate system and the coordinate system of the double camera system;
for the end of a robot armA pose transformation matrix between the coordinate system and the image coordinate system;
and 5: according to the pose transformation matrix between the mechanical arm tool coordinate system and the base coordinate system
And calculating the rotation angle of each joint by using the structural parameters of the mechanical arm
;
Step 6: sending a joint movement instruction to the mechanical arm through the controller, driving each joint of the mechanical arm to reach an appointed angle position, and simultaneously checking whether the mechanical arm has a singular pose in the movement process;
and 7: and (6) repeating thesteps 1 to 6 until the mechanical arm finishes all teaching tasks.
Furthermore, the projected laser pattern is a cross line laser, and two intersecting lines of the cross line laser projected on the surface of the object to be detected have the characteristic of length which is easy to distinguish.
Further, the image center point
Three-dimensional coordinates in a coordinate system of a dual camera system
Measured by the binocular stereo vision principle.
Further, a pose transformation matrix
According to the image coordinate system
In a dual camera system coordinate system
The following poses are described:
note the book
XYZ axes in a dual camera system coordinate system
The lower unit direction vectors are respectively
Then, then
To a coordinate system
The pose transformation matrix of (a) is expressed as:
;
wherein,
is the image center point
In the normal direction of the axis of the mirror,
in the direction of the long axis of the cross laser
And
the cross product of (a) and (b),
in the direction of
And
the cross product of (a) and (b),
is the three-dimensional coordinate of the origin of the image coordinate system in the coordinate system of the dual camera system.
Further, a pose transformation matrix between the dual camera system and the robot arm base coordinate system
Obtained by hand-eye calibration of the mechanical arm.
Further, a pose transformation matrix between the robot tool coordinate system and the image coordinate system
According to the measurement distance setting of the carried measurement equipment, the direction of a coordinate system at the tail end of the mechanical arm is consistent with the direction of an image coordinate system, and the distance between the origins of the coordinate systems is
dThen will be
The description is as follows:
wherein,dthe distance is measured optimally by the measuring device.
In summary, the invention has the following advantages:
1. the track planning method provided by the invention is convenient to operate, simple in calculation process, small in calculation amount and convenient to modify, and can shorten the planning time of the measurement viewpoint and improve the working efficiency;
2. the invention adopts the laser-guided measuring path planning method, which can reduce the workload of teaching programming and reduce the working intensity of operators;
3. the invention can ensure the reasonability of the measuring pose and ensure the measuring precision by visually calculating and adjusting the pose between the measuring equipment and the measured object.
Drawings
FIG. 1 is a flow chart of a method of the present invention;
FIG. 2 is a schematic illustration of an embodiment of the present invention;
FIG. 3 is a schematic diagram of the relative position of the measuring device and the projected image;
fig. 4 is a conversion relationship between coordinate systems.
In the figure, the position of the upper end of the main shaft,
1. the device comprises a mechanical arm, 2, a controller, 3, a double-camera system, 4, a laser projection device, 5, a part to be measured, 6, cross line laser, 7 and measuring equipment.
Detailed Description
In order to more clearly illustrate the invention, the invention is further described below with reference to preferred embodiments and the accompanying drawings. It is to be understood by persons skilled in the art that the following detailed description is illustrative and not restrictive, and is not to be taken as limiting the scope of the invention.
The terms "first," "second," and the like in the description and claims of the present invention and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or may alternatively include other gas steps or elements inherent to such process, method, or apparatus.
Example 1
The invention provides a measuring path planning method based on laser guidance as shown in figure 1, which comprises the following steps:
step 1: as shown in fig. 2, a dual-camera system 3 and amechanical arm 1 are erected near the object to be measured, themechanical arm 1, the dual-camera measuring system 3 and thecontroller 2 are connected and started, and simultaneously, alaser projector 4 is turned on and projects a laser pattern to apart 5 to be measured. The projected laser pattern iscross line laser 6, the two straight lines are vertically intersected, and after the two straight lines are projected on the surface of the object to be measured, the two intersected lines have the characteristic of length which is easy to distinguish.
Step 2: the double-camera system 3 monitors the projection pattern in real time, and after the image is detected to be stable, thecontroller 2 controls the double-camera system 3 to shoot the laser pattern and transmits the shot image to thecontroller 2 for processing.
And step 3: establishing an image coordinate system
Solving the origin of the image coordinate system by using the imaging principle of binocular stereo vision
In a dual camera system coordinate system
Coordinates of lower
And image coordinate system
To dual camera system coordinate system
Position and attitude transformation matrix of
. Wherein the origin of the image coordinate system
As the center point of the image
And is also the cross center of the
cross laser 6.
Pose transformation matrix
According to the image coordinate system
In a dual camera system coordinate system
And (5) describing the pose. The specific method comprises the following steps:
note the book
XYZ axes in a dual camera system coordinate system
The lower unit direction vectors are respectively
Then, then
To a coordinate system
The pose transformation matrix of (a) is expressed as:
;
wherein,
is the image center point
In the normal direction of the axis of the mirror,
in the direction of the long axis of the cross laser
And
the cross product of (a) and (b),
in the direction of
And
the cross product of (a) and (b),
is the three-dimensional coordinate of the origin of the image coordinate system in the coordinate system of the dual camera system.
And 4, step 4: as shown in fig. 4, the pose transfer relationship between the robot tool coordinate system and the base coordinate system is solved by the transformation matrix among the image coordinate system, the dual-camera system coordinate system, the robot arm base coordinate system and the robot arm end coordinate system as follows:
wherein,
the pose transformation matrix between the camera and the base coordinate system of the mechanical arm is obtained by the hand-eye calibration of the mechanical arm, and the hand-eye calibration is a technique well known by the technical personnel in the field;
solving a pose transformation matrix between the image coordinate system and the coordinate system of the double-camera system according to the method in the
step 3;
for end-of-arm tool seatsAnd a pose transformation matrix between the coordinate system and the image coordinate system is set according to the optimal measurement distance of the
measurement equipment 7 carried on the mechanical arm. As shown in fig. 3, the specific method is: if the direction of the coordinate system at the tail end of the mechanical arm is consistent with the direction of the image coordinate system, the distance of the origin of the coordinate system in the Z direction is
d(
dIs the optimum measurement distance of the measuring device), then
Expressed as:
and 5: according to a pose transformation matrix between a tool coordinate system at the tail end of the mechanical arm and a base coordinate system
And calculating the rotation angle of each joint according to the structural parameters of the mechanical arm
。
Step 6: a joint motion instruction is sent to themechanical arm 1 through thecontroller 2, each joint of the mechanical arm is driven to reach an appointed angle position, and whether the mechanical arm has a singular pose in the motion process is checked.
And 7: and (6) repeating thesteps 1 to 6 until the mechanical arm finishes all teaching tasks.
While the present invention has been described in detail with reference to the illustrated embodiments, it should not be construed as limited to the scope of the present patent. Various modifications and changes may be made by those skilled in the art without inventive step within the scope of the appended claims.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the present invention in any way, and all simple modifications and equivalent variations of the above embodiments according to the technical spirit of the present invention are included in the scope of the present invention.