Image acquisition method, device and electronic equipment

By trajectory planning based on the shape properties of the workpiece, the problem of low image acquisition efficiency is solved, and more accurate and efficient image acquisition is achieved.

CN118386257BActive Publication Date: 2024-11-05CHANGZHOU MICROINTELLIGENCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410852293.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-11-05
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

In the existing image acquisition methods, the image acquisition trajectory planning is unreasonable, resulting in low image acquisition efficiency.

Method used

According to the shape properties of the target workpiece, the corresponding trajectory planning method is used to perform trajectory planning, including circular trajectory and hemispherical trajectory planning, the target acquisition trajectory is obtained, and image acquisition is performed through the robotic arm camera.

Benefits of technology

By planning trajectory for different shape attributes, more accurate and reasonable target acquisition trajectories are obtained, which improves the efficiency of image acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118386257B_ABST
    Figure CN118386257B_ABST
Patent Text Reader

Abstract

The present application relates to the field of machine vision, and the present application discloses an image acquisition method, device and electronic device. The method includes: based on the initial placement angle of the target workpiece object, obtaining the first initial TCP posture of the tool center point TCP and the first initial workpiece position of the target workpiece object in the robot coordinate system when the robot arm is located at the taught grasping point to grasp the target workpiece object; determining the shape attribute of the target workpiece object; based on the first initial TCP posture and the first initial workpiece position, using the trajectory planning method corresponding to the shape attribute to perform trajectory planning to obtain the target acquisition trajectory; based on each target TCP posture in the target acquisition trajectory, controlling the robot arm TCP to move to the corresponding TCP point position, so as to acquire images based on the camera set on the robot arm, and obtain several target images. The present application can make the target acquisition trajectory obtained by planning more accurate and reasonable, which is conducive to improving the efficiency of image acquisition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of machine vision, and in particular to an image acquisition method, device and electronic equipment. Background Art

[0002] In the industrial field, workpiece grasping has become a hot research direction. The workpiece grasping process usually involves workpiece pose estimation, and the accuracy of pose estimation affects the grasping accuracy of the workpiece. However, the accuracy of pose estimation is closely related to the training set of the workpiece and the pose GT value of the workpiece in the world coordinate system. How to efficiently collect the training set of the workpiece and accurately obtain the GT value determines the accuracy of pose estimation.

[0003] However, existing image acquisition methods have the problem of unreasonable image acquisition trajectory planning, resulting in low image acquisition efficiency. Summary of the invention

[0004] In view of this, the present invention provides an image acquisition method, device and electronic device, the main purpose of which is to solve the current problem of unreasonable image acquisition trajectory planning, resulting in low image acquisition efficiency.

[0005] To solve the above problems, the present application provides an image acquisition method, comprising:

[0006] Based on the initial placement angle of the target workpiece object, obtaining a first initial TCP pose of the tool center point TCP and a first initial workpiece position of the target workpiece object in the robot coordinate system when the robot arm is located at the taught grasping point to grasp the target workpiece object;

[0007] Determine shape attributes of the target workpiece object, the shape attributes including: symmetrical shape and asymmetrical shape;

[0008] Based on the first initial TCP posture and the first initial workpiece position, performing trajectory planning using a trajectory planning method corresponding to the shape attribute to obtain a target acquisition trajectory;

[0009] Based on each target TCP posture in the target acquisition trajectory, the robot arm TCP is controlled to move to the corresponding TCP point position, so as to acquire images based on the camera set on the robot arm to obtain a number of target images.

[0010] Optionally, performing trajectory planning based on the first initial TCP pose and the first initial workpiece position using a trajectory planning method corresponding to the shape attribute to obtain a target acquisition trajectory specifically includes:

[0011] When the shape attribute is a symmetrical shape, based on the first initial TCP posture and the first initial workpiece position, circular trajectory planning and / or hemispherical trajectory planning are performed to obtain a circular acquisition trajectory corresponding to the initial placement angle, and / or a hemispherical acquisition trajectory corresponding to the initial placement angle, so as to obtain the target acquisition trajectory;

[0012] When the shape attribute is a shape attribute of an asymmetric shape, based on the initial placement angle of the target workpiece object, the first initial TCP pose corresponding to the initial placement angle, and the first initial workpiece position corresponding to the initial placement angle, determine a number of current placement angles, second initial TCP poses corresponding to each current placement angle, and second initial workpiece positions corresponding to each current placement angle;

[0013] Based on the first initial TCP posture, the first initial workpiece position, each second initial TCP posture and each second initial workpiece position, circular trajectory planning and / or hemispherical trajectory planning are performed respectively to obtain a circular acquisition trajectory corresponding to the initial placement angle and a circular acquisition trajectory corresponding to each current placement angle, and / or a hemispherical acquisition trajectory corresponding to the initial placement angle and a hemispherical acquisition trajectory corresponding to each current placement angle, so as to obtain the target acquisition trajectory.

[0014] Optionally, after obtaining the circular collection trajectory corresponding to the initial placement angle and the circular collection trajectory corresponding to each of the current placement angles, and / or obtaining the hemispherical collection trajectory corresponding to the initial placement angle and the hemispherical collection trajectory corresponding to each of the current placement angles, the method further includes:

[0015] Determining a target acquisition ratio based on the number of circular acquisition trajectories or the number of hemispherical acquisition trajectories;

[0016] Based on each of the circular collection trajectories and according to the target collection ratio, determining a first sub-trajectory corresponding to each of the circular collection trajectories;

[0017] Determining, based on each of the hemispherical acquisition trajectories and in accordance with the target acquisition ratio, a second sub-trajectory corresponding to each of the hemispherical acquisition trajectories;

[0018] The target acquisition trajectory is determined based on each of the first sub-trajectories and / or each of the second sub-trajectories.

[0019] Optionally, the performing circular trajectory planning includes:

[0020] Determine the radius of the circular trajectory and the height of the plane where the circular acquisition trajectory is located based on the initial TCP posture;

[0021] Taking the initial workpiece position as the center of the circle, based on the radius of the circular trajectory and the height, planning to obtain a circular acquisition trajectory corresponding to the camera, and converting the circular acquisition trajectory corresponding to the camera to obtain a circular acquisition trajectory corresponding to the TCP;

[0022] The initial TCP posture is a first initial TCP posture or a second initial TCP posture; the initial workpiece position is a first initial workpiece position corresponding to the first initial TCP posture, or a second initial workpiece position corresponding to the second initial TCP posture.

[0023] Optionally, the planning of obtaining a circular acquisition trajectory corresponding to the camera based on the radius of the circular trajectory and the height with the initial workpiece position as the center of the circle specifically includes:

[0024] Taking the initial workpiece position as the center of the circle and based on the radius of the circular trajectory and the height, determining a plurality of first photographing points;

[0025] Based on the initial camera posture corresponding to the initial TCP posture, performing posture interpolation processing on each of the first photographing points to obtain a first camera posture corresponding to each photographing point;

[0026] Based on each of the first photographing points and the first camera posture corresponding to each of the photographing points, a circular collection trajectory corresponding to the camera is obtained.

[0027] Optionally, the performing hemispherical trajectory planning includes:

[0028] Determine the radius of the hemispherical trajectory based on the initial TCP pose;

[0029] Taking the initial workpiece position as the sphere center and based on the radius of the hemispherical trajectory, planning to obtain a hemispherical acquisition trajectory corresponding to the camera, and converting the hemispherical acquisition trajectory corresponding to the camera to obtain a hemispherical acquisition trajectory corresponding to the TCP;

[0030] The initial TCP posture is a first initial TCP posture or a second initial TCP posture; the initial workpiece position is a first initial workpiece position corresponding to the first initial TCP posture, or a second initial workpiece position corresponding to the second initial TCP posture.

[0031] Optionally, taking the initial workpiece position as the sphere center and based on the radius of the hemispherical trajectory, planning to obtain a hemispherical acquisition trajectory corresponding to the camera specifically includes:

[0032] Determine a hemisphere with the initial workpiece position as the sphere center and based on the radius of the hemisphere trajectory;

[0033] Segmenting the spherical surface of the hemisphere to obtain a plurality of triangular facets;

[0034] Determine a plurality of second photographing points based on each of the triangular facets;

[0035] Based on each of the second photographing points, determining a second camera posture when the camera is located at each of the second photographing points;

[0036] Based on each of the second photographing points and the second camera postures corresponding to each of the second photographing points, a hemispherical collection trajectory corresponding to the camera is obtained.

[0037] Optionally, after obtaining the target acquisition trajectory, the method further includes:

[0038] The TCP postures of the targets in the target acquisition trajectory are screened based on a predetermined screening condition to obtain a screened target acquisition trajectory, so as to perform image acquisition based on the selected target acquisition trajectory.

[0039] In order to solve the above problems, the present application provides an image acquisition device, comprising:

[0040] An acquisition module is used to acquire, based on an initial placement angle of a target workpiece object, a first initial TCP pose of a tool center point TCP and a first initial workpiece position of the target workpiece object in a robot coordinate system when the robot arm is located at a taught grasping point to grasp the target workpiece object;

[0041] A determination module, used to determine the shape attribute of the target workpiece object;

[0042] A planning module, configured to perform trajectory planning based on the first initial TCP posture and the first initial workpiece position by adopting a trajectory planning method corresponding to the shape attribute to obtain a target acquisition trajectory;

[0043] The acquisition module is used to control the robot arm TCP to move to the corresponding TCP point based on the target TCP postures in the target acquisition trajectory, so as to acquire a number of target images based on the camera set on the robot arm.

[0044] To solve the above problems, the present application provides an electronic device, comprising at least a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program in the memory, the steps of any of the above-mentioned image acquisition methods are implemented.

[0045] The image acquisition method, device and electronic device in the present application complete the path planning of the robot arm TCP by adopting a trajectory planning method corresponding to the different shape attributes of the workpiece object, which can make the target acquisition trajectory obtained by planning more accurate and reasonable, and subsequently, image acquisition can be efficiently performed based on the target acquisition trajectory.

[0046] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0048] Figure 1 This is a flow chart of an image acquisition method according to an embodiment of the present application;

[0049] Figure 2 This is a flowchart of circular acquisition trajectory planning in another embodiment of the present application;

[0050] Figure 3 This is a flow chart of hemispherical acquisition trajectory planning in another embodiment of the present application;

[0051] Figure 4 This is an overall flow chart of the image acquisition trajectory of another embodiment of the present application;

[0052] Figure 5 This is a structural block diagram of an image acquisition device according to another embodiment of the present application;

[0053] Figure 6 This is a structural block diagram of an electronic device according to another embodiment of the present application. DETAILED DESCRIPTION

[0054] Various aspects and features of the present application are described herein with reference to the accompanying drawings.

[0055] It should be understood that various modifications may be made to the embodiments of the present application. Therefore, the above description should not be considered as limiting, but only as an example of an embodiment. Other modifications within the scope and spirit of the present application will occur to those skilled in the art.

[0056] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the present application and, together with the general description of the present application given above and the detailed description of the embodiments given below, serve to explain the principles of the present application.

[0057] These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment given as a non-limiting example with reference to the accompanying drawings.

[0058] It should also be understood that although the present application has been described with reference to some specific examples, those skilled in the art will be able to readily implement many other equivalent forms of the present application.

[0059] The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.

[0060] Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it should be understood that the embodiments applied for are merely examples of the present application, which may be implemented in a variety of ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that obscure the present application. Therefore, the specific structural and functional details applied for herein are not intended to be limiting, but merely serve as a basis and representative basis for the claims to teach those skilled in the art to use the present application in a variety of ways with substantially any suitable detailed structure.

[0061] This specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," all of which may refer to one or more of the same or different embodiments according to the present application.

[0062] The present application embodiment provides an image acquisition method, which can be specifically applied to electronic devices such as terminals and servers, such as Figure 1 As shown, the method in this embodiment includes the following steps:

[0063] Step S101, based on the initial placement angle of the target workpiece object, obtaining a first initial TCP pose of a tool center point TCP and a first initial workpiece position of the target workpiece object in a robot coordinate system when the robot arm is located at a taught grasping point to grasp the target workpiece object;

[0064] In this step, the tool center point TCP (full name: Tool Center Point) refers to a tool coordinate system established on the robot tool, whose origin is the tool center point. According to the initial placement position / initial placement angle of the target object / target workpiece object, the robot arm TCP can be controlled to reach the surface center of the target object, touch the target object, and obtain the position (x, y) of the target object in the robot coordinate system, that is, the first initial workpiece position. At the same time, the gripper can be controlled to reach the graspable point of the workpiece, and the TCP pose at this time can be obtained through the teach pendant, thereby obtaining the first initial TCP pose.

[0065] Step S102, determining the shape attributes of the target workpiece object;

[0066] In this step, the shape attributes of the workpiece object may include two shape attributes: symmetrical shape and asymmetrical shape. By determining the shape attributes of the workpiece object, it is convenient to determine the corresponding trajectory planning method based on the shape attributes in a reasonable and accurate manner.

[0067] Step S103, based on the first initial TCP posture and the first initial workpiece position, trajectory planning is performed using a trajectory planning method corresponding to the shape attribute to obtain a target acquisition trajectory;

[0068] In this step, when the shape attribute is a symmetrical shape, the first trajectory planning method can be used to directly plan a circular acquisition trajectory and a hemispherical acquisition trajectory based on the first initial TCP posture and the first initial workpiece position, thereby obtaining the target acquisition trajectory.

[0069] When the shape attribute is an asymmetric shape, the target workpiece object can be further offset to obtain the second initial TCP pose of the tool center point TCP when the robot arm grasps the target workpiece object at each current placement angle / offset placement angle, and at the same time obtain the second initial workpiece position of the target workpiece object in the robot coordinate system at the current placement angle. Therefore, for each first initial TCP pose, first initial workpiece position, each second initial TCP pose and each second initial workpiece position, a circular acquisition trajectory corresponding to each placement angle (initial placement angle and each current placement angle) and a hemispherical acquisition trajectory corresponding to each placement angle can be planned, that is, several circular acquisition trajectories and several hemispherical acquisition trajectories can be planned to increase the number of images taken for asymmetric workpieces.

[0070] Step S104, based on each target TCP posture in the target acquisition trajectory, control the robot arm TCP to move to the corresponding TCP point position, and perform image acquisition based on the camera set on the robot arm to obtain a plurality of target images.

[0071] In this step, a 2D camera is set at the end of the robot arm. After obtaining the target acquisition trajectory, the robot arm can be controlled according to the target TCP posture corresponding to each TCP point in the target acquisition trajectory, so that the robot arm TCP moves to the corresponding TCP point, and then the target workpiece object is photographed based on the camera at the end of the robot arm to perform image acquisition.

[0072] The method in this embodiment completes the path planning of the robot TCP by adopting a trajectory planning method corresponding to the different shape attributes of the workpiece object, which can make the target acquisition trajectory obtained by planning more accurate and reasonable, and subsequently, image acquisition can be efficiently performed based on the target acquisition trajectory.

[0073] On the basis of the above embodiments, another embodiment of the present application provides an image acquisition method. In this embodiment, based on the first initial TCP posture and the first initial workpiece position, a trajectory planning method corresponding to the shape attribute is used to perform trajectory planning to obtain a target acquisition trajectory, which may specifically include the following two situations:

[0074] Case 1: When the shape attribute is a symmetrical shape, circular trajectory planning and / or hemispherical trajectory planning are performed based on the first initial TCP posture and the first initial workpiece position to obtain a circular acquisition trajectory corresponding to the initial placement angle, and / or a hemispherical acquisition trajectory corresponding to the initial placement angle to obtain the target acquisition trajectory.

[0075] That is to say, when the shape attribute is a symmetrical shape, the first trajectory planning method can be used to perform trajectory planning only once, that is, circular trajectory planning and / or hemispherical trajectory planning are performed directly based on the first initial TCP posture and the first initial workpiece position to obtain a circular collection trajectory and / or a hemispherical collection trajectory, that is, a circular collection trajectory and / or a hemispherical collection trajectory corresponding to the initial placement angle is obtained.

[0076] Case 2: When the shape attribute is an asymmetric shape, based on the initial placement angle of the target workpiece object, the first initial TCP pose corresponding to the initial placement angle, and the first initial workpiece position corresponding to the initial placement angle, several current placement angles, second initial TCP poses corresponding to each current placement angle, and second initial workpiece positions corresponding to each current placement angle are determined;

[0077] Based on the first initial TCP posture, the first initial workpiece position, each second initial TCP posture and each second initial workpiece position, circular trajectory planning and / or hemispherical trajectory planning are performed respectively to obtain a circular acquisition trajectory corresponding to the initial placement angle and a circular acquisition trajectory corresponding to each current placement angle, and / or a hemispherical acquisition trajectory corresponding to the initial placement angle and a hemispherical acquisition trajectory corresponding to each current placement angle, so as to obtain the target acquisition trajectory.

[0078] That is to say, when the shape attribute is an asymmetric shape, a second trajectory planning method can be used to perform multiple trajectory planning. Specifically, the second trajectory planning method can be used to first perform circular trajectory planning and / or hemispherical trajectory planning based directly on the first initial TCP posture and the first initial workpiece position to obtain a circular acquisition trajectory and / or hemispherical acquisition trajectory corresponding to the initial placement angle. Then, several current placement angles after the offset are further determined, and the second initial TCP posture corresponding to each current placement angle and the second initial workpiece position corresponding to each current placement angle are obtained. Then, based on each of the second initial TCP postures and each of the second initial workpiece positions, circular trajectory planning and / or hemispherical trajectory planning are performed respectively to obtain a circular acquisition trajectory corresponding to each of the current placement angles, and / or a hemispherical acquisition trajectory corresponding to each of the current placement angles. Finally, the target acquisition trajectory can be obtained based on the circular acquisition trajectory and / or hemispherical acquisition trajectory corresponding to the initial placement position, and the circular acquisition trajectory and / or spherical acquisition trajectory corresponding to each current placement angle.

[0079] In this embodiment, when the shape attribute of the target workpiece object is an asymmetric shape, in order to avoid redundant image acquisition, the circular acquisition trajectory and the hemispherical acquisition trajectory corresponding to each placement angle can be reasonably reduced, thereby avoiding redundant image acquisition while ensuring that the number of image acquisitions is sufficient. The specific reduction process is as follows:

[0080] Step 1: determining the target acquisition ratio based on the number of circular acquisition trajectories or the number of hemispherical acquisition trajectories;

[0081] In this step, for example, when the number of circular collection trajectories is n, the target collection ratio / target reduction ratio can be determined to be 1 / n, where n is a positive integer. It can be understood that when trajectory planning is performed at n placement angles, the target collection ratio / target reduction ratio is determined to be 1 / n.

[0082] Step 2: determining a first sub-track corresponding to each of the circular collection tracks according to the target collection ratio based on each of the circular collection tracks;

[0083] In this step, after determining that the target acquisition ratio is 1 / n, 1 / n number of TCP points can be determined from the circular acquisition trajectory based on the target acquisition ratio. Specifically, the circular acquisition trajectory can be evenly divided into n segments / parts of the trajectory. Among them, the TCP points contained in each segment / part of the trajectory are the same, or the center angle corresponding to each segment / part of the trajectory is the same. Then one of the segments / parts of the trajectory is used as the first sub-trajectory.

[0084] Step 3: determining a second sub-track corresponding to each of the hemispherical acquisition tracks according to the target acquisition ratio based on each of the hemispherical acquisition tracks;

[0085] In this step, after determining that the target acquisition ratio is 1 / n, 1 / n number of TCP points can be determined from the hemispherical acquisition trajectory based on the target acquisition ratio. Specifically, the hemispherical acquisition trajectory can be evenly divided into n trajectories. Among them, the TCP points contained in each trajectory are the same, or the spherical center angles corresponding to each trajectory are the same. Then one of the trajectories is used as the second sub-trajectory.

[0086] Step 4: Determine the target acquisition trajectory based on each of the first sub-trajectories and / or each of the second sub-trajectories.

[0087] In this step, after obtaining the first sub-track and / or the second sub-track corresponding to the placement angle, a round of image acquisition can be performed based on the first sub-track and the second sub-track corresponding to the initial placement angle, that is, a number of target images corresponding to the first sub-track of the initial placement angle and a number of target images corresponding to the second sub-track corresponding to the initial placement angle are obtained to complete a round of acquisition. Then, the placement angle of the target workpiece object can be offset / adjusted based on the robot arm control so that the workpiece object is located at the next current placement angle, and the next round of image acquisition can be performed based on the first sub-track and / or the second sub-track corresponding to the current placement angle, until a round of image acquisition is completed for each current placement angle, and image acquisition can be completed to obtain all target images.

[0088] In the specific implementation process of this embodiment, two image acquisition modes / trajectory planning methods are given for symmetrical and asymmetrical workpiece objects. That is, for symmetrical workpiece objects, there is no need to perform multi-angle grasping and placement of the workpiece object. It is only necessary to perform a circular trajectory planning and / or a hemispherical trajectory planning, and to perform image acquisition (image acquisition), and the number of images (image acquisition) is as large as possible. For asymmetrical workpiece objects, a variety of placement angles (x, y, -x, -y) can be given according to the orientation of the coordinate system. For example, four placement angles are given (the four placement angles include the current placement angle and each offset placement angle). The same trajectory planning method as the symmetrical workpiece is used at each placement angle, but the number of images is 1 / 4. After completing one image acquisition, the gripper is controlled to reach the initial grasping point and then grasp the workpiece to offset the workpiece placement angle. At the same time, the GT value at each placement angle is calculated to obtain the second initial workpiece position of the target workpiece object at the offset placement angle, and the second initial TCP posture at the offset placement angle is obtained. Then, trajectory planning and image acquisition are further performed, and the acquisition of all images can be completed by three cycles.

[0089] Another embodiment of the present application provides an image acquisition method. In this embodiment, when trajectory planning is performed using a trajectory planning method corresponding to a symmetrical shape, circular trajectory planning can be performed alone, hemispherical trajectory planning can be performed alone, or circular trajectory planning and hemispherical trajectory planning can be performed simultaneously. Similarly, when a trajectory planning method corresponding to an asymmetrical shape is used, circular trajectory planning can be performed alone, hemispherical trajectory planning can be performed alone, or circular trajectory planning and hemispherical trajectory planning can be performed simultaneously.

[0090] In this embodiment, when performing circular trajectory planning, the following steps are included:

[0091] Step 1: Determine the radius of the circular trajectory and the height of the plane where the circular acquisition trajectory is located based on the initial TCP posture;

[0092] Step 2: Taking the initial workpiece position as the center of the circle, based on the radius of the circular trajectory and the height, plan to obtain a circular acquisition trajectory corresponding to the camera, and convert the circular acquisition trajectory corresponding to the camera to obtain a circular acquisition trajectory corresponding to the TCP; wherein the initial TCP posture is the first initial TCP posture or the second initial TCP posture; the initial workpiece position is the first initial workpiece position corresponding to the first initial TCP posture, or the second initial workpiece position corresponding to the second initial TCP posture.

[0093] Specifically, the circular collection trajectory planning process in this embodiment can be as follows: Figure 2 As shown, including:

[0094] Step 1: Determine the radius of the circular trajectory and the height of the plane where the circular acquisition trajectory is located based on the initial TCP posture;

[0095] In this step, since the camera is installed at the end of the TCP, the positional relationship between the camera and the TCP can be obtained in advance through hand-eye calibration. Therefore, after obtaining the initial TCP pose / first initial TCP pose using the teaching pendant, or placing the workpiece object at an offset angle based on the robot arm and obtaining the second initial TCP pose, the height of the camera and the initial pose of the camera are obtained, and then the radius of the plane circle when the optical center of the camera is aligned with the target workpiece object can be calculated based on the trigonometric relationship, and the height of the plane where the circular acquisition trajectory is located can be determined based on the camera height.

[0096] Step 2: Taking the initial workpiece position as the center of the circle and based on the radius of the circular trajectory and the height, determine a plurality of first photographing points;

[0097] In this step, a path point interpolation method can be used based on the center, radius and height to interpolate several first shooting points of the circular acquisition trajectory, that is, to obtain several position points (x, y, z).

[0098] Step 3: extracting the initial TCP pose to obtain the initial pose of the camera, and performing pose interpolation processing on each of the first photographing points based on the initial pose of the camera to obtain the first camera pose (Rx, Ry, Rz) corresponding to each photographing point;

[0099] In this step, the initial TCP pose extraction can be used to obtain the initial pose of the camera, and then a relatively smooth Euler angle (Rx, Ry, Rz) is interpolated using quaternion interpolation to obtain the first camera pose (Rx, Ry, Rz) corresponding to each position point / first shooting point.

[0100] Step 4: Based on each of the first photographing points and the first camera posture corresponding to each photographing point, a circular acquisition trajectory corresponding to the camera is obtained;

[0101] In this step, by combining the position information of each first photographing point and the posture information of the camera at the first photographing point, the trajectory (x, y, z, Rx, Ry, Rz) of the camera can be obtained.

[0102] In this embodiment, after obtaining the circular acquisition trajectory corresponding to the camera, the camera posture of each first photo point in the camera trajectory (x, y, z, Rx, Ry, Rz) can be converted through the hand-eye matrix to obtain the TCP end trajectory point that can be sent to the controller, that is, the TCP posture corresponding to each camera posture is obtained, thereby obtaining the circular acquisition trajectory (x, y, z, rx, ry, rz) corresponding to the TCP point.

[0103] In this embodiment, by adopting the above method to plan and obtain a circular acquisition trajectory, it can ensure that the trajectory planning is more reasonable and accurate, laying a foundation for subsequent rapid image collection / image acquisition.

[0104] In this embodiment, when performing hemispherical acquisition trajectory planning, the following steps are included:

[0105] Step 1: Determine the radius of the hemispherical trajectory based on the initial TCP pose;

[0106] Step 2: Taking the initial workpiece position as the center of the sphere and based on the radius of the hemispherical trajectory, plan to obtain a hemispherical acquisition trajectory corresponding to the camera, and convert the hemispherical acquisition trajectory corresponding to the camera to obtain a hemispherical acquisition trajectory corresponding to the TCP; wherein the initial TCP posture is the first initial TCP posture or the second initial TCP posture; the initial workpiece position is the first initial workpiece position corresponding to the first initial TCP posture, or the second initial workpiece position corresponding to the second initial TCP posture.

[0107] Specifically, the hemispherical acquisition trajectory planning process in this embodiment can be as follows: Figure 3 As shown, including:

[0108] Step 1: Determine the radius of the hemispherical trajectory based on the initial TCP pose;

[0109] In this step, since the camera is installed at the end of the TCP, the positional relationship between the camera and the TCP can be obtained in advance through hand-eye calibration. Therefore, after obtaining the initial TCP pose (the first initial TCP pose or the second initial TCP pose) using the teaching pendant, the height of the camera and the initial pose of the camera are obtained, and then the radius of the hemisphere when the optical center of the camera is aligned with the target workpiece object can be calculated based on the trigonometric relationship.

[0110] Step 2, determining a hemisphere with the initial workpiece position as the sphere center and based on the radius of the hemisphere trajectory;

[0111] Step 3, segmenting the spherical surface of the hemisphere to obtain a number of triangular facets;

[0112] In this step, the hemisphere can be segmented to obtain a number of triangular facets.

[0113] Step 4: determining a plurality of second photographing points based on each of the triangular facets;

[0114] Step 5: Based on each of the second photographing points, determine a second camera posture when the camera is located at each of the second photographing points;

[0115] In this step, the vertices of each triangular facet can be taken as the photographing points, and the posture can be adjusted to point to the center of the hemisphere to obtain the camera posture matrix corresponding to each second photographing point, thereby obtaining the second camera posture corresponding to each second photographing point.

[0116] Step 6: Based on each of the second photographing points and the second camera postures corresponding to each of the second photographing points, obtain a camera posture matrix of each of the second photographing points, that is, a hemispherical acquisition trajectory corresponding to the camera;

[0117] In this step, after obtaining the hemispherical acquisition trajectory corresponding to the camera, step 7 can be performed, that is, the camera pose matrix corresponding to each second shooting point in the hemispherical acquisition trajectory is converted to obtain the TCP pose matrix. Specifically. The camera pose of each second shooting point can be converted in combination with the hand-eye conversion matrix to obtain the TCP pose matrix corresponding to each camera pose matrix, and then each TCP pose matrix is ​​converted into an Euler angle pose (x, y, z, rx, ry, rz), thereby obtaining the hemispherical acquisition trajectory (x, y, z, rx, ry, rz) corresponding to the TCP point.

[0118] In this embodiment, by adopting the above method to plan and obtain a hemispherical acquisition trajectory, it can ensure that the trajectory planning is more reasonable and accurate, laying a foundation for subsequent rapid image collection / image acquisition.

[0119] On the basis of the above-mentioned embodiments, another embodiment of the present application provides an image acquisition method. In this embodiment, in order to ensure that the robot arm can safely move to each TCP point in the target acquisition trajectory, the target TCP posture corresponding to each TCP point in the target acquisition trajectory can be further screened. That is, based on the predetermined screening conditions, each target TCP posture in the target acquisition trajectory is screened to obtain the screened target acquisition trajectory, so as to perform image acquisition based on the selected target acquisition trajectory. In this embodiment, the predetermined screening conditions may include: whether the distance between each TCP point and the origin of the robot arm is less than the predetermined distance, so as to eliminate the TCP points that are too close to the origin of the robot arm to ensure that no collision occurs. The predetermined screening conditions may also include: whether the target TCP posture is reachable, and specifically, the joint angles corresponding to each target TCP posture can be inversely solved by the inverse kinematics of the robot arm to ensure that the corresponding TCP point can be reached. If there is no solution, it means that the TCP point is unreachable, so that the TCP point and the corresponding target TCP posture can be eliminated.

[0120] Based on the above embodiment, another embodiment of the present application provides an image acquisition method, such as Figure 4 As shown, the overall process of the image acquisition method / image acquisition method in this embodiment is as follows:

[0121] Step 1: Obtain the center position of the target workpiece object and the initial TCP pose of the teaching grasping point;

[0122] In this step, the center position basis represents the first initial workpiece position, and the initial TCP pose represents the first initial TCP pose.

[0123] Step 2: determine the shape attribute of the target workpiece object. When the shape attribute is a symmetrical shape, execute step 3; when the shape attribute is an asymmetrical shape, execute step 4;

[0124] Step 3: Based on the center position and the initial TCP posture, a circular acquisition trajectory planning for a single placement angle and a hemispherical acquisition trajectory planning for a single placement angle are performed, and image acquisition is performed to obtain a training data set;

[0125] Step 4: According to the orientation of the coordinate system, four placement angles (x, y, -x, -y) are given. Circular acquisition trajectory planning and hemispherical acquisition trajectory planning are performed at each placement angle to obtain circular acquisition trajectories and hemispherical acquisition trajectories corresponding to each placement angle, and then local image acquisition is performed to acquire images of 1 / 4 of the number of circular acquisition trajectories and 1 / 4 of the number of hemispherical acquisition trajectories. In this step, after completing one image acquisition / picture acquisition, the gripper can be controlled to reach the initial grasping point based on the initial TCP posture, and then the workpiece is grasped to offset the workpiece placement angle, and the workpiece object is placed at the current placement angle. At the same time, the current TCP posture of the robot arm can be used as the second initial TCP posture corresponding to the current placement angle, and the center point position of the workpiece object at the current placement angle is obtained based on the second initial TCP posture (i.e., the second initial workpiece position is obtained), that is, the GT value of the workpiece object at the current placement angle is calculated, and the next round of trajectory planning and image acquisition can be performed based on the second initial TCP posture and the second initial workpiece position corresponding to the current placement angle. This cycle can be repeated three times to complete the image acquisition / image acquisition.

[0126] The method in this embodiment can complete the path planning of the robot TCP through a teaching point, and then realize the full circle and hemisphere image acquisition based on the 2D camera set at the end of the robot. At the same time, based on the cooperation of the electric gripper, the workpiece can be autonomously grasped for offset at various angles. While ensuring that the image acquisition trajectory remains unchanged, the number of training sets is increased, and according to the posture conversion matrix of the gripper and TCP, the GT value (posture in the world coordinate system) of the center of the workpiece at each workpiece placement angle can be calculated, ensuring the accuracy of posture estimation. This method only requires a 2D camera and an end electric gripper to obtain training image data of multiple angles of the workpiece.

[0127] The present application provides an image acquisition device, such as Figure 5 As shown, including:

[0128] An acquisition module 11 is used to acquire, based on an initial placement angle of a target workpiece object, a first initial TCP pose of a tool center point TCP and a first initial workpiece position of the target workpiece object in a robot coordinate system when the robot arm is located at a taught grasping point to grasp the target workpiece object;

[0129] A determination module 12, used to determine the shape attribute of the target workpiece object;

[0130] A planning module 13, configured to perform trajectory planning based on the first initial TCP posture and the first initial workpiece position by adopting a trajectory planning method corresponding to the shape attribute to obtain a target acquisition trajectory;

[0131] The acquisition module 14 is used to control the robot arm TCP to move to the corresponding TCP point based on each target TCP posture in the target acquisition trajectory, so as to acquire a plurality of target images by performing image acquisition based on the camera arranged on the robot arm.

[0132] In the specific implementation of this embodiment, the shape attributes include: symmetrical shape and asymmetrical shape;

[0133] The planning module is used for, when the shape attribute is a symmetrical shape, performing circular trajectory planning and / or hemispherical trajectory planning based on the first initial TCP posture and the first initial workpiece position, obtaining a circular acquisition trajectory corresponding to the initial placement angle, and / or obtaining a hemispherical acquisition trajectory corresponding to the initial placement angle, so as to obtain the target acquisition trajectory;

[0134] When the shape attribute is a shape attribute of an asymmetric shape, the planning module is used to: determine several current placement angles, second initial TCP poses corresponding to each current placement angle, and second initial workpiece positions corresponding to each current placement angle based on the initial placement angle of the target workpiece object, the first initial TCP pose corresponding to the initial placement angle, and the first initial workpiece position corresponding to the initial placement angle; based on the first initial TCP pose, the first initial workpiece position, each second initial TCP pose, and each second initial workpiece position, respectively perform circular trajectory planning and / or hemispherical trajectory planning to obtain a circular acquisition trajectory corresponding to the initial placement angle and a circular acquisition trajectory corresponding to each current placement angle, and / or obtain a hemispherical acquisition trajectory corresponding to the initial placement angle and a hemispherical acquisition trajectory corresponding to each current placement angle, so as to obtain the target acquisition trajectory.

[0135] In the specific implementation process of this embodiment, the planning module is also used to determine the target acquisition ratio based on the number of circular acquisition trajectories or the number of hemispherical acquisition trajectories; determine the first sub-trajectory corresponding to each circular acquisition trajectory based on each of the circular acquisition trajectories according to the target acquisition ratio; determine the second sub-trajectory corresponding to each of the hemispherical acquisition trajectories based on each of the hemispherical acquisition trajectories according to the target acquisition ratio; determine the target acquisition trajectory based on each of the first sub-trajectories and / or each of the second sub-trajectories.

[0136] In the specific implementation process of this embodiment, the planning module specifically includes a first planning unit for performing circular trajectory planning. When performing circular trajectory planning, the first planning unit is specifically used to: determine the radius of the circular trajectory and the height of the plane where the circular acquisition trajectory is located based on the initial TCP posture; take the initial workpiece position as the center of the circle, plan to obtain a circular acquisition trajectory corresponding to the camera based on the radius of the circular trajectory and the height, and convert the circular acquisition trajectory corresponding to the camera to obtain a circular acquisition trajectory corresponding to TCP; the initial TCP posture is the first initial TCP posture or the second initial TCP posture; the initial workpiece position is the first initial workpiece position corresponding to the first initial TCP posture, or the second initial workpiece position corresponding to the second initial TCP posture.

[0137] In the specific implementation process of this embodiment, the first planning unit is specifically used to: determine a number of first photographing points with the initial workpiece position as the center of the circle, based on the radius of the circular trajectory and the height; perform posture interpolation processing on each of the first photographing points based on the initial camera posture corresponding to the initial TCP posture, and obtain the first camera posture corresponding to each photographing point; based on each of the first photographing points and the first camera posture corresponding to each photographing point, obtain a circular acquisition trajectory corresponding to the camera.

[0138] In the specific implementation process of this embodiment, the planning module specifically includes a second planning unit for performing hemispherical trajectory planning. When performing hemispherical trajectory planning, the second planning unit is specifically used to: determine the radius of the hemispherical trajectory based on the initial TCP posture; plan to obtain a hemispherical acquisition trajectory corresponding to the camera based on the radius of the hemispherical trajectory with the initial workpiece position as the center of the sphere, and obtain a hemispherical acquisition trajectory corresponding to TCP based on the hemispherical acquisition trajectory corresponding to the camera; the initial TCP posture is the first initial TCP posture or the second initial TCP posture; the initial workpiece position is the first initial workpiece position corresponding to the first initial TCP posture, or the second initial workpiece position corresponding to the second initial TCP posture.

[0139] In the specific implementation process of this embodiment, the second planning unit is specifically used to: determine a hemisphere with the initial workpiece position as the sphere center and based on the radius of the hemisphere trajectory; segment the spherical surface of the hemisphere to obtain a plurality of triangular facets; determine a plurality of second photographing points based on each of the triangular facets; determine a second camera posture when the camera is located at each of the second photographing points based on each of the second photographing points; obtain a hemispherical acquisition trajectory corresponding to the camera based on each of the second photographing points and the second camera posture corresponding to each of the second photographing points.

[0140] In the specific implementation process of this embodiment, the image acquisition device also includes a screening module, which is used to: after obtaining the target acquisition trajectory, filter each target TCP posture in the target acquisition trajectory based on a predetermined screening condition to obtain a filtered target acquisition trajectory, so as to perform image acquisition based on the selected target acquisition trajectory.

[0141] The image acquisition device in the present application completes the path planning of the robot arm TCP by adopting a trajectory planning method corresponding to the shape attributes according to the different shape attributes of the workpiece object, which can make the target acquisition trajectory obtained by planning more accurate and reasonable, and subsequently, image acquisition can be carried out efficiently based on the target acquisition trajectory.

[0142] Another embodiment of the present application provides an electronic device, such as Figure 6 As shown, at least a memory 1 and a processor 2 are included, the memory 1 stores a computer program, and the processor 2 implements the following method steps when executing the computer program on the memory 1:

[0143] Step 1: based on the initial placement angle of the target workpiece object, obtaining a first initial TCP pose of the tool center point TCP and a first initial workpiece position of the target workpiece object in the robot coordinate system when the robot arm is located at the taught grasping point to grasp the target workpiece object;

[0144] Step 2: determining the shape attributes of the target workpiece object;

[0145] Step 3: Based on the first initial TCP posture and the first initial workpiece position, trajectory planning is performed using a trajectory planning method corresponding to the shape attribute to obtain a target acquisition trajectory;

[0146] Step 4: Based on the TCP poses of each target in the target acquisition trajectory, the robot arm TCP is controlled to move to the corresponding TCP point position, and image acquisition is performed based on the camera set on the robot arm to obtain a number of target images.

[0147] The specific implementation process of the above method steps can refer to the embodiments of any of the above image acquisition methods, and this embodiment will not be repeated here.

[0148] The electronic device in the present application completes the path planning of the robot arm TCP by adopting a trajectory planning method corresponding to the shape attributes according to the different shape attributes of the workpiece object, which can make the target acquisition trajectory obtained by planning more accurate and reasonable, and subsequently, image acquisition can be carried out efficiently based on the target acquisition trajectory.

[0149] The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application. The protection scope of the present application is defined by the claims. Those skilled in the art may make various modifications or equivalent substitutions to the present application within the essence and protection scope of the present application, and such modifications or equivalent substitutions shall also be deemed to fall within the protection scope of the present application.

Claims

