Search

CN-116160456-B - Teaching pose determining method and device and electronic equipment

CN116160456BCN 116160456 BCN116160456 BCN 116160456BCN-116160456-B

Abstract

The embodiment of the application provides a method and a device for determining a teaching pose and electronic equipment. The method comprises the steps of converting target coordinates in an object coordinate system into the object coordinate system again through multiple coordinate conversion according to a current hand-eye calibration result and a first current teaching pose to obtain first converted coordinates, adjusting the first current teaching pose according to a first error between the first converted coordinates and the target coordinates, and determining the first current teaching pose as the target teaching pose of the mechanical arm if the first convergence condition is met. The accuracy of the determined teaching pose is improved.

Inventors

  • WEN ZIMING
  • ZHOU YANG

Assignees

  • 杭州海康机器人股份有限公司

Dates

Publication Date
20260505
Application Date
20230331

Claims (12)

  1. 1. A method for determining a teaching pose, the method comprising: According to a current hand-eye calibration result and a first current teaching pose, converting target coordinates in an object coordinate system into the object coordinate system again through multiple coordinate conversion to obtain first converted coordinates, wherein the current hand-eye calibration result is an initial hand-eye calibration result used by a visual positioning assembly of the mechanical arm at the beginning, and the first current teaching pose is an initial teaching pose at the beginning; According to a first error between the first conversion coordinate and the target coordinate, adjusting the first current teaching pose; if the first convergence condition is met, determining the first current teaching pose as a target teaching pose of the mechanical arm; The converting the target coordinates in the object coordinate system to the object coordinate system again through multiple times of coordinate conversion to obtain first converted coordinates includes: Converting target coordinates in the object coordinate system into a camera coordinate system to obtain camera projection points; converting the camera projection points into a base coordinate system of the mechanical arm to obtain base projection points; Converting the base projection points into a flange coordinate system of the mechanical arm to obtain workpiece projection points; and converting the projection point of the workpiece into the object coordinate system to obtain a first conversion coordinate.
  2. 2. The method according to claim 1, wherein the method further comprises: acquiring at least one grabbing pose and object images corresponding to the grabbing poses, wherein the object images are images obtained by shooting an object by a visual positioning assembly of a mechanical arm when the mechanical arm grabs the object in the grabbing pose; determining a teaching pose according to an initial hand-eye calibration result, each grabbing pose and an object image corresponding to each grabbing pose respectively, and taking the teaching pose as the teaching pose corresponding to the grabbing pose; And determining initial teaching pose according to the teaching pose corresponding to each grabbing pose.
  3. 3. The method according to claim 2, wherein determining an initial teaching pose according to the teaching pose corresponding to each of the grasping poses comprises: screening the teaching pose with the accuracy lower than a preset accuracy threshold value from the teaching poses corresponding to the grabbing poses to obtain a preliminary screening teaching pose; and determining the initial teaching pose according to the initial screening teaching pose.
  4. 4. The method of claim 2, wherein the at least one grasping gesture comprises a plurality of different grasping gestures.
  5. 5. The method of claim 1, wherein adjusting the first current teaching pose according to a first error between the first transformed coordinate and the target coordinate comprises: according to a first error between the first conversion coordinate and the target coordinate, adjusting the first current teaching pose and the current hand-eye calibration result; The method further comprises the steps of: and updating the hand-eye calibration result used by the visual positioning component.
  6. 6. The method of claim 5, wherein the method further comprises: According to the initial hand-eye calibration result and the second current teaching pose, converting target coordinates in an object coordinate system into the object coordinate system again through multiple coordinate conversion to obtain second converted coordinates, wherein the second current teaching pose is the initial teaching pose at the initial time; according to a second error between the second conversion coordinate and the target coordinate, adjusting the second current teaching pose; the updating of the hand-eye calibration results used by the visual positioning component comprises the following steps: If the first error is smaller than the second error and the difference between the first error and the second error is larger than a preset difference threshold, updating the hand-eye calibration result used by the visual positioning component.
  7. 7. The method of claim 6, wherein the method further comprises: And if the first error is not smaller than the second error or the difference is not larger than a preset threshold value, rejecting updating the hand-eye calibration result used by the visual positioning component.
  8. 8. The method of claim 1, wherein adjusting the first current teaching pose according to a first error between the first transformed coordinate and the target coordinate comprises: Determining a gradient descent direction of the first error; And adjusting the first current teaching pose according to the gradient descent direction.
  9. 9. A teaching pose determination device, characterized in that the device comprises: The first conversion module is used for converting target coordinates in an object coordinate system into the object coordinate system again through multiple coordinate conversion according to a current hand-eye calibration result and a first current teaching pose, so as to obtain a first conversion coordinate, wherein the current hand-eye calibration result is an initial hand-eye calibration result used by a visual positioning assembly of the mechanical arm at the beginning, and the first current teaching pose is an initial teaching pose at the beginning; The full optimization module is used for adjusting the first current teaching pose according to a first error between the first conversion coordinate and the target coordinate; The pose determining module is used for determining the first current teaching pose as the target teaching pose of the mechanical arm if the first convergence condition is met; the first conversion module converts the target coordinates in the object coordinate system into the object coordinate system again through multiple times of coordinate conversion to obtain first converted coordinates, and the first conversion module comprises the following steps: Converting target coordinates in the object coordinate system into a camera coordinate system to obtain camera projection points; converting the camera projection points into a base coordinate system of the mechanical arm to obtain base projection points; Converting the base projection points into a flange coordinate system of the mechanical arm to obtain workpiece projection points; and converting the projection point of the workpiece into the object coordinate system to obtain a first conversion coordinate.
  10. 10. The apparatus of claim 9, wherein the apparatus further comprises: the system comprises an initial teaching pose determining module, a teaching pose determining module and a teaching pose determining module, wherein the initial teaching pose determining module is used for obtaining at least one grabbing pose and object images corresponding to the grabbing poses, the object images are images obtained by shooting the objects by a visual positioning component of a mechanical arm when the mechanical arm grabs the objects with the grabbing poses; the initial teaching pose determining module determines an initial teaching pose according to the teaching pose corresponding to each grabbing pose, and the initial teaching pose determining module comprises: screening the teaching pose with the accuracy lower than a preset accuracy threshold value from the teaching poses corresponding to the grabbing poses to obtain a preliminary screening teaching pose; Determining the initial teaching pose according to the initial screening teaching pose; the at least one gripping pose comprises a plurality of different gripping poses; the full optimization module adjusts the first current teaching pose according to a first error between the first conversion coordinate and the target coordinate, including: according to a first error between the first conversion coordinate and the target coordinate, adjusting the first current teaching pose and the current hand-eye calibration result; The apparatus further comprises: the updating module is used for updating the hand-eye calibration result used by the visual positioning component; The apparatus further comprises: the local optimization module is used for converting target coordinates in an object coordinate system into the object coordinate system again through multiple coordinate conversion according to the initial hand-eye calibration result and a second current teaching pose to obtain second converted coordinates, wherein the second current teaching pose is the initial teaching pose initially; The updating module updates the hand-eye calibration result used by the visual positioning component, and the updating module comprises the following steps: if the first error is smaller than the second error and the difference between the first error and the second error is larger than a preset difference threshold, updating a hand-eye calibration result used by the visual positioning assembly; The updating module is further configured to reject updating the hand-eye calibration result used by the visual positioning component if the first error is not less than the second error or the difference is not greater than a preset threshold; the full optimization module adjusts the first current teaching pose according to a first error between the first conversion coordinate and the target coordinate, including: for determining a gradient descent direction of the first error; And adjusting the first current teaching pose according to the gradient descent direction.
  11. 11. An electronic device, comprising: a memory for storing a computer program; A processor for implementing the method of any of claims 1-8 when executing a program stored on a memory.
  12. 12. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program which, when executed by a processor, implements the method of any of claims 1-8.

