CN113194262B - Flying shooting triggering method and device for workpiece quality inspection - Google Patents

Flying shooting triggering method and device for workpiece quality inspection Download PDF

Info

Publication number
CN113194262B
CN113194262B CN202110740067.9A CN202110740067A CN113194262B CN 113194262 B CN113194262 B CN 113194262B CN 202110740067 A CN202110740067 A CN 202110740067A CN 113194262 B CN113194262 B CN 113194262B
Authority
CN
China
Prior art keywords
component
pose
difference value
interpolation
actual
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202110740067.9A
Other languages
Chinese (zh)
Other versions
CN113194262A (en
Inventor
王闯
潘正颐
侯大为
顾徐波
马元巍
郭峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changzhou Weiyizhi Technology Co Ltd
Original Assignee
Changzhou Weiyizhi Technology Co Ltd
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 Changzhou Weiyizhi Technology Co Ltd filed Critical Changzhou Weiyizhi Technology Co Ltd
Priority to CN202110740067.9A priority Critical patent/CN113194262B/en
Publication of CN113194262A publication Critical patent/CN113194262A/en
Application granted granted Critical
Publication of CN113194262B publication Critical patent/CN113194262B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/695Control of camera direction for changing a field of view, e.g. pan, tilt or based on tracking of objects
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course or altitude of land, water, air, or space vehicles, e.g. automatic pilot
    • G05D1/08Control of attitude, i.e. control of roll, pitch, or yaw
    • G05D1/0808Control of attitude, i.e. control of roll, pitch, or yaw specially adapted for aircraft

Abstract

The invention relates to the technical field of industrial quality inspection, and provides a method and a device for triggering flying shooting and shooting of workpiece quality inspection, aiming at solving the technical problem of improving the quality of images obtained by flying shooting and improving the workpiece quality inspection effect, wherein the method comprises the following steps: s1, starting the flying shooting system, and controlling the six-axis mechanical arm in the flying shooting system to move so as to drive the camera at the tail end of the six-axis mechanical arm to execute flying shooting work; s2, acquiring the actual pose of the tail end of the six-axis mechanical arm at a preset frequency; s3, calculating a first pose difference value between the actual pose acquired at the current moment and each target pose, wherein the first pose difference value is obtained by calculation according to an X component difference value, a Y component difference value, a Z component difference value, an R component difference value, a P component difference value and a Y component difference value of the actual pose acquired at the current moment and the target pose after weighting; s4, judging whether the first posture difference value is smaller than a preset threshold value; and S5, if the image exists, triggering the camera to shoot the image.

Description

Flying shooting triggering method and device for workpiece quality inspection
Technical Field
The invention relates to the technical field of industrial quality inspection, in particular to a flying shooting triggering method for workpiece quality inspection, a flying shooting triggering device for workpiece quality inspection, computer equipment and a non-transitory computer readable storage medium.
Background
When the quality of the workpiece is detected, the workpiece to be detected needs to be subjected to multi-angle image taking to detect the surface defects of the workpiece.
In order to improve the efficiency of multi-angle image taking, a fly-shooting scheme is provided in the related technology, an industrial camera is fixed at the tail end of a mechanical arm, the tail end of the mechanical arm is controlled to move along a preset fly-shooting path, and a rotation angle is adjusted, so that the pose of the tail end of the mechanical arm is adjusted, namely the position and the posture of the industrial camera are adjusted, when the pose of the tail end of the mechanical arm reaches a target pose, the industrial camera is triggered to shoot an image, and the obtained image is a target image which accords with a target shooting position and a target shooting angle.
When the flying shooting scheme is used for carrying out multi-angle image taking on each workpiece, the tail end of the mechanical arm needs to be positioned at a plurality of target poses in the moving process, however, the matching of the completely accurate real-time poses and the target poses is difficult to realize due to the influence of real-time pose data transmission frequency, time delay and the like, and if the actual difference between the poses of the tail end of the mechanical arm and the target poses is large when the industrial camera shoots, the difference between the shot images and the target images is also large, so that the quality inspection effect of the workpieces is influenced.
Disclosure of Invention
The invention aims to solve the technical problems and provides a flying shooting triggering method and a flying shooting triggering device for workpiece quality inspection, which can reasonably compare and match the actual pose and the target pose of the tail end of a six-axis mechanical arm, thereby effectively reducing the difference between the pose and the target pose of the tail end of the six-axis mechanical arm during camera shooting, improving the quality of shot images and improving the workpiece quality inspection effect.
The technical scheme adopted by the invention is as follows:
a flying shooting triggering method for workpiece quality inspection comprises the following steps: s1, starting a flying shooting system, and controlling six mechanical arms in the flying shooting system to move so as to drive cameras at the tail ends of the six mechanical arms to execute flying shooting work; s2, acquiring the actual pose of the tail end of the six-axis mechanical arm at a preset frequency; s3, calculating a first pose difference value between an actual pose acquired at the current moment and each target pose, wherein the actual pose acquired at the current moment and the target pose comprise an X component, a Y component, a Z component, an Euler angle R component, a P component and a Y component of a rectangular spatial coordinate system, and the first pose difference value is calculated according to the X component difference value, the Y component difference value, the Z component difference value, the R component difference value, the P component difference value and the Y component difference value of the actual pose acquired at the current moment and the target pose after weighting; s4, judging whether the first posture difference value is smaller than a preset threshold value; and S5, if the first posture difference value is smaller than the preset threshold value, triggering the camera to shoot an image.
The flying shooting triggering method for workpiece quality inspection further comprises the following steps: s6, interpolating at least one interpolated pose between the actual pose acquired at the current time and the actual pose acquired at the previous time; s7, calculating second pose difference values between each interpolation pose and each target pose, wherein the interpolation poses and the target poses respectively comprise X components, Y components, Z components, Euler angle R components, P components and Y components of a space rectangular coordinate system, and the second pose difference values are calculated according to the weighted X component difference values, Y component difference values, Z component difference values, R component difference values, P component difference values and Y component difference values of the interpolation poses and the target poses; s8, judging whether the second posture difference value is smaller than the preset threshold value; and S9, if the second posture difference value is smaller than the preset threshold value, triggering the camera to shoot an image.
Calculating the first attitude difference value according to the following formula:
Figure DEST_PATH_IMAGE002
wherein the content of the first and second substances,D 1is the value of the difference of the first posture,ithe representation X, Y, Z is shown as being,jthe representation R, P, y is shown as being,α i is composed ofiThe weight to which the component corresponds is,α j is composed ofjThe weight to which the component corresponds is,T i for the pose of the objectiThe components of the first and second images are,T j for the pose of the objectjThe components of the first and second images are,I i for the actual pose obtained at the current momentiThe components of the first and second images are,I j for the actual pose obtained at the current momentjThe component, mod, is the remainder function,
Figure 100002_DEST_PATH_IMAGE004
to representT j AndI j taking the remainder of the absolute value of the difference to 180;
calculating the second posture difference value according to the following formula:
Figure 100002_DEST_PATH_IMAGE006
wherein the content of the first and second substances,D 2is the difference value of the second posture,P i for interpolation poseiThe components of the first and second images are,P j for interpolation posejThe components of the first and second images are,
Figure 100002_DEST_PATH_IMAGE008
to representT j AndP j the absolute value of the difference is the remainder of 180.
Step S6 includes: determining at least one interpolation time, wherein the interpolation time is between the last time and the current time; and determining the X component, the Y component and the Z component of the interpolation pose according to the interpolation time, the X component, the Y component and the Z component of the actual pose acquired at the last time and the X component, the Y component and the Z component of the actual pose acquired at the current time, and taking the R component, the P component and the Y component of the actual pose acquired at the last time or the current time as the R component, the P component and the Y component of the interpolation time.
Steps S3 through S5 are performed in a first thread, and steps S6 through S9 are performed in a second thread.
A trigger device is taken photograph to fly to shoot for work piece quality testing includes: the control module is used for starting the flying shooting system and controlling the six-axis mechanical arm in the flying shooting system to move so as to drive the camera at the tail end of the six-axis mechanical arm to execute flying shooting work; the acquisition module is used for acquiring the actual pose of the tail end of the six-axis mechanical arm at a preset frequency; the first calculation module is used for calculating a first pose difference value between an actual pose acquired at the current moment and each target pose, wherein the actual pose acquired at the current moment and the target pose comprise an X component, a Y component, a Z component, an Euler angle R component, a P component and a Y component of a rectangular spatial coordinate system, and the first pose difference value is calculated according to the X component difference value, the Y component difference value, the Z component difference value, the R component difference value, the P component difference value and the Y component difference value of the actual pose acquired at the current moment and the target pose after weighting; the first judgment module is used for judging whether the first posture difference value is smaller than a preset threshold value; the first triggering module is used for triggering the camera to shoot images when the first judging module judges that the first posture difference value is smaller than the preset threshold value.
The flying shooting trigger device for workpiece quality inspection further comprises: the interpolation module is used for interpolating at least one interpolation pose between the actual pose acquired at the current moment and the actual pose acquired at the previous moment; the second calculation module is configured to calculate a second pose difference value between each interpolation pose and each target pose, where the interpolation poses and the target poses both include an X component, a Y component, a Z component, an euler angle R component, a P component, and a Y component of a spatial rectangular coordinate system, and the second pose difference value is calculated according to a weighted X component difference value, Y component difference value, Z component difference value, R component difference value, P component difference value, and Y component difference value between the interpolation poses and the target poses; the second judgment module is used for judging whether the second position and posture difference value is smaller than the preset threshold value or not; and the second triggering module is used for triggering the camera to shoot the image when the second judging module judges that the second position and posture difference value is smaller than the preset threshold value.
A computer device comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the computer program to realize the flying shooting triggering method for workpiece quality inspection.
A non-transitory computer-readable storage medium having stored thereon a computer program that, when executed by a processor, implements the above-described flying-shoot triggering method for workpiece quality inspection.
The invention has the beneficial effects that:
(1) according to the invention, the difference between the actual pose and the target pose is calculated on the XYZ component and the RPy component in a weighting manner, so that the actual pose and the target pose of the tail end of the six-axis mechanical arm can be more reasonably compared and matched, the difference between the pose and the target pose of the tail end of the six-axis mechanical arm during shooting by a camera can be effectively reduced, the quality of a shot image is improved, and the quality inspection effect of a workpiece is improved;
(2) by interpolating the acquired actual pose of the tail end of the six-axis mechanical arm, the high-frequency pose updating can be realized under the condition that the working frequency of the mechanical arm controller is low, so that the required image can be successfully shot when the tail end of the six-axis mechanical arm moves at a high speed, and the workpiece quality inspection effect is further improved;
(3) the double-thread execution is facilitated, the flying shooting efficiency can be improved, and therefore the workpiece quality inspection efficiency is improved.
Drawings
FIG. 1 is a flowchart of a method for triggering a flying shot for workpiece quality inspection according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for triggering a flying shot for workpiece quality inspection according to an embodiment of the present invention;
fig. 3 is a block diagram illustrating a trigger device for a flying shot shooting for quality inspection of a workpiece according to an embodiment of the present invention;
fig. 4 is a block diagram of a trigger device for aerial photography for workpiece quality inspection according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, a method for triggering flying photography for workpiece quality inspection according to an embodiment of the present invention includes the following steps:
and S1, starting the flying shooting system, and controlling the six-axis mechanical arm in the flying shooting system to move so as to drive the camera at the tail end of the six-axis mechanical arm to execute flying shooting work.
The flying shooting system provided by the embodiment of the invention comprises six-axis mechanical arms, a mechanical arm controller and a camera arranged at the tail ends of the six-axis mechanical arms. The flying shooting system can be arranged on a quality inspection line of a workpiece, after the workpiece reaches a shooting position, the flying shooting system starts to work, and the tail end of the six-axis mechanical arm carries the camera to move along a preset moving path and a preset rotation angle.
And S2, acquiring the actual pose of the tail end of the six-axis mechanical arm at a preset frequency.
In the embodiment of the invention, the actual pose of the tail end of the six-axis mechanical arm can be obtained by the mechanical arm controller, the mechanical arm controller has a certain working frequency, and the preset frequency is the working frequency of the selected mechanical arm controller. For example, when the preset frequency is 50Hz, the actual pose of the end of the six-axis mechanical arm is acquired every 0.02 seconds.
And S3, calculating a first pose difference value between the actual pose acquired at the current moment and each target pose, wherein the actual pose and the target pose acquired at the current moment comprise an X component, a Y component, a Z component, an Euler angle R component, a P component and a Y component of a rectangular spatial coordinate system, and the first pose difference value is calculated according to the X component difference value, the Y component difference value, the Z component difference value, the R component difference value, the P component difference value and the Y component difference value of the actual pose and the target pose acquired at the current moment after weighting.
It should be understood that, for each workpiece, if only one image is taken for quality inspection, the target pose is one, and if multi-angle images are taken for quality inspection, the target pose is multiple.
As the tail end of the six-axis mechanical arm carries the camera to move and rotate, the position and the Euler angle of the six-axis mechanical arm in the space rectangular coordinate system can be changed, and the pose in the embodiment of the invention comprises an X component, a Y component, a Z component, an R component, a P component and a Y component of the space rectangular coordinate system. In general, fluctuations of the X, Y, and Z components of the tip of the six-axis robot arm cause image shifts without affecting sharpness, contour, and brightness, while fluctuations of the R, P, and Y components cause changes in sharpness, contour, and brightness of the image. In one embodiment of the invention, the difference value of the actual pose and the target pose acquired at the current moment on each component can be calculated, i.e., an X component difference value, a Y component difference value, a Z component difference value, an R component difference value, a P component difference value, a Y component difference value are calculated, and, setting corresponding weight for each component difference value, then according to the weighted X component difference value, Y component difference value and Z component difference value, expressing the difference between the actual pose and the target pose obtained at the current moment on XYZ components in a Euclidean distance form, and according to the weighted R component difference value, P component difference value and y component difference value, and finally, adding the difference between the XYZ component and the RPy component to obtain a first pose difference value. Specifically, the first posture difference value may be calculated according to the following formula:
Figure DEST_PATH_IMAGE010
wherein the content of the first and second substances,D 1is the difference value of the first posture,ithe representation X, Y, Z is shown as being,jthe representation R, P, y is shown as being,α i is composed ofiThe weight to which the component corresponds is,α j is composed ofjThe weight to which the component corresponds is,T i in the target positioniThe components of the first and second images are,T j in the target positionjThe components of the first and second images are,I i of the actual pose obtained for the current momentiThe components of the first and second images are,I j of the actual pose obtained for the current momentjThe component, mod, is the remainder function,
Figure DEST_PATH_IMAGE012
to representT j AndI j the absolute value of the difference is 180 degrees, and the R component difference value, the P component difference value and the y component difference value can be limited within 180 degrees. It should be noted that, in the following description,T i andI i the original unit of (a) may be in millimeters,T j andI j is degree, but in the addition calculation of the difference between the XYZ component and the RPy component, the numerical value is added without considering the unit of the two componentsD 1Is a pure numerical value used for representing the size of the pose difference and has no unit.
In the embodiment of the present invention, the weights corresponding to the X component, the Y component, the Z component, the R component, the P component, and the Y component may be set according to the influence of the deviation on each component on the quality of the captured image, and the evaluation criterion of the quality of the captured image depends on the quality inspection content. For example, in an embodiment of the present invention, the quality inspection content is a fine scratch on a surface of a certain product, and the evaluation of the quality of the captured image has a large relationship with the sharpness, the contour, and the brightness, and a small relationship with the offset, so that the deviation of the X component, the Y component, and the Z component has a small influence on the quality of the image, and the deviation of the R component, the P component, and the Y component has a large influence on the quality of the image, so that the weights corresponding to the X component, the Y component, and the Z component are small, and the weights corresponding to the R component, the P component, and the Y component are large. In a particular embodiment of the present invention,α X α Y α Z α R α P α y 1/30, 1/30, 1/30, 3/10, 3/10 and 3/10 can be respectively taken.
And S4, judging whether the first posture difference value is smaller than a preset threshold value.
And S5, if the first posture difference value is smaller than the preset threshold value, triggering the camera to shoot the image.
It should be understood that the preset threshold may be set according to the requirements for the quality of the captured image, and if the requirements are high, the preset threshold may be set relatively small.
If the first pose difference value is smaller than the preset threshold value, the fact that the actual pose obtained at the current moment is closer to the target pose or is the same as the target pose is shown, the camera is triggered to shoot an image, and the shot image is similar to the target image or is the same as the target image.
According to the flying shooting triggering method for workpiece quality inspection provided by the embodiment of the invention, the difference between the actual pose and the target pose is calculated on the XYZ component and the RPy component in a weighting manner, so that the actual pose and the target pose of the tail end of the six-axis mechanical arm can be more reasonably compared and matched, the difference between the pose and the target pose of the tail end of the six-axis mechanical arm during shooting by a camera can be effectively reduced, the quality of a shot image is improved, and the workpiece quality inspection effect is improved.
It should be understood that if the moving speed of the end of the mechanical arm is fast, and the frequency of acquiring the actual poses is low, for two actual poses acquired at adjacent moments, the former pose may be too advanced compared with the target pose, and the latter pose may be too delayed compared with the target pose, that is, the pose difference values between the two actual poses and the target pose are not less than the preset threshold, then the camera may not be triggered to shoot an image at or near the target pose, that is, a situation of failed image acquisition occurs.
To avoid this situation of failed image capture, in an embodiment of the present invention, as shown in fig. 2, the method for triggering flying photography for workpiece quality inspection may further include the following steps:
and S6, interpolating at least one interpolation pose between the actual pose acquired at the current moment and the actual pose acquired at the previous moment.
In particular, at least one interpolation time can be determined first, wherein the interpolation time is between the previous time and the current time. Then, the X component, the Y component and the Z component of the interpolation pose are determined according to the interpolation time, the X component, the Y component and the Z component of the actual pose acquired at the previous time and the X component, the Y component and the Z component of the actual pose acquired at the current time, and the R component, the P component and the Y component of the actual pose acquired at the previous time or the current time are used as the R component, the P component and the Y component of the interpolation time.
The actual pose of the tail end of the six-axis mechanical arm is acquired at the preset frequency, so that the time for acquiring the actual pose is discrete.
Generally, when the six-axis robot arm end carries the camera, the XYZ components change relatively greatly in a short time, so in the embodiment of the present invention, only the XYZ components can be interpolated, and the RPy components remain unchanged.
The purpose of interpolating at least one interpolated pose between the actual pose acquired at the current moment and the actual pose acquired at the previous moment is to solve the problem that the image acquisition fails when the method of the above steps S1 to S5 is executed due to too low working frequency of the manipulator controller, and the acquisition frequency of the pose can be increased on the basis of not increasing hardware cost, so that the number of interpolated moments in the embodiment of the present invention is based on the fact that the camera shooting image can be successfully triggered. If the interpolation time is multiple, the multiple interpolation times can be uniformly distributed between the previous time and the current time, that is, after the interpolation is carried out, the time difference between every two adjacent times is the same.
In one embodiment of the present invention, the X component, Y component, and Z component of the interpolation pose may be calculated according to the following formulas:
P i =Q i t·V i
wherein the content of the first and second substances,P i to interpolate posesiThe components of the first and second images are,Q i of the actual pose acquired at the last momentiComponent, ΔtTo interpolate the time difference between the instant and the previous instant,V i for the end of the six-axis robot arm from the previous moment to the present momentiThe average velocity over the components of the velocity,i=X,Y,Z。
similarly, the actual pose obtained at the last time in the calculation formula of the X component, the Y component and the Z component of the interpolation pose is obtainediThe component, the time difference between the interpolated time and the previous time, mayTo respectively replace with the actual pose obtained at the present momentiComponent, time difference (negative value) between the interpolation time and the current time.
Wherein the end of the six-axis mechanical arm from the previous moment to the current moment isiThe average velocity over the components may be based on the tip of the six-axis robot arm from the previous time to the current timeiThe component difference value and the time difference between the current moment and the previous moment are calculated, namely the actual pose obtained at the current momentiOf components and actual pose obtained at last momentiThe component is subtracted and then divided by the time difference between the current time and the previous time to obtain the time difference from the previous time to the current timeiAverage velocity over the components. In another embodiment of the present invention, if the end of the six-axis robot arm always moves at a constant speed in the rectangular spatial coordinate system, the speed of the end of the six-axis robot arm in the rectangular spatial coordinate system can be directly obtainediThe velocity in the component, i.e. from the last moment to the present momentiAverage velocity over the components.
And S7, calculating a second pose difference value between each interpolation pose and each target pose, wherein the interpolation poses and the target poses comprise X components, Y components, Z components, Euler angle R components, P components and Y components of a rectangular spatial coordinate system, and the second pose difference value is calculated according to the weighted X component difference value, Y component difference value, Z component difference value, R component difference value, P component difference value and Y component difference value of the interpolation poses and the target poses.
The calculation mode of the second pose difference value between the interpolation pose and the target pose is the same as the calculation mode of the first pose difference value between the actual pose and the target pose acquired at the current moment, namely the second pose difference value can be calculated according to the following formula:
Figure DEST_PATH_IMAGE014
wherein the content of the first and second substances,D 2is the difference value of the second posture,ithe representation X, Y, Z is shown as being,jthe representation R, P, y is shown as being,α i is composed ofiThe weight to which the component corresponds is,α j is composed ofjThe weight to which the component corresponds is,T i in the target positioniThe components of the first and second images are,T j in the target positionjThe components of the first and second images are,P i to interpolate posesiThe components of the first and second images are,P j to interpolate posesjThe component, mod, is the remainder function,
Figure DEST_PATH_IMAGE016
to representT j AndP j the absolute value of the difference is the remainder of 180. In the same way as above, the first and second,D 2and is a pure numerical value used for representing the size of the pose difference and has no unit.
And S8, judging whether the second posture difference value is smaller than a preset threshold value.
And S9, if the second posture difference value is smaller than the preset threshold value, triggering the camera to shoot the image.
By interpolating the acquired actual pose of the tail end of the six-axis mechanical arm, the high-frequency pose updating can be realized under the condition that the working frequency of the mechanical arm controller is low, so that the required image can be successfully shot when the tail end of the six-axis mechanical arm moves at a high speed, and the workpiece quality inspection effect is further improved.
In a flying shooting cycle, i.e. the process from the initial position to the return position of the six-axis robot arm end camera, the above steps S2 to S9 can be repeated to complete the flying shooting of the workpiece.
In addition, in one embodiment of the present invention, the flying photography triggering method for workpiece quality inspection may be performed by using a double thread, wherein steps S3 to S5 are performed in a first thread, and steps S6 to S9 are performed in a second thread, that is, the pose comparison, the difference determination, and the photography triggering before the pose interpolation is performed are performed in the first thread, and the pose comparison, the difference determination, and the photography triggering after the pose interpolation and the pose interpolation are performed in the second thread. Therefore, the flying shooting efficiency can be improved, and the workpiece quality inspection efficiency is improved.
Corresponding to the method for triggering the flying shooting and shooting for workpiece quality inspection in the embodiment, the invention also provides a device for triggering the flying shooting and shooting for workpiece quality inspection.
As shown in fig. 3, the flying photography triggering device for workpiece quality inspection according to the embodiment of the present invention includes: the device comprises a control module 10, an acquisition module 20, a first calculation module 30, a first judgment module 40 and a first trigger module 50. The control module 10 is used for starting the flying shooting system and controlling the six-axis mechanical arm in the flying shooting system to move so as to drive the camera at the tail end of the six-axis mechanical arm to execute flying shooting work; the acquisition module 20 is used for acquiring the actual pose of the tail end of the six-axis mechanical arm at a preset frequency; the first calculating module 30 is configured to calculate a first pose difference value between an actual pose acquired at the current time and each target pose, where the actual pose and the target pose acquired at the current time both include an X component, a Y component, a Z component, an euler angle R component, a P component, and a Y component of a spatial rectangular coordinate system, and the first pose difference value is calculated according to a X component difference value, a Y component difference value, a Z component difference value, an R component difference value, a P component difference value, and a Y component difference value of the actual pose and the target pose acquired at the current time after weighting; the first judging module 40 is configured to judge whether the first posture difference value is smaller than a preset threshold; the first triggering module 50 is configured to trigger the camera to shoot an image when the first determining module 40 determines that the first pose difference value is smaller than the preset threshold.
According to the flying shooting trigger device for workpiece quality inspection provided by the embodiment of the invention, the difference between the actual pose and the target pose is calculated on the XYZ component and the RPy component in a weighting manner, so that the actual pose and the target pose of the tail end of the six-axis mechanical arm can be more reasonably compared and matched, the difference between the pose and the target pose of the tail end of the six-axis mechanical arm during shooting by a camera can be effectively reduced, the quality of a shot image is improved, and the workpiece quality inspection effect is improved.
Further, as shown in fig. 4, the trigger apparatus for flying shoot shooting for workpiece quality inspection according to an embodiment of the present invention may further include: the interpolation module 60, the second calculation module 70, the second judgment module 80 and the second trigger module 90. The interpolation module 60 is configured to interpolate at least one interpolation pose between an actual pose acquired at a current time and an actual pose acquired at a previous time; the second calculating module 70 is configured to calculate a second pose difference value between each interpolation pose and each target pose, where the interpolation poses and the target poses both include an X component, a Y component, a Z component, an euler angle R component, a P component, and a Y component of a spatial rectangular coordinate system, and the second pose difference value is calculated according to a weighted X component difference value, a Y component difference value, a Z component difference value, an R component difference value, a P component difference value, and a Y component difference value of the interpolation poses and the target poses; the second judging module 80 is configured to judge whether the second posture difference value is smaller than a preset threshold; the second triggering module 90 is configured to trigger the camera to shoot an image when the second determining module 80 determines that the second pose difference is smaller than the preset threshold.
By interpolating the acquired actual pose of the tail end of the six-axis mechanical arm, the high-frequency pose updating can be realized under the condition that the working frequency of the mechanical arm controller is low, so that the required image can be successfully shot when the tail end of the six-axis mechanical arm moves at a high speed, and the workpiece quality inspection effect is further improved.
For a more specific implementation of the trigger device for workpiece quality inspection, reference may be made to the above-mentioned embodiment of the trigger method for workpiece quality inspection, and details are not repeated here.
The invention further provides a computer device corresponding to the embodiment.
The computer device of the embodiment of the invention comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, and when the processor executes the computer program, the method for triggering the aerial photography for workpiece quality inspection according to the embodiment of the invention can be realized.
According to the computer equipment provided by the embodiment of the invention, when the processor executes the computer program stored in the memory, the difference between the actual pose and the target pose is calculated on the XYZ component and the RPy component in a weighting mode, so that the actual pose and the target pose of the tail end of the six-axis mechanical arm can be more reasonably compared and matched, the difference between the pose and the target pose of the tail end of the six-axis mechanical arm during shooting by the camera can be effectively reduced, the quality of the shot image is improved, and the workpiece quality inspection effect is improved.
The invention also provides a non-transitory computer readable storage medium corresponding to the above embodiment.
A non-transitory computer-readable storage medium of an embodiment of the present invention has stored thereon a computer program that, when executed by a processor, can implement the method for triggering a flying-shoot for quality inspection of a workpiece according to the above-described embodiment of the present invention.
According to the non-transitory computer-readable storage medium of the embodiment of the invention, when the processor executes the computer program stored thereon, the difference between the actual pose and the target pose is calculated in a weighting manner on the XYZ component and the RPy component, so that the actual pose and the target pose of the tail end of the six-axis mechanical arm can be more reasonably compared and matched, the difference between the pose and the target pose of the tail end of the six-axis mechanical arm when the camera shoots the image can be effectively reduced, the quality of the shot image is improved, and the workpiece quality inspection effect is improved.
In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. The meaning of "plurality" is two or more unless specifically limited otherwise.
In the present invention, unless otherwise expressly stated or limited, the terms "mounted," "connected," "secured," and the like are to be construed broadly and can, for example, be fixedly connected, detachably connected, or integrally formed; can be mechanically or electrically connected; either directly or indirectly through intervening media, either internally or in any other relationship. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
In the present invention, unless otherwise expressly stated or limited, the first feature "on" or "under" the second feature may be directly contacting the first and second features or indirectly contacting the first and second features through an intermediate. Also, a first feature "on," "over," and "above" a second feature may be directly or diagonally above the second feature, or may simply indicate that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature may be directly under or obliquely under the first feature, or may simply mean that the first feature is at a lesser elevation than the second feature.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
The logic and/or steps represented in the flowcharts or otherwise described herein, e.g., an ordered listing of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium could even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.

Claims (7)

1. A flying shooting triggering method for workpiece quality inspection is characterized by comprising the following steps:
s1, starting a flying shooting system, and controlling six mechanical arms in the flying shooting system to move so as to drive cameras at the tail ends of the six mechanical arms to execute flying shooting work;
s2, acquiring the actual pose of the tail end of the six-axis mechanical arm at a preset frequency;
s3, calculating a first pose difference value between an actual pose acquired at the current moment and each target pose, wherein the actual pose acquired at the current moment and the target pose comprise an X component, a Y component, a Z component, an Euler angle R component, a P component and a Y component of a rectangular spatial coordinate system, and the first pose difference value is calculated according to the X component difference value, the Y component difference value, the Z component difference value, the R component difference value, the P component difference value and the Y component difference value of the actual pose acquired at the current moment and the target pose after weighting;
s4, judging whether the first posture difference value is smaller than a preset threshold value;
s5, if the first posture difference value is smaller than the preset threshold value, triggering the camera to shoot an image;
s6, interpolating at least one interpolated pose between the actual pose acquired at the current time and the actual pose acquired at the previous time;
s7, calculating second pose difference values between each interpolation pose and each target pose, wherein the interpolation poses and the target poses respectively comprise X components, Y components, Z components, Euler angle R components, P components and Y components of a space rectangular coordinate system, and the second pose difference values are calculated according to the weighted X component difference values, Y component difference values, Z component difference values, R component difference values, P component difference values and Y component difference values of the interpolation poses and the target poses;
s8, judging whether the second posture difference value is smaller than the preset threshold value;
and S9, if the second posture difference value is smaller than the preset threshold value, triggering the camera to shoot an image.
2. The method of claim 1, wherein the first pose difference value is calculated according to the following formula:
Figure 424664DEST_PATH_IMAGE002
wherein the content of the first and second substances,D 1is the value of the difference of the first posture,ithe representation X, Y, Z is shown as being,jthe representation R, P, y is shown as being,α i is composed ofiThe weight to which the component corresponds is,α j is composed ofjThe weight to which the component corresponds is,T i for the pose of the objectiThe components of the first and second images are,T j for the position and posture of the targetIs/are as followsjThe components of the first and second images are,I i for the actual pose obtained at the current momentiThe components of the first and second images are,I j for the actual pose obtained at the current momentjThe component, mod, is the remainder function,
Figure DEST_PATH_IMAGE004
to representT j AndI j taking the remainder of the absolute value of the difference to 180;
calculating the second posture difference value according to the following formula:
Figure DEST_PATH_IMAGE006
wherein the content of the first and second substances,D 2is the difference value of the second posture,P i for interpolation poseiThe components of the first and second images are,P j for interpolation posejThe components of the first and second images are,
Figure DEST_PATH_IMAGE008
to representT j AndP j the absolute value of the difference is the remainder of 180.
3. The flying-shoot shooting triggering method for workpiece quality inspection according to claim 2, characterized in that step S6 includes:
determining at least one interpolation time, wherein the interpolation time is between the last time and the current time;
and determining the X component, the Y component and the Z component of the interpolation pose according to the interpolation time, the X component, the Y component and the Z component of the actual pose acquired at the last time and the X component, the Y component and the Z component of the actual pose acquired at the current time, and taking the R component, the P component and the Y component of the actual pose acquired at the last time or the current time as the R component, the P component and the Y component of the interpolation time.
4. The flying-shot triggering method for workpiece quality inspection according to any one of claims 1-3, characterized in that steps S3-S5 are executed in a first thread, and steps S6-S9 are executed in a second thread.
5. A trigger device is taken photograph to flying clap for work piece quality control, its characterized in that includes:
the control module is used for starting the flying shooting system and controlling the six-axis mechanical arm in the flying shooting system to move so as to drive the camera at the tail end of the six-axis mechanical arm to execute flying shooting work;
the acquisition module is used for acquiring the actual pose of the tail end of the six-axis mechanical arm at a preset frequency;
the first calculation module is used for calculating a first pose difference value between an actual pose acquired at the current moment and each target pose, wherein the actual pose acquired at the current moment and the target pose comprise an X component, a Y component, a Z component, an Euler angle R component, a P component and a Y component of a rectangular spatial coordinate system, and the first pose difference value is calculated according to the X component difference value, the Y component difference value, the Z component difference value, the R component difference value, the P component difference value and the Y component difference value of the actual pose acquired at the current moment and the target pose after weighting;
the first judgment module is used for judging whether the first posture difference value is smaller than a preset threshold value;
the first triggering module is used for triggering the camera to shoot an image when the first judging module judges that the first posture difference value is smaller than the preset threshold value;
the interpolation module is used for interpolating at least one interpolation pose between the actual pose acquired at the current moment and the actual pose acquired at the previous moment;
the second calculation module is configured to calculate a second pose difference value between each interpolation pose and each target pose, where the interpolation poses and the target poses both include an X component, a Y component, a Z component, an euler angle R component, a P component, and a Y component of a spatial rectangular coordinate system, and the second pose difference value is calculated according to a weighted X component difference value, Y component difference value, Z component difference value, R component difference value, P component difference value, and Y component difference value between the interpolation poses and the target poses;
the second judgment module is used for judging whether the second position and posture difference value is smaller than the preset threshold value or not;
and the second triggering module is used for triggering the camera to shoot the image when the second judging module judges that the second position and posture difference value is smaller than the preset threshold value.
6. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the method of flying shot triggering for workpiece quality inspection according to any one of claims 1-4.
7. A non-transitory computer-readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the method for triggering a flying shot for quality inspection of a workpiece according to any one of claims 1-4.
CN202110740067.9A 2021-07-01 2021-07-01 Flying shooting triggering method and device for workpiece quality inspection Active CN113194262B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110740067.9A CN113194262B (en) 2021-07-01 2021-07-01 Flying shooting triggering method and device for workpiece quality inspection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110740067.9A CN113194262B (en) 2021-07-01 2021-07-01 Flying shooting triggering method and device for workpiece quality inspection

Publications (2)

Publication Number Publication Date
CN113194262A CN113194262A (en) 2021-07-30
CN113194262B true CN113194262B (en) 2021-09-28

Family

ID=76976890

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110740067.9A Active CN113194262B (en) 2021-07-01 2021-07-01 Flying shooting triggering method and device for workpiece quality inspection

Country Status (1)

Country Link
CN (1) CN113194262B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106647248A (en) * 2017-01-13 2017-05-10 中国科学院深圳先进技术研究院 Method and apparatus for determining the inverse solution result of robots in series
CN111189394A (en) * 2020-04-09 2020-05-22 南京佗道医疗科技有限公司 Device, system and method for verifying parameters of special-shaped workpiece
CN111198528A (en) * 2020-01-16 2020-05-26 苏州灵猴机器人有限公司 A servo driver and fly equipment of clapping for fly clap
CN112947578A (en) * 2021-03-18 2021-06-11 广东安达智能装备股份有限公司 Non-contact high-precision flying photographing positioning method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012254518A (en) * 2011-05-16 2012-12-27 Seiko Epson Corp Robot control system, robot system and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106647248A (en) * 2017-01-13 2017-05-10 中国科学院深圳先进技术研究院 Method and apparatus for determining the inverse solution result of robots in series
CN111198528A (en) * 2020-01-16 2020-05-26 苏州灵猴机器人有限公司 A servo driver and fly equipment of clapping for fly clap
CN111189394A (en) * 2020-04-09 2020-05-22 南京佗道医疗科技有限公司 Device, system and method for verifying parameters of special-shaped workpiece
CN112947578A (en) * 2021-03-18 2021-06-11 广东安达智能装备股份有限公司 Non-contact high-precision flying photographing positioning method

Also Published As

Publication number Publication date
CN113194262A (en) 2021-07-30

Similar Documents

Publication Publication Date Title
WO2018209862A1 (en) Pose error correction method and device, robot and storage medium
US10549425B2 (en) Carrier device for taking out objects one by one by optimal route
CN113014816B (en) Method and device for determining trigger point of flying shooting
CN107138432B (en) Method and apparatus for sorting non-rigid objects
CN107403447B (en) Depth image acquisition method
JP2008087074A (en) Workpiece picking apparatus
JP2019089188A (en) Operation system and program
JP2020078859A (en) Robot device
JP2015152888A5 (en) Image processing apparatus and control method thereof
CN105991924A (en) Shooting assisting method and device
CN112714287A (en) Pan-tilt target conversion control method, device, equipment and storage medium
CN113252007B (en) Method and device for determining flying shooting control parameters for workpiece quality inspection
CN113194262B (en) Flying shooting triggering method and device for workpiece quality inspection
CN112511759A (en) Flying shooting control method and device
CN106996769B (en) Active pose rapid relocation method without camera calibration
CN114347015B (en) Robot grabbing control method, system, device and medium
CN112565615B (en) Method and device for determining trigger point of flying shooting
CN112489133A (en) Calibration method, device and equipment of hand-eye system
CN110989691A (en) Cloud deck control method and device, storage medium, electronic equipment and unmanned aerial vehicle
CN115847426A (en) Robot motion control method, device, electronic equipment and storage medium
CN116400639A (en) PLC (programmable logic controller) collected data intelligent cleaning method and system
WO2021102797A1 (en) Gimbal control method, control device, and control system
TWI793477B (en) Assistance system for correcting vessel path and operation method thereof
CN112967228A (en) Method and device for determining target optical flow information, electronic equipment and storage medium
CN112184819A (en) Robot guiding method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant