CN115366105A - Workpiece grabbing method, device, electronic device and storage medium - Google Patents

Workpiece grabbing method, device, electronic device and storage medium Download PDF

Info

Publication number
CN115366105A
CN115366105A CN202211052358.XA CN202211052358A CN115366105A CN 115366105 A CN115366105 A CN 115366105A CN 202211052358 A CN202211052358 A CN 202211052358A CN 115366105 A CN115366105 A CN 115366105A
Authority
CN
China
Prior art keywords
workpiece
image
calibration
translation
coordinate system
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.)
Pending
Application number
CN202211052358.XA
Other languages
Chinese (zh)
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.)
Beijing Siemens Cerberus Electronics Ltd
Original Assignee
Beijing Siemens Cerberus Electronics 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 Beijing Siemens Cerberus Electronics Ltd filed Critical Beijing Siemens Cerberus Electronics Ltd
Priority to CN202211052358.XA priority Critical patent/CN115366105A/en
Publication of CN115366105A publication Critical patent/CN115366105A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1694Programme controls characterised by use of sensors other than normal servo-feedback from position, speed or acceleration sensors, perception control, multi-sensor controlled systems, sensor fusion
    • B25J9/1697Vision controlled systems
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J13/00Controls for manipulators
    • B25J13/08Controls for manipulators by means of sensing devices, e.g. viewing or touching devices
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1602Programme controls characterised by the control system, structure, architecture
    • B25J9/161Hardware, e.g. neural networks, fuzzy logic, interfaces, processor
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls
    • B25J9/1612Programme controls characterised by the hand, wrist, grip control
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Robotics (AREA)
  • Mechanical Engineering (AREA)
  • Automation & Control Theory (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Fuzzy Systems (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Orthopedic Medicine & Surgery (AREA)
  • Manipulator (AREA)

Abstract

本申请实施例提供了一种工件抓取方法、装置、电子设备和存储介质,该工件抓取方法包括:获取相机采集到的第一工件图像;从第一工件图像中确定至少一个第一特征点;根据至少一个第一特征点的像素坐标和标定信息,确定第一工件在机械臂的空间坐标系中的第一空间坐标;根据第一空间坐标生成控制信息,并将控制信息发送给机械臂,以使机械臂根据控制信息对第一工件进行抓取。本方案通过像素坐标系与空间坐标系之间的映射关系,识别工件所在的位置,并控制机械臂自动对工件进行抓取,可以解决在对对工件进行抓取的过程中,需要人工将目标对象放置的位置摆放到特定的角度和位置的方法,需要耗费较长的时间,导致生产效率较低的问题。

Figure 202211052358

Embodiments of the present application provide a workpiece grasping method, device, electronic equipment, and storage medium. The workpiece grasping method includes: acquiring a first workpiece image captured by a camera; determining at least one first feature from the first workpiece image point; according to the pixel coordinates and calibration information of at least one first feature point, determine the first space coordinate of the first workpiece in the space coordinate system of the manipulator; generate control information according to the first space coordinate, and send the control information to the machine arm, so that the robotic arm grabs the first workpiece according to the control information. This solution uses the mapping relationship between the pixel coordinate system and the space coordinate system to identify the position of the workpiece, and controls the robotic arm to automatically grab the workpiece, which can solve the problem of manually moving the target during the process of grabbing the workpiece. The method of placing the object at a specific angle and position takes a long time, resulting in a problem of low production efficiency.

Figure 202211052358

Description

工件抓取方法、装置、电子设备和存储介质Workpiece grabbing method, device, electronic device and storage medium

技术领域technical field

本申请实施例涉及计算机视觉技术领域,尤其涉及一种工件抓取方法、装置、电子设备和存储介质。The embodiments of the present application relate to the technical field of computer vision, and in particular to a workpiece grasping method, device, electronic equipment, and storage medium.

背景技术Background technique

在工件生产过程中,为了降低人工成本和提高安全性,需要用机械臂代替人工对工件进行抓取,以对工件进行转运、翻转、焊接等。通过模拟人眼看到物体的方式,并驱动机械臂以完成对工件的抓取。但是机械臂的抓取效果相对于人工抓取效果,存在较大差异。In the production process of workpieces, in order to reduce labor costs and improve safety, it is necessary to use robotic arms instead of manual grasping of workpieces to transfer, flip, weld, etc. the workpieces. By simulating the way the human eye sees objects, and driving the robotic arm to complete the grasping of the workpiece. However, the grasping effect of the robotic arm is quite different from that of manual grasping.

目前,为了处理上述差异,一种常见的方法是将工件放置于机械臂的正下方,通过人工将工件放置的位置摆放到特定的角度和位置,以保证机械臂的抓取效果。At present, in order to deal with the above differences, a common method is to place the workpiece directly under the robotic arm, and manually place the workpiece at a specific angle and position to ensure the gripping effect of the robotic arm.

然而,使用人工将工件放置的位置摆放到特定的角度和位置的方法,需要耗费较长的时间,导致生产效率较低。However, it takes a long time to manually arrange the position of the workpiece to a specific angle and position, resulting in low production efficiency.

发明内容Contents of the invention

为了解决上述技术问题,本发明实施例提供了一种工件抓取方法、装置、电子设备和存储介质,以至少解决或缓解上述问题。In order to solve the above-mentioned technical problems, embodiments of the present invention provide a workpiece grasping method, device, electronic equipment, and storage medium, so as to at least solve or alleviate the above-mentioned problems.

根据本申请实施例的第一方面,提供了一种工件抓取方法,包括:获取相机采集到的第一工件图像,其中,所述第一工件图像包括位于载物台上的第一工件的图像;从所述第一工件图像中确定至少一个第一特征点,其中,所述第一特征点用于指示所述第一工件的图像在所述第一工件图像中的位置;根据所述至少一个第一特征点的像素坐标和标定信息,确定所述第一工件在机械臂的空间坐标系中的第一空间坐标,其中,所述标定信息用于指示所述相机所采集图像的像素坐标系与所述空间坐标系之间的映射关系;根据所述第一空间坐标生成控制信息,并将所述控制信息发送给所述机械臂,以使所述机械臂根据所述控制信息对所述第一工件进行抓取。According to the first aspect of the embodiments of the present application, there is provided a workpiece grasping method, including: acquiring a first workpiece image captured by a camera, wherein the first workpiece image includes an image of the first workpiece located on the stage image; determining at least one first feature point from the first workpiece image, wherein the first feature point is used to indicate the position of the image of the first workpiece in the first workpiece image; according to the The pixel coordinates and calibration information of at least one first feature point determine the first spatial coordinates of the first workpiece in the spatial coordinate system of the manipulator, wherein the calibration information is used to indicate the pixels of the image captured by the camera The mapping relationship between the coordinate system and the space coordinate system; generate control information according to the first space coordinates, and send the control information to the robot arm, so that the robot arm can control the robot according to the control information The first workpiece is gripped.

根据本申请实施例的第二方面,提供了一种对象抓取装置,包括:获取模块,用于获取相机采集到的第一工件图像,其中,所述第一工件图像包括位于载物台上的第一工件的图像;提取模块,用于从所述第一工件图像中确定至少一个第一特征点,其中,所述第一特征点用于指示所述第一工件的图像在所述第一工件图像中的位置;确定模块,用于根据所述至少一个第一特征点的像素坐标和标定信息,确定所述第一工件在机械臂的空间坐标系中的第一空间坐标,其中,所述标定信息用于指示所述相机所采集图像的像素坐标系与所述空间坐标系之间的映射关系;抓取模块,用于根据所述第一空间坐标生成控制信息,并将所述控制信息发送给所述机械臂,以使所述机械臂根据所述控制信息对所述第一工件进行抓取。According to a second aspect of the embodiments of the present application, there is provided an object grasping device, including: an acquisition module, configured to acquire a first workpiece image captured by a camera, wherein the first workpiece image includes An image of the first workpiece; an extraction module, configured to determine at least one first feature point from the image of the first workpiece, wherein the first feature point is used to indicate that the image of the first workpiece is in the image of the first workpiece A position in the workpiece image; a determination module, configured to determine the first spatial coordinates of the first workpiece in the spatial coordinate system of the robotic arm according to the pixel coordinates and the calibration information of the at least one first feature point, wherein, The calibration information is used to indicate the mapping relationship between the pixel coordinate system of the image captured by the camera and the space coordinate system; the capture module is used to generate control information according to the first space coordinates, and the The control information is sent to the robot arm, so that the robot arm grabs the first workpiece according to the control information.

根据本申请实施例的第三方面,提供了一种电子设备,包括:处理器、通信接口、存储器和通信总线,处理器、存储器和通信接口通过通信总线完成相互间的通信;存储器用于存放至少一可执行指令,可执行指令使处理器执行如上述多个方法实施例中的任一方法对应的操作。According to a third aspect of the embodiments of the present application, an electronic device is provided, including: a processor, a communication interface, a memory, and a communication bus, and the processor, the memory, and the communication interface complete mutual communication through the communication bus; the memory is used to store At least one executable instruction, the executable instruction causes the processor to execute the operation corresponding to any method in the above multiple method embodiments.

根据本申请实施例的第四方面,提供了一种计算机存储介质,其上存储有计算机程序,该程序被处理器执行时实现如上述多个方法实施例中的任一方法。According to a fourth aspect of the embodiments of the present application, a computer storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, any method in the above-mentioned multiple method embodiments is implemented.

根据本申请实施例的第五方面,提供了一种计算机程序产品,包括计算机指令,计算机指令指示计算设备执行如上述多个方法实施例中的任一方法对应的操作。According to a fifth aspect of the embodiments of the present application, a computer program product is provided, including computer instructions, and the computer instructions instruct a computing device to perform operations corresponding to any one of the above method embodiments.

由上述技术方案可知,从第一工件图像中确定的至少一个第一特征点,能够指示第一工件的图像在第一工件图像中的位置,标定信息可以指示相机所采集图像的像素坐标系与机械臂的空间坐标系的映射关系,通过标定信息和第一特征点的像素坐标,能够确定第一工件在机械臂的空间坐标系中的位置,进而可以根据第一工件在空间坐标系中的位置生成控制信息,将控制信息发给机械臂后,机械臂根据控制信息对第一工件进行抓取。可见,由于可以确定工件在机械臂的空间坐标系中的位置,进而机械臂可以对随意放置在载物台上的工件进行自动化抓取,无需将按特定的角度和位置将工件放置到载物台上,从而可以节省将工件放置到载物台上所需消耗的时间,进而提高对工件进行抓取的效率。It can be seen from the above technical solution that at least one first feature point determined from the first workpiece image can indicate the position of the image of the first workpiece in the first workpiece image, and the calibration information can indicate the pixel coordinate system of the image collected by the camera and The mapping relationship of the space coordinate system of the manipulator, through the calibration information and the pixel coordinates of the first feature point, can determine the position of the first workpiece in the space coordinate system of the manipulator, and then according to the position of the first work piece in the space coordinate system The position generates control information, and after sending the control information to the robot arm, the robot arm grabs the first workpiece according to the control information. It can be seen that since the position of the workpiece in the spatial coordinate system of the manipulator can be determined, the manipulator can automatically grab the workpiece randomly placed on the stage without placing the workpiece on the load at a specific angle and position. on the stage, thereby saving the time required to place the workpiece on the stage, thereby improving the efficiency of grasping the workpiece.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅是本申请实施例中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments described in the embodiments of the present application, and those skilled in the art can also obtain other drawings based on these drawings.

图1是本申请一个实施例的工件抓取方法的流程图;Fig. 1 is the flowchart of the workpiece grasping method of an embodiment of the present application;

图2是本申请一个实施例的第二空间坐标获取方法的流程图;FIG. 2 is a flow chart of a second spatial coordinate acquisition method according to an embodiment of the present application;

图3是本申请一个实施例的偏移量确定方法的流程图;FIG. 3 is a flowchart of a method for determining an offset amount according to an embodiment of the present application;

图4是本申请一个实施例的标定信息确定方法的流程图;FIG. 4 is a flowchart of a method for determining calibration information according to an embodiment of the present application;

图5是本申请一个实施例的机械臂运动顺序的示意图;Fig. 5 is a schematic diagram of the motion sequence of the mechanical arm according to an embodiment of the present application;

图6是本申请一个实施例的机械臂运动点位坐标的示意图;Fig. 6 is a schematic diagram of the coordinates of the movement point of the mechanical arm according to an embodiment of the present application;

图7是本申请一个实施例的对象抓取装置的示意图;Fig. 7 is a schematic diagram of an object grabbing device according to an embodiment of the present application;

图8是本申请一个实施例的电子设备的示意图。Fig. 8 is a schematic diagram of an electronic device according to an embodiment of the present application.

附图标记列表:List of reference signs:

100:工件抓取方法 200:控制信息生成方法 300:偏移量确定方法100: Workpiece picking method 200: Control information generation method 300: Offset determination method

400:标定信息确定方法 700:对象抓取装置 701:获取模块400: Calibration information determination method 700: Object grabbing device 701: Obtaining module

702:提取模块 703:确定模块 704:抓取模块702: extracting module 703: determining module 704: grabbing module

800:电子设备 801:处理器 802:通信接口800: Electronic equipment 801: Processor 802: Communication interface

803:储存器 804:通信总线 805:程序803: memory 804: communication bus 805: program

101:获取相机采集到的第一工件图像101: Obtain the first workpiece image captured by the camera

102:从第一工件图像中确定至少一个第一特征点102: Determine at least one first feature point from the first workpiece image

103:确定第一工件在机械臂的空间坐标系中的第一空间坐标103: Determine the first space coordinate of the first workpiece in the space coordinate system of the robotic arm

104:根据第一空间坐标生成控制信息,并将控制信息发送给机械臂104: Generate control information according to the first space coordinates, and send the control information to the robotic arm

201:获取预先由相机采集的第二工件图像201: Acquiring the second workpiece image pre-collected by the camera

202:从第二工件图像中确定至少一个第二特征点202: Determine at least one second feature point from the second workpiece image

203:确定第一工件在空间坐标系中的第二空间坐标203: Determine the second space coordinate of the first workpiece in the space coordinate system

301:确定第一工件在空间坐标系中的位置相对应标准位置的X轴位移偏移量301: Determine the X-axis displacement offset of the position of the first workpiece in the space coordinate system corresponding to the standard position

302:确定第一工件在空间坐标系中的位置相对于标准位置的Y轴位移偏移量302: Determine the Y-axis displacement offset of the position of the first workpiece in the spatial coordinate system relative to the standard position

303:确定第一工件在空间坐标系中的位置相对于标准位置的Z轴旋转偏移量303: Determine the Z-axis rotation offset of the position of the first workpiece in the spatial coordinate system relative to the standard position

401:确定位于第二工件上的标定参考点401: Determine the calibration reference point on the second workpiece

402:控制机械臂在空间坐标系中沿X轴和/或Y轴方向进行N次平移402: Control the manipulator to perform N translations along the X-axis and/or Y-axis in the spatial coordinate system

403:获取机械臂每次平移后相机采集的平移标定图像403: Obtain the translation calibration image collected by the camera after each translation of the robotic arm

404:控制机械臂在空间坐标系中绕Z轴进行M次旋转404: Control the robotic arm to rotate M times around the Z axis in the space coordinate system

405:获取机械臂每次旋转后相机采集的旋转标定图像405: Obtain the rotation calibration image collected by the camera after each rotation of the robotic arm

406:确定标定信息406: Determine calibration information

具体实施方式Detailed ways

为了使本领域的人员更好地理解本申请实施例中的技术方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅是本申请实施例一部分实施例,而不是全部的实施例。基于本申请实施例中的实施例,本领域普通技术人员所获得的所有其他实施例,都应当属于本申请实施例保护的范围。In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described The embodiments are only some of the embodiments of the present application, but not all of them. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in the embodiments of the present application shall fall within the protection scope of the embodiments of the present application.

工件抓取方法Workpiece grabbing method

图1是本申请一个实施例的工件抓取方法100,如图1所示,该工件抓取方法100包括如下步骤:Fig. 1 is a workpiece grasping method 100 according to an embodiment of the present application. As shown in Fig. 1, the workpiece grasping method 100 includes the following steps:

步骤101、获取相机采集到的第一工件图像。Step 101 , acquiring a first workpiece image captured by a camera.

第一工件图像包括第一工件的图像,第一工件可以是电路板等工件。在采集第一工件图像时,将第一工件图像放置于载物台上,在机械臂运动至载物台上方后,安装在机械臂上并与机械臂同步运动的相机对第一工件进行图像采集,获得第一工件图像。The first workpiece image includes an image of a first workpiece, and the first workpiece may be a workpiece such as a circuit board. When collecting the image of the first workpiece, the image of the first workpiece is placed on the stage, and after the robot arm moves above the stage, the camera installed on the robot arm and moving synchronously with the robot arm takes an image of the first workpiece Acquisition to obtain the first workpiece image.

步骤102、从第一工件图像中确定至少一个第一特征点。Step 102. Determine at least one first feature point from the first workpiece image.

在获取到相机采集到的待抓取的第一工件图像后,需要确定第一工件的图像在第一工件图像中的位置。从第一工件图像中确定至少一个第一特征点,第一特征点指的是第一工件图像中灰度值发生剧烈变化的点或者在第一工件图像边缘上曲率较大的点。第一特征点可以指示待抓取的第一工件的图像在第一工件图像中的位置。After the image of the first workpiece to be captured captured by the camera is acquired, it is necessary to determine the position of the image of the first workpiece in the image of the first workpiece. Determine at least one first feature point from the first workpiece image, the first feature point refers to a point in the first workpiece image where the gray value changes sharply or a point with a large curvature on the edge of the first workpiece image. The first feature point may indicate the position of the image of the first workpiece to be captured in the image of the first workpiece.

步骤103、确定第一工件在机械臂的空间坐标系中的第一空间坐标。Step 103. Determine the first space coordinate of the first workpiece in the space coordinate system of the robot arm.

机械臂具有相对应的空间坐标系,基于其空间坐标系机械臂可以从一个位置移动到另一个位置。为了实现机械臂对第一工件进行抓取,需要确定第一工件在机械臂的空间坐标系中的第一空间坐标,以便机械臂根据第一工件的第一空间坐标确定第一工件在空间坐标系中的位置,进而对第一工件进行抓取。The robotic arm has a corresponding spatial coordinate system based on which the robotic arm can move from one location to another. In order to enable the robot arm to grab the first workpiece, it is necessary to determine the first space coordinate of the first workpiece in the space coordinate system of the robot arm, so that the robot arm can determine the space coordinate of the first workpiece according to the first space coordinate of the first workpiece position in the system, and then grab the first workpiece.

标定信息可以指示相机所采集图像的像素坐标系与机械臂的空间坐标系之间的映射关系,由于机械臂与相机是同步运动的,所以标定信息是固定的。由于各第一特征点的像素坐标可以指示第一工件的图像在第一工件图像中的位置,所以根据各第一特征点的像素坐标和标定信息,可以将各第一特征点的像素坐标变换为空间坐标系中的空间坐标,进而获得可以指示第一工作在空间坐标系中的第一空间坐标。The calibration information can indicate the mapping relationship between the pixel coordinate system of the image captured by the camera and the spatial coordinate system of the robot arm. Since the robot arm and the camera move synchronously, the calibration information is fixed. Since the pixel coordinates of each first feature point can indicate the position of the image of the first workpiece in the first workpiece image, according to the pixel coordinates and calibration information of each first feature point, the pixel coordinates of each first feature point can be transformed into is the space coordinate in the space coordinate system, and then obtains the first space coordinate that can indicate that the first job is in the space coordinate system.

步骤104、根据第一空间坐标生成控制信息,并将控制信息发送给机械臂。Step 104: Generate control information according to the first space coordinates, and send the control information to the robotic arm.

第一空间坐标指示第一工件在空间坐标系中的位置,根据第一空间坐标可以生成相应的控制信息,将控制信息发送给机械臂后,机械臂可以根据控制信息运动至合适的位置对第一工件进行抓取。控制信息包括但不限于抓取、平移、旋转、伸缩等指令。The first space coordinate indicates the position of the first workpiece in the space coordinate system. According to the first space coordinate, the corresponding control information can be generated. After the control information is sent to the robot arm, the robot arm can move to the appropriate position according to the control information for the first workpiece. A workpiece is grasped. Control information includes, but is not limited to, commands such as grabbing, translation, rotation, and stretching.

在本申请实施例中,从第一工件图像中确定的至少一个第一特征点,能够指示第一工件的图像在第一工件图像中的位置,标定信息可以指示相机所采集图像的像素坐标系与机械臂的空间坐标系的映射关系,通过标定信息和第一特征点的像素坐标,能够确定第一工件在机械臂的空间坐标系中的位置,进而可以根据第一工件在空间坐标系中的位置生成控制信息,将控制信息发给机械臂后,机械臂根据控制信息对第一工件进行抓取。可见,由于可以确定工件在机械臂的空间坐标系中的位置,进而机械臂可以对随意放置在载物台上的工件进行自动化抓取,无需将按特定的角度和位置将工件放置到载物台上,从而可以节省将工件放置到载物台上所需消耗的时间,进而提高对工件进行抓取的效率。In the embodiment of the present application, the at least one first feature point determined from the first workpiece image can indicate the position of the image of the first workpiece in the first workpiece image, and the calibration information can indicate the pixel coordinate system of the image collected by the camera The mapping relationship with the space coordinate system of the manipulator, through the calibration information and the pixel coordinates of the first feature point, the position of the first workpiece in the space coordinate system of the manipulator can be determined, and then according to the position of the first workpiece in the space coordinate system The position of the control information is generated, and after the control information is sent to the robot arm, the robot arm grabs the first workpiece according to the control information. It can be seen that since the position of the workpiece in the spatial coordinate system of the manipulator can be determined, the manipulator can automatically grab the workpiece randomly placed on the stage without placing the workpiece on the load at a specific angle and position. on the stage, thereby saving the time required to place the workpiece on the stage, thereby improving the efficiency of grasping the workpiece.

在一种可能的实现方式中,在根据第一空间坐标生成控制信息时,可以获取预先确定的第二空间坐标,第二空间坐标用于指示第一工件位于载物台上标准位置时第一工件在空间坐标系中的坐标,然后根据第一空间坐标和第二空间坐标,确定第一工件在空间坐标系中的位置相对于标准位置的偏移量,进而将该偏移量确定为控制信息。In a possible implementation manner, when the control information is generated according to the first space coordinates, a predetermined second space coordinates may be obtained, and the second space coordinates are used to indicate that the first workpiece is located at the standard position on the stage. The coordinates of the workpiece in the space coordinate system, and then according to the first space coordinates and the second space coordinates, determine the offset of the position of the first workpiece in the space coordinate system relative to the standard position, and then determine the offset as the control information.

应理解,第二空间坐标是预先获得的,指示了如果第一工件位于载物台上的标准位置时,第一工件在空间坐标系中的坐标。可以预先将与待抓取的第一工件相同类型的工件放置到载物台上的标准位置,以确定第二空间坐标,在实际控制机械臂对第一工件进行抓取的过程中,不必每次抓取都将第一工件放置到载物台上的标准位置。It should be understood that the second space coordinates are obtained in advance and indicate the coordinates of the first workpiece in the space coordinate system when the first workpiece is located at a standard position on the stage. The workpiece of the same type as the first workpiece to be grasped can be placed in the standard position on the stage in advance to determine the second space coordinates. In the process of actually controlling the mechanical arm to grasp the first workpiece, it is not necessary to Each grab places the first workpiece in a standard position on the stage.

由于而第二空间坐标指示了位于标准位置的第一工件在空间坐标系中的位置,第一空间坐标指示第一工件在空间坐标系中的实际位置,所以可以根据第一空间坐标和第二空间坐标,确定第一工件在空间坐标系中的实际位置相对于标准位置的偏移量。Since the second spatial coordinate indicates the position of the first workpiece in the standard position in the spatial coordinate system, and the first spatial coordinate indicates the actual position of the first workpiece in the spatial coordinate system, it can be based on the first spatial coordinate and the second Space coordinates, determine the offset of the actual position of the first workpiece in the space coordinate system relative to the standard position.

针对标准位置预设机械臂的运动流程,当机械臂按照该运动流程运动至载物台上方时,可以对放置于标准位置的发第一工件进行抓取。在实际抓取工件的过程中,将第一工件在空间坐标系中的实际位置相对于标准位置的偏移量作为控制信息发送给机械臂,机械臂可以根据控制信息在预设的运动流程上进行相应的平移或旋转,以对放置在载物台上任意位置第一工件进行抓取。The movement process of the robotic arm is preset for the standard position. When the mechanical arm moves above the stage according to the movement process, it can grab the first workpiece placed in the standard position. In the process of actually grabbing the workpiece, the offset of the actual position of the first workpiece in the space coordinate system relative to the standard position is sent to the robotic arm as control information, and the robotic arm can move on the preset motion process according to the control information Perform corresponding translation or rotation to grab the first workpiece placed at any position on the stage.

在本申请实施例中,第一空间坐标指示了第一工件在空间坐标系中的实际位置,第二空间坐标系指示了第一工件位于标准位置时第一工件在空间坐标系中的位置,根据第一空间坐标和第二空间坐标,可以确定第一工作的实际位置相对于标准位置的偏移量,将该偏移量作为控制信息发送给机械臂,使得机械臂能够根据该偏移量在预设的运动流程上进行相应的平移或旋转,其中预设的运行流程对应于标准位置,进而对位于载物台上非标准位置的工件进行抓取,便于机械臂的运动控制。In the embodiment of the present application, the first spatial coordinate indicates the actual position of the first workpiece in the spatial coordinate system, and the second spatial coordinate system indicates the position of the first workpiece in the spatial coordinate system when the first workpiece is at the standard position, According to the first space coordinates and the second space coordinates, the offset of the actual position of the first work relative to the standard position can be determined, and the offset can be sent to the robot arm as control information, so that the robot arm can The corresponding translation or rotation is carried out on the preset motion process, wherein the preset running process corresponds to the standard position, and then the workpiece located at the non-standard position on the stage is grasped, which is convenient for the motion control of the mechanical arm.

图2是本申请一个实施例的第二空间坐标获取方法的流程图。如图2所示,该第二空间坐标获取方法200包括如下步骤:Fig. 2 is a flow chart of a second spatial coordinate acquisition method according to an embodiment of the present application. As shown in Figure 2, the second spatial coordinate acquisition method 200 includes the following steps:

步骤201、获取预先由相机采集的第二工件图像。Step 201. Obtain a second workpiece image previously captured by a camera.

相机在采集第二工件图像时,将第一工件放置在载物台上的标准位置,机械臂运动至第一工件上方,与机械臂同步运动的相机对第一工件进行图像采集,获得第二工件图像。When the camera collects the image of the second workpiece, the first workpiece is placed on the standard position on the stage, the mechanical arm moves above the first workpiece, and the camera moving synchronously with the mechanical arm collects the image of the first workpiece to obtain the second workpiece. Artifact image.

步骤202、从第二工件图像中确定至少一个第二特征点。Step 202. Determine at least one second feature point from the second workpiece image.

在获取到相机采集到的待抓取的第二工件图像后,需要确定第一工件的图像在第二工件图像中的位置。从第二工件图像中确定至少一个第二特征点,第二特征点指的是第二工件图像中灰度值发生剧烈变化的点或者在第二工件图像边缘上曲率较大的点。第二特征点可以指示第一工件的图像在第二工件图像中的位置。After acquiring the image of the second workpiece to be captured captured by the camera, it is necessary to determine the position of the image of the first workpiece in the image of the second workpiece. Determine at least one second feature point from the second workpiece image, the second feature point refers to a point in the second workpiece image where the gray value changes sharply or a point with a large curvature on the edge of the second workpiece image. The second feature point may indicate a location of the image of the first workpiece in the image of the second workpiece.

步骤203、确定第一工件在空间坐标系中的第二空间坐标。Step 203, determining the second space coordinates of the first workpiece in the space coordinate system.

各第二特征点指示了位于标准位置的第一工件的图像在第二工件图像中的位置,标定信息用于指示相机所采集图像的像素坐标系与空间坐标系之间的映射关系,因此可以根据各第二特征点和标定信息,确定用于指示位于标准位置的第一工件在机械臂的空间坐标系中的第二空间坐标。Each second feature point indicates the position of the image of the first workpiece at the standard position in the second workpiece image, and the calibration information is used to indicate the mapping relationship between the pixel coordinate system and the spatial coordinate system of the image collected by the camera, so it can be According to each second feature point and the calibration information, a second space coordinate for indicating the first workpiece at the standard position in the space coordinate system of the mechanical arm is determined.

在本申请实施例中,预先将第一工件放置在载物台上的标准位置,并通过相机采集第二工件图像,从第二工件图像中确定一个或多个第二特征点,根据第二特征点和标定信息确定第二空间坐标,保证确定出的第二空间坐标能够准确指示第一工件位于标准位置时第一工件在机械臂的空间坐标系中的位置,进而保证所确定出的控制信息的准确性,使得机械臂根据接收到的控制信息能够准确地对第一工件进行抓取。In the embodiment of the present application, the first workpiece is placed in the standard position on the stage in advance, and the second workpiece image is collected by the camera, and one or more second feature points are determined from the second workpiece image, according to the second The feature points and calibration information determine the second space coordinates, ensuring that the determined second space coordinates can accurately indicate the position of the first workpiece in the space coordinate system of the manipulator when the first workpiece is at the standard position, thereby ensuring the determined control The accuracy of the information enables the robotic arm to accurately grasp the first workpiece according to the received control information.

在一种可能实现的方式中,第一特征点为第一工件图像中第一工件的轮廓线上的点,第二特征点为第二工件图像中第一工件的轮廓线上的点。In a possible implementation manner, the first feature point is a point on the contour line of the first workpiece in the first workpiece image, and the second feature point is a point on the contour line of the first workpiece in the second workpiece image.

在一般情况下,工件与载物台之间存在较大的色差,在相机所采集的工件图像中可以准确识别出工件的轮廓线,进而可以将工件轮廓线上的点确定为特征点。在此种情况下,所有可能的第一特征点都位于第一电路板的轮廓线上,所有可能的第二特征点都位于第二电路板的轮廓线上。In general, there is a large color difference between the workpiece and the stage, and the contour line of the workpiece can be accurately identified in the image of the workpiece collected by the camera, and then the points on the contour line of the workpiece can be determined as feature points. In this case, all possible first feature points are located on the outline of the first circuit board, and all possible second feature points are located on the outline of the second circuit board.

在本申请实施例中,由于第一特征点位于第一工件的轮廓线上,第二特征点位于第一工件的轮廓线上,根据各第一特征点可以对第一工件进行准确地定位,根据各第二特征点可以保证所确定出第二空间坐标的准确性,进而保证机械手能够顺利对工件进行抓取。In the embodiment of the present application, since the first feature point is located on the contour line of the first workpiece, and the second feature point is located on the contour line of the first workpiece, the first workpiece can be accurately positioned according to each first feature point, The accuracy of the determined second space coordinates can be guaranteed according to the second feature points, thereby ensuring that the manipulator can smoothly grasp the workpiece.

在一种可能的实现方式中,机械臂的空间坐标系可以是三维笛卡尔坐标系,三维笛卡尔坐标系中X轴和Y轴所在平面与载物台平行,第一空间坐标和第二空间坐标均包括沿三维笛卡尔坐标系的X轴方向的横坐标、沿三维笛卡尔坐标系的Y轴方向的纵坐标和绕三维笛卡尔坐标系的Z轴方向的旋转角度。在此基础上,图3提供了一种偏移量确定方法,如图3所示,该偏移量确定方法300包括如下步骤:In a possible implementation, the space coordinate system of the manipulator can be a three-dimensional Cartesian coordinate system, the plane where the X-axis and the Y-axis are located in the three-dimensional Cartesian coordinate system is parallel to the stage, and the first space coordinate and the second space The coordinates include an abscissa along the X-axis direction of the three-dimensional Cartesian coordinate system, a vertical coordinate along the Y-axis direction of the three-dimensional Cartesian coordinate system, and a rotation angle around the Z-axis direction of the three-dimensional Cartesian coordinate system. On this basis, FIG. 3 provides a method for determining an offset. As shown in FIG. 3 , the method 300 for determining an offset includes the following steps:

步骤301、确定第一工件在空间坐标系中的位置相对于标准位置的X轴位移偏移量。Step 301. Determine the X-axis displacement offset of the position of the first workpiece in the spatial coordinate system relative to the standard position.

由于第二空间坐标指示标准位置在空间坐标系中的位置,所以可以计算第一空间坐标包括的横坐标与第二空间坐标包括的横坐标之间的差值,将该差值确定为第一工件的位置相对于标准位置的X轴位移偏移量。Since the second space coordinate indicates the position of the standard position in the space coordinate system, the difference between the abscissa included in the first space coordinate and the abscissa included in the second space coordinate can be calculated, and the difference is determined as the first The X-axis displacement offset of the workpiece position relative to the standard position.

步骤302、确定第一工件在空间坐标系中的位置相对于标准位置的Y轴位移偏移量。Step 302, determining the Y-axis displacement offset of the position of the first workpiece in the space coordinate system relative to the standard position.

由于第二空间坐标指示的标准位置在空间坐标系中的位置,所以可以计算第一空间坐标包括的纵坐标与第二空间坐标包括的纵坐标之间的差值,将该差值确定为第一电路板的位置相对于标准位置的Y轴偏移量。Since the standard position indicated by the second spatial coordinate is in the spatial coordinate system, the difference between the vertical coordinate included in the first spatial coordinate and the vertical coordinate included in the second spatial coordinate can be calculated, and the difference is determined as the first The Y-axis offset of the position of a circuit board relative to the standard position.

步骤303、确定第一工件在空间坐标系中的位置相对于标准位置的Z轴旋转偏移量。Step 303, determining the Z-axis rotation offset of the position of the first workpiece in the spatial coordinate system relative to the standard position.

由于第二空间坐标指示的标准位置在空间坐标系中的位置,所以可以计算第一空间坐标包括的旋转角度与第二空间坐标包括的旋转角度之间的差值,将该差值确定为第一电路板的位置相对于标准位置的Z轴旋转偏移量。其中,由于第二空间坐标指示标准位置在空间坐标系中的位置,以标准位置作为基准,则第二空间坐标包括的旋转角度可以等于零。Since the standard position indicated by the second space coordinate is in the space coordinate system, the difference between the rotation angle included in the first space coordinate and the rotation angle included in the second space coordinate can be calculated, and the difference is determined as the first A Z-axis rotational offset of the position of the board relative to the standard position. Wherein, since the second space coordinate indicates the position of the standard position in the space coordinate system, and the standard position is used as a reference, the rotation angle included in the second space coordinate may be equal to zero.

在本申请实施例中,计算第一工件在空间坐标系中相对于标准位置的X轴位移偏移量、Y轴位移偏移量和Z轴旋转偏移量,作为机械臂的控制信息,机械臂可以根据控制信息相对于标准位置进行平移或旋转,以使机械臂对载物台上任意位置的工件都可以进行抓取。In the embodiment of the present application, the X-axis displacement offset, the Y-axis displacement offset and the Z-axis rotation offset of the first workpiece relative to the standard position in the space coordinate system are calculated as the control information of the mechanical arm. The arm can translate or rotate relative to the standard position according to the control information, so that the robotic arm can grab the workpiece at any position on the stage.

图4是本申请一个实施例的标定信息确定方法的流程图,如图4所示,该标定信息确定方法400包括如下步骤:FIG. 4 is a flowchart of a method for determining calibration information according to an embodiment of the present application. As shown in FIG. 4 , the method 400 for determining calibration information includes the following steps:

步骤401、确定位于第二工件上的标定参考点。Step 401, determining a calibration reference point on a second workpiece.

机械臂的空间坐标系为三维笛卡尔坐标系,该坐标系中X轴、Y轴和Z轴相互垂直,且X轴和Y轴所在的平面与载物台平行。将第一工件和第二工件分别放置在载物台上时,第一工件与第二工件在Z轴方向上高度相同。第二工件与第一工件可以是同种工件,也可以是不同种工件,比如第二工件与第一工件是同种型号的电路板。The spatial coordinate system of the robotic arm is a three-dimensional Cartesian coordinate system, in which the X-axis, Y-axis and Z-axis are perpendicular to each other, and the plane where the X-axis and Y-axis are located is parallel to the stage. When the first workpiece and the second workpiece are respectively placed on the stage, the height of the first workpiece and the second workpiece in the Z-axis direction are the same. The second workpiece and the first workpiece may be the same type of workpiece, or may be different types of workpieces, for example, the second workpiece and the first workpiece are circuit boards of the same type.

通过第二工件对相机进行标定时,由于相机采集到的是平面图像,工件距离相机的距离不同,会影响工件的图像在相机所采集图像中的位置,进而影响标定结果,所以需要保证第二工件与第一工件在Z轴方向上高度相同。When the camera is calibrated through the second workpiece, since the camera collects a planar image, the distance between the workpiece and the camera is different, which will affect the position of the workpiece image in the image collected by the camera, thereby affecting the calibration result, so it is necessary to ensure that the second The workpiece is at the same height as the first workpiece in the Z-axis direction.

为了通过第二工件的图像对相机进行标定,在第二工件的上表面确定标定参考点,所确定的标定参考点在相机采集的图像中具有相对应的图像。In order to calibrate the camera through the image of the second workpiece, a calibration reference point is determined on the upper surface of the second workpiece, and the determined calibration reference point has a corresponding image in the image collected by the camera.

步骤402、控制机械臂在空间坐标系中沿X轴和/或Y轴方向进行N次平移。Step 402, controlling the mechanical arm to perform N translations along the X-axis and/or the Y-axis in the spatial coordinate system.

在相机标定过程中,为了确定相机所采集图像的像素坐标系与机械臂的空间坐标系之间的转换关系,需要根据预设的X轴平移量和Y轴平移量,控制机械臂带动固定于机械臂上的相机在空间坐标系中沿X轴和/或Y轴方向进行N次平移,使得相机可以在不同位置对放置于载物台上的第二工件进行图像采集。为了求解像素坐标系与空间坐标系的转化关系,需要至少三组像素坐标和空间坐标,因此机械臂在空间坐标系中平移次数N为大于或等于3的正整数。相机在机械臂每次平移后都会采集第二工件的图像,作为平移标定图像。In the process of camera calibration, in order to determine the conversion relationship between the pixel coordinate system of the image captured by the camera and the space coordinate system of the manipulator, it is necessary to control the manipulator to drive and fix it on the The camera on the mechanical arm performs N translations along the X-axis and/or the Y-axis in the spatial coordinate system, so that the camera can collect images of the second workpiece placed on the stage at different positions. In order to solve the conversion relationship between the pixel coordinate system and the space coordinate system, at least three sets of pixel coordinates and space coordinates are required, so the number of translations N of the manipulator in the space coordinate system is a positive integer greater than or equal to 3. The camera collects an image of the second workpiece after each translation of the robotic arm as a translation calibration image.

需要说明的是,机械臂在空间坐标系中沿X轴和/或Y轴方向进行平移时,机械臂在Z轴方向上的位置保持不变,保证相机与载物台在Z轴方向上的距离保持不变。It should be noted that when the mechanical arm translates along the X-axis and/or Y-axis in the space coordinate system, the position of the mechanical arm in the Z-axis direction remains unchanged, ensuring the distance between the camera and the stage in the Z-axis direction. The distance remains the same.

步骤403、获取机械臂每次平移后相机采集的平移标定图像。Step 403 , acquiring a translation calibration image captured by the camera after each translation of the robotic arm.

获取相机采集的平移标定图像,由于相机在机械臂每次平移后会采集至少一张平移标定图像,因此可以获取到至少N张平移标定图像。Acquire the translation calibration images collected by the camera. Since the camera will collect at least one translation calibration image after each translation of the robot arm, at least N translation calibration images can be obtained.

步骤404、控制机械臂在空间坐标系中绕Z轴进行M次旋转。Step 404, controlling the mechanical arm to perform M rotations around the Z axis in the space coordinate system.

为了提高相机标定的准确性,使相机不局限于沿X轴和Y轴方向运动,可以根据预设的Z轴旋转量,控制机械臂带动位于相机在空间坐标系中绕Z轴进行M次旋转。为了确定机械臂旋转时像素坐标与空间坐标的转换关系,需要至少三组机械臂旋转后标定参考点的像素坐标和空间坐标,因此M为大于或等于3的正整数。In order to improve the accuracy of camera calibration, so that the camera is not limited to moving along the X-axis and Y-axis, the mechanical arm can be controlled to drive the camera to rotate M times around the Z-axis in the space coordinate system according to the preset Z-axis rotation amount. . In order to determine the conversion relationship between pixel coordinates and space coordinates when the manipulator rotates, at least three sets of pixel coordinates and space coordinates of the reference point after the manipulator rotates are required, so M is a positive integer greater than or equal to 3.

步骤405、获取机械臂每次旋转后相机采集的旋转标定图像。Step 405 , acquiring the rotation calibration image captured by the camera after each rotation of the mechanical arm.

获取相机采集的旋转标定图像,由于相机在机械臂每次旋转后都会采集至少一张旋转标定图像,因此可以获得至少M张旋转标定图像。Obtain the rotation calibration images collected by the camera. Since the camera will collect at least one rotation calibration image after each rotation of the mechanical arm, at least M rotation calibration images can be obtained.

步骤406、确定标定信息。Step 406, determine the calibration information.

在获取到平移标定图像和旋转标定图像后,根据标定参考点的图像在不同平移标定图像中的位置偏移量、标定参考点的图像在不同旋转标定图像中的位置偏移量、每张平移标定图像被采集时机械臂的X轴平移量和Y轴平移量、及每张旋转标定图像被采集时机械臂的Z轴旋转量,确定标定信息。After obtaining the translation calibration image and rotation calibration image, according to the position offset of the calibration reference point image in different translation calibration images, the position offset of the calibration reference point image in different rotation calibration images, each translation The X-axis translation amount and the Y-axis translation amount of the mechanical arm when the calibration image is collected, and the Z-axis rotation amount of the mechanical arm when each rotating calibration image is collected determine the calibration information.

由于第二工件位于载物台保持不动,机械臂带动相机平移或旋转后,第二工件上标定参考点的图像在相机所采集图像中位置会发生偏移,而偏移量与机械臂沿X轴和/或Y轴的平移量及绕Z轴的旋转量正相关,因此可以根据各平移标定图像和旋转标定图像,确定用于指示相机所采集图像的像素坐标系与空间坐标系之间映射关系的标定信息。Since the second workpiece is on the stage and remains stationary, after the robot arm drives the camera to translate or rotate, the image of the reference point on the second workpiece will shift in the image captured by the camera, and the offset is the same as that of the robot arm. The translation amount of the X-axis and/or Y-axis and the rotation amount around the Z-axis are positively correlated, so the relationship between the pixel coordinate system and the space coordinate system used to indicate the image collected by the camera can be determined according to each translation calibration image and rotation calibration image The calibration information of the mapping relationship.

在本申请实施例中,机械臂带动相机进行平移和旋转,每次平移和/或旋转后相机采集第二工件的图像,根据相机的平移量和/或旋转量及标定参考点的图像在相机所采集图像中的位置偏移量,确定相机所采集图像的像素坐标系与机械臂的空间坐标系之间的映射关系,从而获得反映该映射关系的标定信息,相机采集放置于载物台上工件的图像后,通过该标定信息可以将相机所采集图像中工件的像素坐标转换至空间坐标系中的空间坐标,进而机械臂可以根据工件的空间坐标对其进行抓取,实现了机械臂可以对随意放置在载物台上的工件进行抓取。In the embodiment of the present application, the mechanical arm drives the camera to translate and rotate. After each translation and/or rotation, the camera captures the image of the second workpiece. According to the translation amount and/or rotation amount of the camera and the image of the calibration reference point The position offset in the collected image determines the mapping relationship between the pixel coordinate system of the image collected by the camera and the spatial coordinate system of the manipulator, so as to obtain the calibration information reflecting the mapping relationship. The camera is collected and placed on the stage After the image of the workpiece is obtained, the pixel coordinates of the workpiece in the image collected by the camera can be converted to the spatial coordinates in the space coordinate system through the calibration information, and then the robotic arm can grab it according to the spatial coordinates of the workpiece, realizing that the robotic arm can Grab workpieces randomly placed on the stage.

另外,通过多张平移标定图像和多张旋转标定图像对相机进行标定,保证所生成的标定信息能够准确反映相机所采集图像的像素坐标系与机械臂的空间坐标系之间的映射关系,进而通过标定信息能够准确地确定工件在空间坐标系中的空间坐标,保证机械臂对工件进行抓取的成功率。In addition, the camera is calibrated through multiple translation calibration images and multiple rotation calibration images to ensure that the generated calibration information can accurately reflect the mapping relationship between the pixel coordinate system of the image collected by the camera and the spatial coordinate system of the manipulator, and then Through the calibration information, the spatial coordinates of the workpiece in the spatial coordinate system can be accurately determined to ensure the success rate of the robotic arm grasping the workpiece.

在一种可能实现的方式中,在确定标定信息时,通过机械臂所进行的N次平移中的第i次平移,根据标定参考点的图像在机械臂进行第i次平移前相机采集的第i-1平移标定图像的位置,与机械臂进行第i次平移后相机采集的第i平移标定图像中的位置,计算第i像素平移偏移量。通过机械臂所进行的M次旋转中的第j次旋转,根据标定参考点的图像在机械臂进行第j次旋转前相机采集的第j-1旋转标定图像的位置,与机械臂进行第j次旋转后相机采集的第j旋转标定图像的位置,计算第j像素旋转偏移量。根据第i像素平移偏移量与机械臂进行第i次平移对应的X轴平移量和Y轴平移量,及第j像素旋转偏移量与机械臂进行第j次旋转对应的Z轴旋转量,确定标定信息。In a possible implementation manner, when determining the calibration information, through the i-th translation among the N translations performed by the robotic arm, according to the image of the calibration reference point, the first translation captured by the camera before the i-th translation of the robotic arm The position of the i-1 translation calibration image is the position in the i-th translation calibration image collected by the camera after the i-th translation with the robotic arm, and the i-th pixel translation offset is calculated. Through the jth rotation of the M rotations performed by the robotic arm, according to the image of the calibration reference point, the position of the j-1th rotation calibration image collected by the camera before the jth rotation of the robotic arm, and the jth rotation with the robotic arm The position of the jth rotation calibration image collected by the camera after the second rotation, and the jth pixel rotation offset is calculated. According to the i-th pixel translation offset and the X-axis translation and Y-axis translation corresponding to the i-th translation of the robot arm, and the j-th pixel rotation offset and the Z-axis rotation corresponding to the j-th rotation of the robot arm , to determine the calibration information.

例如,平移次数N为8,旋转次数M为4。For example, the number of translations N is 8, and the number of rotations M is 4.

在机械臂进行的8次平移过程中,计算标定参考点的图像在每次平移前后平移标定图像中的像素平移偏移量。在第1次平移后,计算标定参考点的图像在第1次平移前和第1次平移后的平移标定图像中的第1像素平移偏移量,后续第i像素平移偏移量的计算方式与前述计算方式相同,在此处不再进行赘述。During the 8 translations performed by the manipulator, the image of the calibration reference point is calculated to translate the pixel translation offset in the calibration image before and after each translation. After the first translation, calculate the translation offset of the first pixel in the translation calibration image of the image of the calibration reference point before the first translation and after the first translation, and the calculation method of the translation offset of the subsequent i-th pixel The calculation method is the same as the above, and will not be repeated here.

在机械臂进行的4次旋转过程中,计算标定参考点的图像在每次旋转前后旋转标定图像中的像素旋转偏移量。在第1次旋转后,计算标定参考点的图像在第1次旋转前和第1次旋转后的旋转标定图像中的第1像素旋转偏移量,后续第j像素旋转偏移量的计算方式与前述计算方式相同,在此处不再进行赘述。During the 4 rotations of the manipulator, the image of the calibration reference point is calculated to rotate the pixel rotation offset in the calibration image before and after each rotation. After the first rotation, calculate the rotation offset of the first pixel in the image of the calibration reference point before the first rotation and after the first rotation, and calculate the rotation offset of the subsequent jth pixel The calculation method is the same as the above, and will not be repeated here.

根据第1~8像素平移偏移量,以及每次平移对应的X轴平移量和Y轴平移量,以及第1~4像素旋转偏移量,以及每次旋转对应的Z轴旋转量,确定标定信息。According to the translation offset of the 1st to 8th pixels, and the X-axis translation and Y-axis translation corresponding to each translation, as well as the 1st to 4th pixel rotation offset, and the Z-axis rotation corresponding to each rotation, determine Calibration information.

在本申请实施例中,通过对比标定参考点的图像在每次平移前后平移标定图像中的像素平移偏移量,以及标定参考点的图像在每次旋转前后旋转标定图像中的像素旋转偏移量,得到了与运动次数匹配的标定参考点的偏移量,通过每次空间坐标系中的运动偏移量和对应的标定参考点的偏移量,进一步提高了相机标定的精度。In the embodiment of the present application, the pixel translation offset in the calibration image is translated before and after each translation by comparing the calibration reference point image, and the pixel rotation offset in the calibration image is rotated before and after each rotation of the calibration reference point image The offset of the calibration reference point matching the number of movements is obtained, and the accuracy of camera calibration is further improved by the movement offset in each space coordinate system and the corresponding offset of the calibration reference point.

图5是本申请一个实施例的机械臂运动顺序的示意图,如图5所示,机械臂平移次数N为9,机械臂进行9次平移时沿X轴方向和沿Y轴方向的平移量组合依次为(x,0)、(x,0)、(0,y)、(-x,0)、(-x,0)、(0,y)、(x,0)、(x,0)和(-x,-y),x和y均不等于0。Fig. 5 is a schematic diagram of the motion sequence of the mechanical arm according to an embodiment of the present application. As shown in Fig. 5, the number of translations N of the mechanical arm is 9, and the combination of translations along the X-axis direction and along the Y-axis direction when the mechanical arm performs 9 translations (x,0), (x,0), (0,y), (-x,0), (-x,0), (0,y), (x,0), (x,0 ) and (-x,-y), x and y are not equal to 0.

在本申请实施例中,通过对机械臂的平移路径进行规划,能够避免机械臂在平移过程中超出载物台的范围,导致相机采集到不包含工件的无效图片,提高了相机标定的效率。In the embodiment of the present application, by planning the translation path of the robotic arm, it is possible to prevent the robotic arm from exceeding the scope of the stage during the translation process, causing the camera to collect invalid pictures that do not contain workpieces, and improving the efficiency of camera calibration.

在一种可能的实现方式中,预设的X轴平移量和Y轴平移量相等,即x等于y。In a possible implementation manner, the preset X-axis translation amount is equal to the Y-axis translation amount, that is, x is equal to y.

图6是本申请一个实施例的机械臂运动点位坐标的示意图,如图6所示,X轴平移量和Y轴平移量等于5。机械臂进行9次平移时沿X轴方向和沿Y轴方向的平移量组合依次为(5,0)、(5,0)、(0,5)、(-5,0)、(-5,0)、(0,5)、(5,0)、(5,0)和(-5,-5)。FIG. 6 is a schematic diagram of the movement point coordinates of the robotic arm according to an embodiment of the present application. As shown in FIG. 6 , the X-axis translation amount and the Y-axis translation amount are equal to 5. When the mechanical arm performs 9 translations, the combinations of translations along the X-axis direction and along the Y-axis direction are (5,0), (5,0), (0,5), (-5,0), (-5 ,0), (0,5), (5,0), (5,0) and (-5,-5).

在本申请实施例中,通过将X轴平移量和Y轴平移量设置为相等的偏移量,降低了计算复杂度,提高了相机标定的效率。In the embodiment of the present application, the calculation complexity is reduced and the efficiency of camera calibration is improved by setting the X-axis translation amount and the Y-axis translation amount as equal offsets.

在一种可能实现的方式中,机械臂在运动的过程中,至少有一次运动过程中同时进行了平移和旋转操作。In a possible implementation manner, during the movement of the mechanical arm, translation and rotation operations are simultaneously performed during at least one movement.

在本申请实施例中,通过将平移与旋转同步完成,能够减少相机采集的图像量,减少了计算量的同时保证了计算的精确度,提高了相机标定的效率。In the embodiment of the present application, by synchronizing translation and rotation, the amount of images collected by the camera can be reduced, the amount of calculation can be reduced while the accuracy of calculation can be ensured, and the efficiency of camera calibration can be improved.

对象抓取装置object grabber

图7是本申请一个实施例的对象抓取装置的示意图。如图7所示,对象抓取装置700包括获取模块701、提取模块702、确定模块703和抓取模块704。Fig. 7 is a schematic diagram of an object grabbing device according to an embodiment of the present application. As shown in FIG. 7 , the object grabbing apparatus 700 includes an acquisition module 701 , an extraction module 702 , a determination module 703 and a grabbing module 704 .

在获取模块701获取相机采集到的第一工件图像后,提取模块702根据从相机采集到的第一工件图像中确定至少一个第一特征点。After the acquiring module 701 acquires the first workpiece image captured by the camera, the extracting module 702 determines at least one first feature point according to the first workpiece image captured by the camera.

确定模块703根据提取模块702确定的第一特征点,确定第一工件在机械臂的空间坐标系中的第一空间坐标。The determination module 703 determines the first space coordinates of the first workpiece in the space coordinate system of the robot arm according to the first feature points determined by the extraction module 702 .

抓取模块704根据确定模块703确定的第一空间坐标生成控制信息。The capturing module 704 generates control information according to the first spatial coordinate determined by the determining module 703 .

在本申请实施例中,通过提取模块702确定的至少一个第一特征点,能够指示出第一工件在第一工件图像中的位置。确定模块703通过标定信息和第一特征点的像素坐标,能够确定第一工件在机械臂的空间坐标系中的位置。抓取模块704通过工件的位置信息,控制机械臂对工件进行抓取。不用将工件放置的位置摆放到特定的角度和位置,机械臂对载物台上任意位置的工件都能够进行自动化抓取,节省了人力成本。In the embodiment of the present application, at least one first feature point determined by the extraction module 702 can indicate the position of the first workpiece in the first workpiece image. The determining module 703 can determine the position of the first workpiece in the spatial coordinate system of the manipulator through the calibration information and the pixel coordinates of the first feature point. The grasping module 704 controls the mechanical arm to grasp the workpiece through the position information of the workpiece. Without placing the workpiece at a specific angle and position, the robotic arm can automatically grab the workpiece at any position on the stage, saving labor costs.

电子设备Electronic equipment

图8是本申请一个实施例的电子设备的示意图,本申请具体实施例并不对电子设备的具体实现做限定。如图8所示,该电子设备800可以包括:处理器(processor)801、通信接口(Communications Interface)802、存储器(memory)803、以及通信总线804。其中:Fig. 8 is a schematic diagram of an electronic device according to an embodiment of the present application, and the specific embodiment of the present application does not limit the specific implementation of the electronic device. As shown in FIG. 8 , the electronic device 800 may include: a processor (processor) 801 , a communication interface (Communications Interface) 802 , a memory (memory) 803 , and a communication bus 804 . in:

处理器801、通信接口802、以及存储器803通过通信总线804完成相互间的通信。The processor 801 , the communication interface 802 , and the memory 803 communicate with each other through the communication bus 804 .

通信接口802,用于与其它电子设备或服务器进行通信。The communication interface 802 is used for communicating with other electronic devices or servers.

处理器801,用于执行程序805,具体可以执行前述多个方法实施例中的任一方法实施例中的相关步骤。The processor 801 is configured to execute the program 805, specifically, may execute relevant steps in any method embodiment in the aforementioned multiple method embodiments.

具体地,程序805可以包括程序代码,该程序代码包括计算机操作指令。Specifically, the program 805 may include program codes including computer operation instructions.

处理器801可能是CPU,或者是特定集成电路ASIC(Application SpecificIntegrated Circuit),或者是被配置成实施本申请实施例的一个或多个集成电路。智能设备包括的一个或多个处理器,可以是同一类型的处理器,如一个或多个CPU;也可以是不同类型的处理器,如一个或多个CPU以及一个或多个ASIC。The processor 801 may be a CPU, or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device may be of the same type, such as one or more CPUs, or may be different types of processors, such as one or more CPUs and one or more ASICs.

存储器803,用于存放程序805。存储器803可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。The memory 803 is used to store the program 805 . The memory 803 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

程序805具体可以用于使得处理器801执行前述实施例中多个方法实施例中的任一方法。The program 805 may be specifically configured to enable the processor 801 to execute any method in the multiple method embodiments in the foregoing embodiments.

程序805中各步骤的具体实现可以参见前述工件抓取方法实施例中的相应步骤和单元中对应的描述,在此不赘述。所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的设备和模块的具体工作过程,可以参考前述方法实施例中的对应过程描述,在此不再赘述。For the specific implementation of each step in the program 805, refer to the corresponding descriptions in the corresponding steps and units in the aforementioned embodiment of the workpiece grasping method, and details are not repeated here. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the foregoing method embodiments, and details are not repeated here.

通过本申请实施例的电子设备,从第一工件图像中确定的至少一个第一特征点,能够指示第一工件的图像在第一工件图像中的位置,标定信息可以指示相机所采集图像的像素坐标系与机械臂的空间坐标系的映射关系,通过标定信息和第一特征点的像素坐标,能够确定第一工件在机械臂的空间坐标系中的位置,进而可以根据第一工件在空间坐标系中的位置生成控制信息,将控制信息发给机械臂后,机械臂根据控制信息对第一工件进行抓取。可见,由于可以确定工件在机械臂的空间坐标系中的位置,进而机械臂可以对随意放置在载物台上的工件进行自动化抓取,无需将按特定的角度和位置将工件放置到载物台上,从而可以节省将工件放置到载物台上所需消耗的时间,进而提高对工件进行抓取的效率。Through the electronic device of the embodiment of the present application, at least one first feature point determined from the image of the first workpiece can indicate the position of the image of the first workpiece in the image of the first workpiece, and the calibration information can indicate the pixels of the image collected by the camera The mapping relationship between the coordinate system and the space coordinate system of the manipulator, through the calibration information and the pixel coordinates of the first feature point, the position of the first workpiece in the space coordinate system of the manipulator can be determined, and then the position of the first workpiece in the space coordinate system of the manipulator can be The position in the system generates control information, and after sending the control information to the robotic arm, the robotic arm grabs the first workpiece according to the control information. It can be seen that since the position of the workpiece in the spatial coordinate system of the manipulator can be determined, the manipulator can automatically grab the workpiece randomly placed on the stage without placing the workpiece on the load at a specific angle and position. on the stage, thereby saving the time required to place the workpiece on the stage, thereby improving the efficiency of grasping the workpiece.

计算机存储介质computer storage media

本申请还提供了一种计算机可读存储介质,存储用于使一机器执行如本文所述的多个方法实施例中的任一方法的指令。具体地,可以提供配有存储介质的系统或者装置,在该存储介质上存储着实现上述实施例中任一实施例的功能的软件程序代码,且使该系统或者装置的计算机(或CPU或MPU)读出并执行存储在存储介质中的程序代码。The present application also provides a computer-readable storage medium storing instructions for causing a machine to execute any method in the multiple method embodiments described herein. Specifically, a system or device equipped with a storage medium may be provided, on which a software program code for realizing the functions of any of the above embodiments is stored, and the computer (or CPU or MPU of the system or device) ) to read and execute the program code stored in the storage medium.

在这种情况下,从存储介质读取的程序代码本身可实现上述实施例中任何一项实施例的功能,因此程序代码和存储程序代码的存储介质构成了本申请的一部分。In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, so the program code and the storage medium storing the program code constitute a part of the present application.

用于提供程序代码的存储介质实施例包括软盘、硬盘、磁光盘、光盘(如CD-ROM、CD-R、CD-RW、DVD-ROM、DVD-RAM、DVD-RW、DVD+RW)、磁带、非易失性存储卡和ROM。可选择地,可以由通信网络从服务器计算机上下载程序代码。Examples of storage media for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), Tape, non-volatile memory card, and ROM. Alternatively, the program code can be downloaded from a server computer via a communication network.

计算机程序产品computer program product

本申请实施例还提供了一种计算机程序产品,包括计算机指令,该计算机指令指示计算设备执行上述多个方法实施例中的任一对应的操作。An embodiment of the present application further provides a computer program product, including computer instructions, where the computer instruction instructs a computing device to perform any corresponding operation in the foregoing multiple method embodiments.

需要指出,根据实施的需要,可将本申请实施例中描述的各个部件/步骤拆分为更多部件/步骤,也可将两个或多个部件/步骤或者部件/步骤的部分操作组合成新的部件/步骤,以实现本申请实施例的目的。It should be pointed out that, according to the needs of implementation, each component/step described in the embodiment of the present application can be divided into more components/steps, and two or more components/steps or partial operations of components/steps can also be combined into New components/steps to achieve the purpose of the embodiment of the present application.

上述根据本申请实施例的方法可在硬件、固件中实现,或者被实现为可存储在记录介质(诸如CD ROM、RAM、软盘、硬盘或磁光盘)中的软件或计算机代码,或者被实现通过网络下载的原始存储在远程记录介质或非暂时机器可读介质中并将被存储在本地记录介质中的计算机代码,从而在此描述的方法可被存储在使用通用计算机、专用处理器或者可编程或专用硬件(诸如ASIC或FPGA)的记录介质上的这样的软件处理。可以理解,计算机、处理器、微处理器控制器或可编程硬件包括可存储或接收软件或计算机代码的存储组件(例如,RAM、ROM、闪存等),当所述软件或计算机代码被计算机、处理器或硬件访问且执行时,实现在此描述的方法。此外,当通用计算机访问用于实现在此示出的方法的代码时,代码的执行将通用计算机转换为用于执行在此示出的方法的专用计算机。The above method according to the embodiment of the present application can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as CD ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or implemented by Computer code downloaded from a network that is originally stored on a remote recording medium or a non-transitory machine-readable medium and will be stored on a local recording medium so that the methods described herein can be stored on a computer code using a general-purpose computer, a dedicated processor, or a programmable Such software processing on a recording medium of dedicated hardware such as ASIC or FPGA. It will be appreciated that a computer, processor, microprocessor controller, or programmable hardware includes memory components (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code that, when When accessed and executed by a processor or hardware, implements the methods described herein. Furthermore, when a general purpose computer accesses code for implementing the methods shown herein, execution of the code transforms the general purpose computer into a special purpose computer for performing the methods shown herein.

需要说明的是,上述各流程和各系统结构图中不是所有的步骤和模块都是必须的,可以根据实际的需要忽略某些步骤或模块。各步骤的执行顺序不是固定的,可以根据需要进行调整。上述各实施例中描述的系统结构可以是物理结构,也可以是逻辑结构,即,有些模块可能由同一物理实体实现,或者,有些模块可能分由多个物理实体实现,或者,可以由多个独立设备中的某些部件共同实现。It should be noted that not all the steps and modules in the above processes and system structure diagrams are necessary, and some steps or modules can be ignored according to actual needs. The execution order of each step is not fixed and can be adjusted as required. The system structures described in the above embodiments may be physical structures or logical structures, that is, some modules may be realized by the same physical entity, or some modules may be realized by multiple physical entities, or may be realized by multiple Certain components in individual devices are implemented together.

以上各实施例中,硬件模块可以通过机械方式或电气方式实现。例如,一个硬件模块可以包括永久性专用的电路或逻辑(如专门的处理器,FPGA或ASIC)来完成相应操作。硬件模块还可以包括可编程逻辑或电路(如通用处理器或其它可编程处理器),可以由软件进行临时的设置以完成相应操作。具体的实现方式(机械方式、或专用的永久性电路、或者临时设置的电路)可以基于成本和时间上的考虑来确定。In the above embodiments, the hardware modules may be implemented mechanically or electrically. For example, a hardware module may include permanently dedicated circuitry or logic (such as a dedicated processor, FPGA or ASIC) to perform the corresponding operations. The hardware modules may also include programmable logic or circuits (such as general-purpose processors or other programmable processors), which can be temporarily set by software to complete corresponding operations. The specific implementation (mechanical way, or a dedicated permanent circuit, or a temporary circuit) can be determined based on cost and time considerations.

上文通过附图和优选实施例对本发明进行了详细展示和说明,然而本发明不限于这些已揭示的实施例,基与上述多个实施例本领域技术人员可以知晓,可以组合上述不同实施例中的代码审核手段得到本发明更多的实施例,这些实施例也在本发明的保护范围之内。The present invention has been shown and described in detail through the accompanying drawings and preferred embodiments above, but the present invention is not limited to these disclosed embodiments, and those skilled in the art based on the above-mentioned multiple embodiments can know that the above-mentioned different embodiments can be combined More embodiments of the present invention can be obtained by means of code review in the present invention, and these embodiments are also within the protection scope of the present invention.

Claims (14)

1.一种工件抓取方法(100),包括:1. A workpiece grabbing method (100), comprising: 获取相机采集到的第一工件图像,其中,所述第一工件图像包括位于载物台上的第一工件的图像;acquiring a first workpiece image captured by the camera, wherein the first workpiece image includes an image of the first workpiece located on the stage; 从所述第一工件图像中确定至少一个第一特征点,其中,所述第一特征点用于指示所述第一工件的图像在所述第一工件图像中的位置;determining at least one first feature point from the first workpiece image, wherein the first feature point is used to indicate a position of the image of the first workpiece in the first workpiece image; 根据所述至少一个第一特征点的像素坐标和标定信息,确定所述第一工件在机械臂的空间坐标系中的第一空间坐标,其中,所述标定信息用于指示所述相机所采集图像的像素坐标系与所述空间坐标系之间的映射关系;According to the pixel coordinates and calibration information of the at least one first feature point, determine the first spatial coordinates of the first workpiece in the spatial coordinate system of the manipulator, wherein the calibration information is used to indicate the captured by the camera The mapping relationship between the pixel coordinate system of the image and the space coordinate system; 根据所述第一空间坐标生成控制信息,并将所述控制信息发送给所述机械臂,以使所述机械臂根据所述控制信息对所述第一工件进行抓取。generating control information according to the first space coordinates, and sending the control information to the robotic arm, so that the robotic arm can grasp the first workpiece according to the control information. 2.根据权利要求1所述的方法,其中,所述根据所述第一空间坐标生成控制信息,包括:2. The method according to claim 1, wherein said generating control information according to said first spatial coordinates comprises: 获取第二空间坐标,其中,所述第二空间坐标用于指示所述第一工件位于载物台上的标准位置时所述第一工件在所述空间坐标系中的坐标;Acquiring second space coordinates, wherein the second space coordinates are used to indicate the coordinates of the first workpiece in the space coordinate system when the first workpiece is located at a standard position on the stage; 根据所述第一空间坐标和所述第二空间坐标,确定所述第一工件在所述空间坐标系中的位置相对于所述标准位置的偏移量;determining the offset of the position of the first workpiece in the space coordinate system relative to the standard position according to the first space coordinate and the second space coordinate; 将所述偏移量确定为控制信息。The offset is determined as control information. 3.根据权利要求2所述的方法,所述方法还包括:3. The method of claim 2, further comprising: 获取预先由所述相机采集的第二工件图像,其中,所述第二工件图像包括位于载物台上的标准位置的所述第一工件的图像;acquiring a second workpiece image previously captured by the camera, wherein the second workpiece image includes an image of the first workpiece at a standard position on the stage; 从所述第二工件图像中确定至少一个第二特征点,其中,所述第二特征点用于指示所述第一工件的图像在所述第二工件图像中的位置;determining at least one second feature point from the second workpiece image, wherein the second feature point is used to indicate a position of the image of the first workpiece in the second workpiece image; 根据所述至少一个第二特征点的像素坐标和所述标定信息,确定所述第一工件在所述空间坐标系中的第二空间坐标。A second space coordinate of the first workpiece in the space coordinate system is determined according to the pixel coordinates of the at least one second feature point and the calibration information. 4.根据权利要求3所述的方法,其中,所述第一特征点为所述第一工件图像中所述第一工件的轮廓线上的点,所述第二特征点为所述第二工件图像中所述第一工件的轮廓线上的点。4. The method according to claim 3, wherein the first feature point is a point on the contour line of the first workpiece in the first workpiece image, and the second feature point is the second feature point A point on the contour line of the first workpiece in the workpiece image. 5.根据权利要求2所述的方法,其中,所述空间坐标系为三维笛卡尔坐标系,所述三维笛卡尔坐标系中X轴和Y轴所在平面与载物台平行,所述第一空间坐标和所述第二空间坐标均包括沿所述三维笛卡尔坐标系的X轴方向的横坐标、沿所述三维笛卡尔坐标系的Y轴方向的纵坐标和绕所述三维笛卡尔坐标系的Z轴方向的旋转角度;5. The method according to claim 2, wherein the spatial coordinate system is a three-dimensional Cartesian coordinate system, and the plane where the X-axis and the Y-axis are located in the three-dimensional Cartesian coordinate system is parallel to the stage, and the first Both the spatial coordinates and the second spatial coordinates include an abscissa along the X-axis direction of the three-dimensional Cartesian coordinate system, an ordinate along the Y-axis direction of the three-dimensional Cartesian coordinate system, and an abscissa around the three-dimensional Cartesian coordinate system The rotation angle of the Z-axis direction of the system; 所述根据所述第一空间坐标和所述第二空间坐标,确定所述第一工件在所述空间坐标系中的位置相对于所述标准位置的偏移量,包括:The determining the offset of the position of the first workpiece in the space coordinate system relative to the standard position according to the first space coordinate and the second space coordinate includes: 将所述第一空间坐标包括的横坐标与所述第二空间坐标包括的横坐标的差值,确定为所述第一工件在所述空间坐标系中的位置相对于所述标准位置的X轴位移偏移量;Determining the difference between the abscissa included in the first space coordinate and the abscissa included in the second space coordinate as X of the position of the first workpiece in the space coordinate system relative to the standard position Axis displacement offset; 将所述第一空间坐标包括的纵坐标与所述第二空间坐标包括的纵坐标的差值,确定为所述第一工件在所述空间坐标系中的位置相对于所述标准位置的Y轴位移偏移量;Determining the difference between the ordinate included in the first space coordinate and the ordinate included in the second space coordinate as the Y of the position of the first workpiece in the space coordinate system relative to the standard position Axis displacement offset; 将所述第一空间坐标包括的旋转角度与所述第二空间坐标包括的旋转角度的差值,确定为所述第一工件在所述空间坐标系中的位置相对于所述标准位置的Z轴旋转偏移量。Determining the difference between the rotation angle included in the first space coordinate and the rotation angle included in the second space coordinate as Z of the position of the first workpiece in the space coordinate system relative to the standard position Axis rotation offset. 6.根据权利要求1-5中任一所述的方法,所述方法还包括:6. The method according to any one of claims 1-5, further comprising: 确定位于第二工件上的标定参考点,其中,所述第二工件与所述第一工件在所述空间坐标系的Z轴方向上高度相同,所述空间坐标系中X轴和Y轴所在平面与载物台平行;Determining a calibration reference point located on the second workpiece, wherein the second workpiece is at the same height as the first workpiece in the Z-axis direction of the spatial coordinate system, where the X-axis and the Y-axis are located in the spatial coordinate system The plane is parallel to the stage; 根据预设的X轴平移量和Y轴平移量,控制机械臂在所述空间坐标系中沿X轴和/或Y轴方向进行N次平移,获取机械臂每次平移后所述相机采集的平移标定图像,其中,所述平移标定图像包括位于载物台上的所述第二工件的图像,N为大于或等于3的正整数;According to the preset X-axis translation amount and Y-axis translation amount, control the manipulator to perform N times of translation along the X-axis and/or Y-axis direction in the space coordinate system, and obtain the data captured by the camera after each translation of the manipulator arm A translation calibration image, wherein the translation calibration image includes an image of the second workpiece located on the stage, and N is a positive integer greater than or equal to 3; 根据预设的Z轴旋转量,控制机械臂在所述空间坐标系中绕Z轴进行M次旋转,获取机械臂每次旋转后所述相机采集的旋转标定图像,其中,所述旋转标定图像包括位于载物台上的所述第二工件的图像,M为大于或等于3的正整数;According to the preset Z-axis rotation amount, control the mechanical arm to perform M rotations around the Z-axis in the space coordinate system, and obtain the rotation calibration image collected by the camera after each rotation of the mechanical arm, wherein the rotation calibration image Including the image of the second workpiece located on the stage, M is a positive integer greater than or equal to 3; 根据所述标定参考点的图像在不同所述平移标定图像中的位置偏移量、所述标定参考点的图像在不同所述旋转标定图像中的位置偏移量、每张所述平移标定图像对应的X轴平移量和Y轴平移量、及每张所述旋转标定图像对应的Z轴旋转量,确定所述标定信息。According to the position offset of the image of the calibration reference point in different translation calibration images, the position offset of the image of the calibration reference point in different rotation calibration images, each of the translation calibration images The corresponding X-axis translation amount and Y-axis translation amount, and the Z-axis rotation amount corresponding to each of the rotated calibration images determine the calibration information. 7.根据权利要求6所述的方法,其中,所述根据所述标定参考点的图像在不同所述平移标定图像中的位置偏移量、所述标定参考点的图像在不同所述旋转标定图像中的位置偏移量、每张所述平移标定图像对应的X轴平移量和Y轴平移量、及每张所述旋转标定图像对应的Z轴旋转量,确定所述标定信息,包括:7. The method according to claim 6, wherein, according to the position offset of the image of the calibration reference point in different translation calibration images, the image of the calibration reference point in different rotation calibration images The position offset in the image, the X-axis translation and the Y-axis translation corresponding to each of the translation calibration images, and the Z-axis rotation corresponding to each of the rotation calibration images determine the calibration information, including: 针对机械臂所进行的N次平移中的第i次平移,计算所述标定参考点的图像在第i-1平移标定图像与第i平移标定图像中的第i像素平移偏移量,其中,所述第i-1平移标定图像为机械臂进行第i次平移前所述相机采集的平移标定图像,所述第i平移标定图像为机械臂进行第i次平移后所述相机采集的平移标定图像,i为小于N的正整数;For the i-th translation among the N translations performed by the mechanical arm, calculate the translation offset of the i-th pixel in the i-1th translation calibration image and the i-th translation calibration image of the image of the calibration reference point, wherein, The i-1th translation calibration image is the translation calibration image collected by the camera before the i-th translation of the robotic arm, and the i-th translation calibration image is the translation calibration image collected by the camera after the i-th translation of the robotic arm Image, i is a positive integer less than N; 针对机械臂所进行的M次旋转中的第j次旋转,计算所述标定参考点的图像在第j-1旋转标定图像与第j旋转标定图像中的第j像素旋转偏移量,其中,所述第j-1旋转标定图像为机械臂进行第j次旋转前所述相机采集的旋转标定图像,所述第j旋转标定图像为机械臂进行第j次旋转后所述相机采集的旋转标定图像,j为小于M的正整数;For the j-th rotation among the M rotations performed by the mechanical arm, calculate the j-th pixel rotation offset between the j-1th rotation calibration image and the j-th rotation calibration image of the image of the calibration reference point, wherein, The j-1th rotation calibration image is the rotation calibration image collected by the camera before the j-th rotation of the robotic arm, and the j-th rotation calibration image is the rotation calibration image collected by the camera after the j-th rotation of the robotic arm image, j is a positive integer less than M; 根据所述第i像素平移偏移量与机械臂进行第i次平移对应的X轴平移量和Y轴平移量,及所述第j像素旋转偏移量与机械臂进行第j次旋转对应的Z轴旋转量,确定所述标定信息。According to the i-th pixel translation offset and the X-axis translation and Y-axis translation corresponding to the i-th translation of the robot arm, and the j-th pixel rotation offset corresponding to the j-th rotation of the robot arm Z-axis rotation amount to determine the calibration information. 8.根据权利要求7所述的方法,其中,N等于9,M等于3;8. The method according to claim 7, wherein N is equal to 9 and M is equal to 3; 机械臂进行N次平移时沿X轴方向和沿Y轴方向的平移量组合依次为(x,0)、(x,0)、(0,y)、(-x,0)、(-x,0)、(0,y)、(x,0)、(x,0)和(-x,-y),其中,x用于表征机械臂在所述空间坐标系中沿X轴方向的平移量,y用于表征机械臂在所述空间坐标系中沿Y轴方向的平移量,x和y均不等于0。When the robot arm performs N times of translation, the combination of translation along the X-axis direction and along the Y-axis direction is (x, 0), (x, 0), (0, y), (-x, 0), (-x ,0), (0,y), (x,0), (x,0) and (-x,-y), where x is used to represent the position of the manipulator along the X-axis in the space coordinate system The translation amount, y is used to represent the translation amount of the manipulator along the Y-axis in the space coordinate system, and both x and y are not equal to 0. 9.根据权利要求8所述的方法,其中,x等于y。9. The method of claim 8, wherein x is equal to y. 10.根据权利要求7-9中任一所述的方法,其中,机械臂至少一次沿X轴和/或Y轴方向进行平移的同时绕Z轴进行旋转。10. The method according to any one of claims 7-9, wherein the robot arm is rotated around the Z axis while translating along the X axis and/or the Y axis direction at least once. 11.一种对象抓取装置(700),包括:11. An object grasping device (700), comprising: 获取模块(701),用于获取相机采集到的第一工件图像,其中,所述第一工件图像包括位于载物台上的第一工件的图像;An acquisition module (701), configured to acquire a first workpiece image captured by a camera, wherein the first workpiece image includes an image of a first workpiece located on a stage; 提取模块(702),用于从所述第一工件图像中确定至少一个第一特征点,其中,所述第一特征点用于指示所述第一工件的图像在所述第一工件图像中的位置;An extraction module (702), configured to determine at least one first feature point from the first workpiece image, wherein the first feature point is used to indicate that the image of the first workpiece is in the first workpiece image s position; 确定模块(703),用于根据所述至少一个第一特征点的像素坐标和标定信息,确定所述第一工件在机械臂的空间坐标系中的第一空间坐标,其中,所述标定信息用于指示所述相机所采集图像的像素坐标系与所述空间坐标系之间的映射关系;A determination module (703), configured to determine the first spatial coordinates of the first workpiece in the spatial coordinate system of the manipulator according to the pixel coordinates and calibration information of the at least one first feature point, wherein the calibration information used to indicate the mapping relationship between the pixel coordinate system of the image collected by the camera and the space coordinate system; 抓取模块(704),用于根据所述第一空间坐标生成控制信息,并将所述控制信息发送给所述机械臂,以使所述机械臂根据所述控制信息对所述第一工件进行抓取。A grasping module (704), configured to generate control information according to the first space coordinates, and send the control information to the robotic arm, so that the robotic arm can grasp the first workpiece according to the control information to fetch. 12.一种电子设备(800),包括:处理器(801)、通信接口(802)、存储器(803)和通信总线(804),处理器(801)、存储器(803)和通信接口(802)通过通信总线(804)完成相互间的通信;12. An electronic device (800), comprising: a processor (801), a communication interface (802), a memory (803) and a communication bus (804), a processor (801), a memory (803) and a communication interface (802 ) complete mutual communication through the communication bus (804); 存储器(803)用于存放至少一可执行指令,可执行指令使处理器(801)执行如权利要求1-10中任一项所述的工件抓取方法对应的操作。The memory (803) is used to store at least one executable instruction, and the executable instruction causes the processor (801) to execute the operation corresponding to the workpiece grasping method according to any one of claims 1-10. 13.一种计算机存储介质,其上存储有计算机程序,该程序被处理器执行时实现如权利要求1-10中任一项所述的工件抓取方法。13. A computer storage medium, on which a computer program is stored, and when the program is executed by a processor, the workpiece grasping method according to any one of claims 1-10 is realized. 14.一种计算机程序产品,包括计算机指令,所述计算机指令指示计算设备执行如权利要求1-10中任一项所述的工件抓取方法对应的操作。14. A computer program product, comprising computer instructions, said computer instructions instructing a computing device to perform operations corresponding to the workpiece grasping method according to any one of claims 1-10.
CN202211052358.XA 2022-08-31 2022-08-31 Workpiece grabbing method, device, electronic device and storage medium Pending CN115366105A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211052358.XA CN115366105A (en) 2022-08-31 2022-08-31 Workpiece grabbing method, device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211052358.XA CN115366105A (en) 2022-08-31 2022-08-31 Workpiece grabbing method, device, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN115366105A true CN115366105A (en) 2022-11-22

Family

ID=84069577

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211052358.XA Pending CN115366105A (en) 2022-08-31 2022-08-31 Workpiece grabbing method, device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN115366105A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119240048A (en) * 2024-12-05 2025-01-03 天津云圣智能科技有限责任公司 UAV battery replacement method, device and UAV hangar

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104476552A (en) * 2014-10-30 2015-04-01 佛山金皇宇机械实业有限公司 Machine vision based robot profile carrying device and method thereof
CN106112152A (en) * 2016-06-29 2016-11-16 西安交通大学 A kind of micropore Electrolyzed Processing machine vision localization air navigation aid
CN111445533A (en) * 2020-03-27 2020-07-24 广东博智林机器人有限公司 Binocular camera calibration method, device, equipment and medium
CN112157657A (en) * 2020-09-23 2021-01-01 创新奇智(上海)科技有限公司 Mechanical arm positioning method and device, electronic equipment and storage medium
US20210268659A1 (en) * 2018-09-25 2021-09-02 Visual Robotics Systems Inc. Spatially-Aware Camera and Method Thereof
CN113561178A (en) * 2021-07-30 2021-10-29 燕山大学 An underwater robot intelligent grasping device and method thereof
CN113843798A (en) * 2021-10-11 2021-12-28 深圳先进技术研究院 A method, system and robot for correcting grasping positioning error of a mobile robot

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104476552A (en) * 2014-10-30 2015-04-01 佛山金皇宇机械实业有限公司 Machine vision based robot profile carrying device and method thereof
CN106112152A (en) * 2016-06-29 2016-11-16 西安交通大学 A kind of micropore Electrolyzed Processing machine vision localization air navigation aid
US20210268659A1 (en) * 2018-09-25 2021-09-02 Visual Robotics Systems Inc. Spatially-Aware Camera and Method Thereof
CN111445533A (en) * 2020-03-27 2020-07-24 广东博智林机器人有限公司 Binocular camera calibration method, device, equipment and medium
CN112157657A (en) * 2020-09-23 2021-01-01 创新奇智(上海)科技有限公司 Mechanical arm positioning method and device, electronic equipment and storage medium
CN113561178A (en) * 2021-07-30 2021-10-29 燕山大学 An underwater robot intelligent grasping device and method thereof
CN113843798A (en) * 2021-10-11 2021-12-28 深圳先进技术研究院 A method, system and robot for correcting grasping positioning error of a mobile robot

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119240048A (en) * 2024-12-05 2025-01-03 天津云圣智能科技有限责任公司 UAV battery replacement method, device and UAV hangar

Similar Documents

Publication Publication Date Title
US10551821B2 (en) Robot, robot control apparatus and robot system
CN108827154B (en) Robot non-teaching grabbing method and device and computer readable storage medium
WO2022061673A1 (en) Calibration method and device for robot
WO2019114339A1 (en) Method and device for correcting motion of robotic arm
CN106182004B (en) The method of the industrial robot automatic pin hole assembly of view-based access control model guidance
CN110580725A (en) A kind of box sorting method and system based on RGB-D camera
CN110555889A (en) CALTag and point cloud information-based depth camera hand-eye calibration method
CN113379849A (en) Robot autonomous recognition intelligent grabbing method and system based on depth camera
CN115213896B (en) Object grasping method, system, device and storage medium based on robotic arm
JPWO2018043525A1 (en) Robot system, robot system control apparatus, and robot system control method
JP2013036988A (en) Information processing apparatus and information processing method
CN112132889A (en) Soft magnet posture recognition and automatic grabbing method based on binocular vision
JP2017100202A (en) Robot system, control device, control method, and program
CN113689509A (en) Binocular vision-based disordered grabbing method and system and storage medium
CN116749233A (en) Mechanical arm grabbing system and method based on visual servoing
WO2020179416A1 (en) Robot control device, robot control method, and robot control program
CN111390910A (en) Manipulator target grabbing and positioning method, computer readable storage medium and manipulator
JP6424432B2 (en) Control device, robot system, robot and robot control method
CN114074331A (en) Disordered grabbing method based on vision and robot
CN115366105A (en) Workpiece grabbing method, device, electronic device and storage medium
CN115797332B (en) Object grabbing method and device based on instance segmentation
JP2015003348A (en) Robot control system, control device, robot, control method for robot control system and robot control method
CN117863166A (en) Workpiece placement and positioning system and robot
WO2024021104A1 (en) Robot arm control method, apparatus and system, and electronic device and storage medium
CN114187312A (en) Target object grabbing method, device, system, storage medium and equipment

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