1. An image acquisition method, characterized in that: include: Based on the initial placement angle of the target workpiece object, obtaining a first initial TCP pose of the tool center point TCP and a first initial workpiece position of the target workpiece object in the robot coordinate system when the robot arm is located at the taught grasping point to grasp the target workpiece object; Determine shape attributes of the target workpiece object, the shape attributes including: symmetrical shape and asymmetrical shape; Based on the first initial TCP posture and the first initial workpiece position, performing trajectory planning using a trajectory planning method corresponding to the shape attribute to obtain a target acquisition trajectory; Based on each target TCP pose in the target acquisition trajectory, control the robot arm TCP to move to the corresponding TCP point position, and acquire images based on the camera set on the robot arm to obtain a number of target images; The step of performing trajectory planning based on the first initial TCP posture and the first initial workpiece position using a trajectory planning method corresponding to the shape attribute to obtain a target acquisition trajectory specifically includes: When the shape attribute is a symmetrical shape, based on the first initial TCP posture and the first initial workpiece position, circular trajectory planning and / or hemispherical trajectory planning are performed to obtain a circular acquisition trajectory corresponding to the initial placement angle, and / or a hemispherical acquisition trajectory corresponding to the initial placement angle, so as to obtain the target acquisition trajectory; When the shape attribute is a shape attribute of an asymmetric shape, based on the initial placement angle of the target workpiece object, the first initial TCP pose corresponding to the initial placement angle, and the first initial workpiece position corresponding to the initial placement angle, determine a number of current placement angles, second initial TCP poses corresponding to each current placement angle, and second initial workpiece positions corresponding to each current placement angle; Based on the first initial TCP pose, the first initial workpiece position, each of the second initial TCP poses, and each of the second initial workpiece positions, circular trajectory planning and / or hemispherical trajectory planning are performed respectively to obtain a circular acquisition trajectory corresponding to the initial placement angle and a circular acquisition trajectory corresponding to each of the current placement angles, and / or to obtain a hemispherical acquisition trajectory corresponding to the initial placement angle and a hemispherical acquisition trajectory corresponding to each of the current placement angles, so as to obtain the target acquisition trajectory; After obtaining a circular collection trajectory corresponding to the initial placement angle and a circular collection trajectory corresponding to each of the current placement angles, and / or obtaining a hemispherical collection trajectory corresponding to the initial placement angle and a hemispherical collection trajectory corresponding to each of the current placement angles, the method further includes: Determining a target acquisition ratio based on the number of circular acquisition trajectories or the number of hemispherical acquisition trajectories; Based on each of the circular collection trajectories and according to the target collection ratio, determining a first sub-trajectory corresponding to each of the circular collection trajectories; Determining, based on each of the hemispherical acquisition trajectories and in accordance with the target acquisition ratio, a second sub-trajectory corresponding to each of the hemispherical acquisition trajectories; The target acquisition trajectory is determined based on each of the first sub-trajectories and / or each of the second sub-trajectories.

2. The method according to claim 1, characterized in that The circular trajectory planning comprises: Determine the radius of the circular trajectory and the height of the plane where the circular acquisition trajectory is located based on the initial TCP posture; Taking the initial workpiece position as the center of the circle, based on the radius of the circular trajectory and the height, planning to obtain a circular acquisition trajectory corresponding to the camera, and converting the circular acquisition trajectory corresponding to the camera to obtain a circular acquisition trajectory corresponding to the TCP; The initial TCP posture is a first initial TCP posture or a second initial TCP posture; the initial workpiece position is a first initial workpiece position corresponding to the first initial TCP posture, or a second initial workpiece position corresponding to the second initial TCP posture.

3. The method according to claim 2, characterized in that The method of taking the initial workpiece position as the center of the circle and planning to obtain a circular acquisition trajectory corresponding to the camera based on the radius of the circular trajectory and the height specifically includes: Taking the initial workpiece position as the center of the circle and based on the radius of the circular trajectory and the height, determining a plurality of first photographing points; Based on the initial camera posture corresponding to the initial TCP posture, performing posture interpolation processing on each of the first photographing points to obtain a first camera posture corresponding to each photographing point; Based on each of the first photographing points and the first camera posture corresponding to each of the photographing points, a circular collection trajectory corresponding to the camera is obtained.

4. The method according to claim 1, characterized in that The hemispherical trajectory planning comprises: Determine the radius of the hemispherical trajectory based on the initial TCP pose; Taking the initial workpiece position as the sphere center and based on the radius of the hemispherical trajectory, planning to obtain a hemispherical acquisition trajectory corresponding to the camera, and converting the hemispherical acquisition trajectory corresponding to the camera to obtain a hemispherical acquisition trajectory corresponding to the TCP; The initial TCP posture is a first initial TCP posture or a second initial TCP posture; the initial workpiece position is a first initial workpiece position corresponding to the first initial TCP posture, or a second initial workpiece position corresponding to the second initial TCP posture.

5. The method according to claim 4, characterized in that Taking the initial workpiece position as the sphere center and based on the radius of the hemispherical trajectory, a hemispherical acquisition trajectory corresponding to the camera is planned, specifically including: Determine a hemispherical body with the initial workpiece position as the sphere center and based on the radius of the hemispherical trajectory; Segmenting the spherical surface of the hemisphere to obtain a plurality of triangular facets; Determine a plurality of second photographing points based on each of the triangular facets; Based on each of the second photographing points, determining a second camera posture when the camera is located at each of the second photographing points; Based on each of the second photographing points and the second camera postures corresponding to each of the second photographing points, a hemispherical collection trajectory corresponding to the camera is obtained.

6. The method according to any one of claims 1 to 5, characterized in that: After obtaining the target acquisition trajectory, the method further includes: The TCP postures of the targets in the target acquisition trajectory are screened based on a predetermined screening condition to obtain a screened target acquisition trajectory, so as to perform image acquisition based on the screened target acquisition trajectory.

7. An image acquisition device, based on the image acquisition method according to any one of claims 1 to 6, characterized in that: include: An acquisition module is used to acquire, based on an initial placement angle of a target workpiece object, a first initial TCP pose of a tool center point TCP and a first initial workpiece position of the target workpiece object in a robot coordinate system when the robot arm is located at a taught grasping point to grasp the target workpiece object; A determination module, used to determine the shape attribute of the target workpiece object; A planning module, configured to perform trajectory planning based on the first initial TCP posture and the first initial workpiece position by adopting a trajectory planning method corresponding to the shape attribute to obtain a target acquisition trajectory; The acquisition module is used to control the robot arm TCP to move to the corresponding TCP point based on the target TCP postures in the target acquisition trajectory, so as to acquire a number of target images based on the camera set on the robot arm.

8. An electronic device, characterized in that: The device at least comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the image acquisition method according to any one of claims 1 to 6 when executing the computer program on the memory.