Description

Teaching pose determining method and device and electronic equipment Technical Field The present application relates to the field of machine vision, and in particular, to a method and an apparatus for determining a teaching pose, and an electronic device. Background In order for the robot arm to accurately grasp the object, it is necessary to adjust the robot arm to a position corresponding to the position of the object, such as 1cm directly above the object, which is often expressed in terms of coordinates in a real space coordinate system (hereinafter, referred to as an object coordinate system), and the position of the robot arm is controlled by adjusting the pose of the flange plate of the robot arm under the base coordinate system of the robot arm. Therefore, in order to adjust the robot arm to a position corresponding to the position of the object, it is necessary to know a conversion relationship between the flange coordinate system and the object coordinate system, which is hereinafter referred to as a teaching pose. Whether the teaching pose directly influences whether the mechanical arm can be accurately controlled to grasp an object or not can be accurately determined. Therefore, how to accurately determine the teaching pose is a technical problem to be solved. Disclosure of Invention The embodiment of the application aims to provide a method and a device for determining a teaching pose and electronic equipment, so as to improve the accuracy of the determined teaching pose. The specific technical scheme is as follows: In a first aspect of the present invention, there is provided a method for determining a teaching pose, the method including: According to a current hand-eye calibration result and a first current teaching pose, converting target coordinates in an object coordinate system into the object coordinate system again through multiple coordinate conversion to obtain first converted coordinates, wherein the current hand-eye calibration result is an initial hand-eye calibration result used by a visual positioning assembly of the mechanical arm at the beginning, and the first current teaching pose is an initial teaching pose at the beginning; According to a first error between the first conversion coordinate and the target coordinate, adjusting the first current teaching pose; and if the first convergence condition is met, determining the first current teaching pose as the target teaching pose of the mechanical arm. In one possible embodiment, the method further comprises: acquiring at least one grabbing pose and object images corresponding to the grabbing poses, wherein the object images are images obtained by shooting an object by a visual positioning assembly of a mechanical arm when the mechanical arm grabs the object in the grabbing pose; determining a teaching pose according to an initial hand-eye calibration result, each grabbing pose and an object image corresponding to each grabbing pose respectively, and taking the teaching pose as the teaching pose corresponding to the grabbing pose; And determining initial teaching pose according to the teaching pose corresponding to each grabbing pose. In a possible embodiment, the determining an initial teaching pose according to the teaching pose corresponding to each grabbing pose includes: screening the teaching pose with the accuracy lower than a preset accuracy threshold value from the teaching poses corresponding to the grabbing poses to obtain a preliminary screening teaching pose; and determining the initial teaching pose according to the initial screening teaching pose. In one possible embodiment, the at least one gripping pose comprises a plurality of different gripping poses. In one possible embodiment, the re-converting the target coordinates in the object coordinate system to the object coordinate system through multiple coordinate conversions to obtain first converted coordinates includes: Converting target coordinates in the object coordinate system into a camera coordinate system to obtain camera projection points; converting the camera projection points into a base coordinate system of the mechanical arm to obtain base projection points; Converting the base projection points into a flange coordinate system of the mechanical arm to obtain workpiece projection points; And converting the projection point of the workpiece into the physical coordinate system to obtain a first conversion coordinate. In a possible embodiment, the adjusting the first current teaching pose according to a first error between the first transformation coordinate and the target coordinate includes: according to a first error between the first conversion coordinate and the target coordinate, adjusting the first current teaching pose and the current hand-eye calibration result; The method further comprises the steps of: and updating the hand-eye calibration result used by the visual positioning component. In one possible embodiment, the method further comprise