WO2018214147A1 - Robot calibration method and system, robot and storage medium - Google Patents

Robot calibration method and system, robot and storage medium Download PDF

Info

Publication number
WO2018214147A1
WO2018214147A1 PCT/CN2017/086094 CN2017086094W WO2018214147A1 WO 2018214147 A1 WO2018214147 A1 WO 2018214147A1 CN 2017086094 W CN2017086094 W CN 2017086094W WO 2018214147 A1 WO2018214147 A1 WO 2018214147A1
Authority
WO
WIPO (PCT)
Prior art keywords
boundary
calibration
robot
moving
gray value
Prior art date
Application number
PCT/CN2017/086094
Other languages
French (fr)
Chinese (zh)
Inventor
阳光
Original Assignee
深圳配天智能技术研究院有限公司
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 深圳配天智能技术研究院有限公司 filed Critical 深圳配天智能技术研究院有限公司
Priority to PCT/CN2017/086094 priority Critical patent/WO2018214147A1/en
Priority to CN201780034033.XA priority patent/CN109952176B/en
Publication of WO2018214147A1 publication Critical patent/WO2018214147A1/en

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B25HAND TOOLS; PORTABLE POWER-DRIVEN TOOLS; MANIPULATORS
    • B25JMANIPULATORS; CHAMBERS PROVIDED WITH MANIPULATION DEVICES
    • B25J9/00Programme-controlled manipulators
    • B25J9/16Programme controls

Definitions

  • the present invention relates to the field of robot coordinate setting technology, and in particular, to a robot calibration method, system, robot, and storage medium.
  • robots have played an increasingly important role in production in manufacturing industries around the world.
  • robots In order to make industrial robots more capable of more complex work, robots not only need better control systems, but also need to be more aware of environmental changes.
  • robot vision has become the most important robot sensing device with its large amount of information and high information integrity.
  • the robot can perform precise welding of the electronic components of the circuit board.
  • the robot can position the workpiece or the working surface by using the camera in the vision system, and calculate the relative position of the working scene relative to the robot to assist the robot to complete the work.
  • the use of the vision system to calculate the conversion relationship between the visual coordinate system and the robot coordinate system has become an important research topic for the development of robots. Obtaining the conversion relationship between the more accurate coordinate systems is the premise for solving the high-precision operation of the robot.
  • existing robots are usually manually controlled to move the robot to the calibration point of the vision system so that the robot uses the vision system to calculate the conversion relationship between the visual coordinate system and the robot coordinate system. This practice usually has large human error. The error resulting in the resulting conversion relationship is large.
  • the object of the present invention is to provide a robot calibration method, system, robot and storage medium, which can improve the accuracy of the conversion relationship between the robot coordinate system and the visual coordinates.
  • the present invention provides a robot calibration method, the method comprising:
  • the controlling the front end of the robot to move from the initial position according to a preset rule on the calibration board includes:
  • the plurality of images of the front end acquired by the visual system are acquired during the moving process, and the change of the gray values on both sides of the first boundary and the second boundary is detected from the plurality of images. And record the moving distance of the front end including:
  • the controlling the movement of the front end of the robot on the calibration board according to the preset rule further includes:
  • the plurality of images of the front end acquired by the visual system are acquired during the moving process, and the change of the gray values on both sides of the first boundary and the second boundary is detected from the plurality of images. And record the distance traveled by the front end, including:
  • the calculating according to the change of the gray value and the moving distance, the coordinates of the initial position of the front end in the visual coordinate system and the coordinates of the calibration point in the robot coordinate system, including:
  • first reference line according to the first position, the second position, the fifth position, and the sixth position
  • second reference line Obtaining a second reference line according to the third position, the fourth position, the seventh position, and the eighth position
  • the coordinates of the intersection of the first reference line and the second reference line are the coordinates of the calibration point in the robot coordinate system.
  • the first reference line is obtained according to the first location, the second location, the fifth location, and the sixth location, specifically:
  • a midpoint between the third position and the fourth position is connected to a midpoint between the seventh position and the eighth position to obtain a second reference line.
  • one boundary line closest to the x-axis of the vision system is defined as a first boundary
  • one boundary line closest to the y-axis of the vision system is defined as a second boundary.
  • the calibration board is a checkerboard set between the black grid and the white grid, and the calibration point set on the calibration board is an intersection of the black grid and the white grid;
  • the first boundary and the second boundary determined according to the calibration point include:
  • the edge lines of the two black and white cells passing through the calibration point are taken as the first boundary line and the second boundary line, respectively.
  • the detecting the change of the gray value on both sides of the first boundary and the second boundary is specifically:
  • a change in a gray value of a plurality of pixels on both sides of the first boundary and the second boundary is detected.
  • the present invention provides a storage medium in which program data is stored, the stored data being executable to implement the robot calibration method described above.
  • the present invention provides a robot calibration system, the system comprising: a visual device, a processor, and a memory; wherein the visual device and the memory are respectively connected to the processor;
  • the visual device is configured to photograph a space operated by a front end of the robot to establish a corresponding visual system
  • the memory is configured to store a preset movement rule of a front end of the robot, and an execution instruction of the processor;
  • the processor is configured to perform the following actions:
  • the controlling the execution of the front end of the robot on the calibration board to move from the initial position according to a preset rule including:
  • the plurality of images of the front end acquired by the visual system acquired during the moving process detect a change of gray values on both sides of the first boundary and the second boundary from the plurality of images; And record the moving distance of the front end, including:
  • the controlling the execution of the front end of the robot on the calibration board to move from the initial position according to a preset rule further comprising:
  • the plurality of images of the front end acquired by the visual system are acquired by the processor during the moving process, and the first boundary and the second boundary are detected from the plurality of images.
  • the change of the gray value, and record the moving distance of the front end further including:
  • Coordinates including:
  • the first reference line is obtained according to the first location, the second location, the fifth location, and the sixth location, specifically:
  • a midpoint between the third position and the fourth position is connected to a midpoint between the seventh position and the eighth position to obtain a second reference line.
  • one boundary line closest to the x-axis of the vision system is defined as a first boundary
  • one boundary line closest to the y-axis of the vision system is defined as a second boundary.
  • the calibration board is a checkerboard set between the black grid and the white grid, and the calibration point set on the calibration board is an intersection of the black grid and the white grid;
  • the first boundary and the second boundary determined according to the calibration point include:
  • the edge lines of the two black and white cells passing through the calibration point are taken as the first boundary line and the second boundary line, respectively.
  • the present invention provides a robot including a robot body and a robot calibration system
  • the robot includes a front end of a robot for grasping an object
  • the robot calibration system includes:
  • a visual device a processor, and a memory; wherein the visual device and the memory are respectively coupled to the processor;
  • the visual device is configured to photograph a space operated by a front end of the robot to establish a corresponding visual system
  • the memory is configured to store a preset movement rule of a front end of the robot, and an execution instruction of the processor;
  • the processor is configured to perform the following actions:
  • one boundary line closest to the x-axis of the vision system is defined as a first boundary
  • one boundary line closest to the y-axis of the vision system is defined as a second boundary.
  • the present invention detects the change of the gray value caused by the above movement by controlling the front end of the robot according to the preset rule, and records the moving distance of the front end; and calculates the initial of the front end.
  • the coordinates of the position in the visual coordinate system and the coordinates of the calibration point in the robot coordinate system; the robot coordinate system is calculated according to the coordinates of the initial position in the visual coordinate system and the coordinates of the calibration point in the robot coordinate system A conversion relationship with the visual coordinate system.
  • the coordinates below are known, so the coordinates of the initial position in the visual coordinate system and the coordinates of the initial position in the robot coordinate system, and the coordinates of the calibration point in the visual coordinate system and the calibration point in the robot coordinate system can be utilized.
  • the coordinates are used to calculate the conversion relationship between the robot coordinate system and the visual coordinates. According to the above method, the accuracy of the conversion relationship between the robot coordinate system and the visual coordinates can be improved.
  • FIG. 1 is a schematic flow chart of a first embodiment of a robot calibration method according to the present invention
  • step S101 in the first embodiment of the method shown in FIG. 1;
  • step S102 in the first embodiment of the method shown in FIG. 1;
  • step S101 in the first embodiment of the method shown in FIG. 1;
  • FIG. 5 is a schematic flowchart of step S102 in the first embodiment of the method shown in FIG. 1;
  • FIG. 6 is a schematic flowchart of step S103 in the first embodiment of the method shown in FIG. 1;
  • FIG. 8 is a schematic structural diagram of an embodiment of a storage medium of the present invention.
  • Figure 9 is a functional block diagram of a first embodiment of the robot calibration system of the present invention.
  • Figure 10 is a schematic view showing the structure of an embodiment of the robot of the present invention.
  • FIG. 1 is a schematic flowchart of a first embodiment of a robot calibration method according to the present invention. The method includes the following steps:
  • the front end of the control robot moves from the initial position according to a preset rule on the calibration plate, wherein the calibration plate is provided with a calibration point for calibration, and a first boundary and a second boundary determined according to the calibration point.
  • the calibration plate Before calibrating the robot, set the calibration plate and set the calibration point on the calibration plate to calibrate the robot.
  • the calibration plate is set within the visual range of the vision system, so that the calibration plate is photographed during the process of moving the robot to obtain a corresponding image for subsequent analysis and calculation of the image.
  • the robot in this embodiment is an industrial robot
  • the calibration of the robot is the calibration of the front end of the robot
  • the mobile robot refers to the front end of the mobile robot.
  • the calibration plate set by the black grid and the white grid is taken as an example.
  • the calibration point in the visual system is the intersection of the black grid and the white grid, and the first boundary and the second boundary are the calibration points.
  • the edge lines of two black and white grids at this time, the gray values on both sides of the first boundary and the second boundary are large differences, one side is the gray value of the black grid, and the other side is the white grid grayscale value.
  • the coordinate system of the vision system is known, and its x-axis and y-axis are also determined, so that the origin of the vision system coincides with the calibration point, and the edge lines of the two black and white grids are closest to the x-axis of the visual system.
  • a boundary line is defined as a first boundary
  • a boundary line closest to the y-axis of the visual system is defined as a second boundary.
  • the movement rule of the front end is set, and the front end of the robot is caused to move correspondingly from the initial position of the placement according to the movement rule.
  • the movement rule of the front end refers to moving step by step according to the minimum moving step of the robot.
  • step S102 Acquire a plurality of images of the front end collected by the visual system during the movement of the front end of the robot in step S101, and detect changes in gray values on both sides of the first boundary and the second boundary from the plurality of images, and record the front end. The distance traveled.
  • the image of the calibration plate is acquired by the vision system. Since the robot moves step by step according to its minimum step, when the image of the calibration plate is acquired, the front end can be acquired once every time the movement is performed. The image of the calibration plate is recorded, and the number of movements of the front end is recorded at the same time. The moving distance of the front end can be calculated by using the number of movements of the front end recorded and the distance of each movement.
  • the acquired image is binarized, and the acquired image does not directly display the specific position of the front end on the calibration plate, but only The area of the gray value corresponding to the front end, which is the front end projected on the calibration plate.
  • the front end can be regarded as a stylus. When the current end contacts the calibration plate, the front end will form a corresponding projection on the calibration plate.
  • the gray value of the projection area is different from the gray value of other positions of the calibration plate, and the calibration plate is detected. The gray value on the change and calculation, the position of the front end on the calibration plate can be obtained.
  • step S103 Since the first boundary and the second boundary both pass through the calibration point, and the difference of the gray values on both sides is significant, the change of the gray value on both sides of the first boundary and the second boundary is detected from the acquired image, and then The first boundary and the two sides of the second boundary respectively obtain a plurality of positions close to the calibration point, and then step S103 is performed.
  • S103 Calculate coordinates of the initial position of the front end in the visual coordinate system and coordinates of the calibration point in the robot coordinate system according to the change of the gray value and the moving distance.
  • Step S102 is capable of acquiring a plurality of positions close to the calibration point, and the initial distances of the front ends of the robots are respectively separated from the first boundary and the second boundary by a first distance and a second distance; and then the calculation may be performed according to the positions close to the calibration point.
  • the coordinates of the calibration point in the robot coordinate system Theoretically, the difference between the coordinates of the calibration point in the robot coordinate system and the coordinates of the set calibration point in the visual coordinate system is less than or equal to the minimum moving step of the robot, and in the ideal state, the calibration point is in the robot coordinate system.
  • the coordinates below are the same as the coordinates of the calibration point in the visual coordinate system.
  • step S103 the coordinates of the initial position of the front end in the visual coordinate system and the coordinates of the calibration point in the robot coordinate system are calculated, and the coordinates of the initial position of the front end in the robot coordinate system and the coordinates of the calibration point in the visual coordinate system are calculated. It is known, therefore, the coordinates of the initial position of the front end in the visual coordinate system and the initial position of the front end in the robot coordinate system, and the coordinates of the calibration point in the robot coordinate system and the calibration point in the visual coordinate system.
  • the coordinates below, based on the matrix equation to establish the mapping relationship, can be calculated to obtain the conversion relationship between the robot coordinate system and the visual coordinate system, thus completing the calibration of the robot.
  • step S101 includes the following steps:
  • the control front end moves along the y direction of the vision system. It will be appreciated that the path of movement of the front end is parallel to the y-axis of the vision system, but not necessarily parallel to the second boundary of the set.
  • the calibration plate may have an angle with the vision system, which causes the second boundary to be non-parallel to the y direction of the vision system, thereby causing the front end to be non-parallel to the second boundary when moving in the y direction of the vision system. .
  • the moving path of the front end of the robot is parallel to the visually apparent x-axis, but not necessarily parallel to the set first boundary.
  • the calibration plate may have an angle with the vision system, causing the first boundary to be non-parallel to the x-direction of the vision system, thereby causing the front end to be non-parallel to the first boundary when moving along the x-direction of the vision system. .
  • step S1011 and step S1012 do not have a strict execution order, and step S011 may be performed first, and then step S1012 may be performed; step S1012 may be performed first, and then step S1011 may be performed.
  • the execution of step S1011 and step S1012 does not affect the final calculation result.
  • step S102 includes the following steps:
  • S1021 Acquire a plurality of images, and detect a change of the first gray value on both sides of the first boundary from the plurality of images; and record a first moving distance of the front end when the gray value on both sides of the first boundary changes And obtaining a first position and a second position of the front end in the y direction before and after the change of the first gray value, and a first distance between the initial position of the front end and the first boundary in the y direction.
  • this step is not performed after the step S1011 and the step S1012 are completely performed, and the step S1021 is executed in the process of moving the front end from the initial position in the y direction of the visual system in step S1011.
  • step S1011 in the process of moving the front end from the initial position in the y direction of the visual system in step S1011, the image of the calibration plate is acquired once every time the front end is moved, and the change of the gray value on both sides of the first boundary is detected.
  • the first moving distance of the front end at this time is recorded, and the first position and the second position of the front end in the y direction before and after the change of the first gray value are obtained. And a first distance between the initial position of the front end and the first boundary in the y direction.
  • the calculation is performed by detecting a change in the gray value of a plurality of pixels on both sides of the first boundary.
  • the recording is performed.
  • the number of movements of the front end can be obtained according to the number of times and the minimum moving step of the front end.
  • the first position of the front end in the y direction is caused before and after the change of the first gray value.
  • the second position is the position after the move.
  • the first location and the second location are both the same side of the second boundary.
  • the distance between the first position and the first boundary can be calculated, and then the front end in the y direction can be calculated according to the number of movements when the front end moves to the first position.
  • the first distance between the initial position and the first boundary can be calculated.
  • S1022 Acquire a plurality of images, and detect a change of the second gray value on both sides of the second boundary from the plurality of images; and record a second moving distance of the front end when the gray value on both sides of the second boundary changes And obtaining a third position and a fourth position of the front end in the x direction before and after the change of the second gray value, and a second distance between the initial position of the front end and the second boundary in the x direction.
  • this step is not performed after the step S1011 and the step S1012 are completely performed, and the step S1022 is executed in the process of moving the front end from the initial position in the x direction of the visual system in step S1012.
  • step S1012 in the process of moving the front end from the initial position in the x direction of the visual system in step S1012, the image of the calibration plate is acquired once every time the front end of the robot is moved, and the change of the gray value on both sides of the second boundary is detected.
  • the second moving distance of the front end is recorded, and the third position and the front end in the x direction are obtained before and after the change of the second gray value.
  • the calculation is performed by detecting a change in the gray value of a plurality of pixels on both sides of the second boundary.
  • the recording is performed.
  • the number of movements of the front end can be obtained according to the number of times and the minimum moving step of the front end.
  • the third position of the front end in the x direction is caused before and after the change of the second gray value.
  • the fourth position is the position after the move.
  • the third location and the fourth location are both the same side of the first boundary.
  • the distance between the third position and the second boundary can be calculated, and then the front end in the x direction can be calculated according to the number of movements when the front end moves to the third position.
  • the second distance between the initial position and the second boundary can be calculated.
  • step S101 further includes the following steps:
  • step S1011 Controlling the front end of the robot according to the second distance, moving from the initial position on the calibration plate in the x direction along the x direction of the vision system until moving to the fourth position obtained in step S1022, and then moving the front end from the fourth position along the vision
  • the y direction of the system moves.
  • the specific step of moving the front end from the fourth position in the y direction of the vision system is similar to step S1011.
  • the specific step of moving the front end from the second position in the x direction of the vision system is similar to step S1012.
  • step S102 further includes the following steps:
  • step S1023 in the process of moving the front end from the fourth position in the y direction of the visual system in step S1013, acquiring a plurality of images, and detecting a change of the first gray value on both sides of the first boundary from the plurality of images;
  • the fifth and sixth positions of the front end in the y direction before and after the change of the first gradation value are obtained.
  • the image of the calibration plate is acquired once for each movement of the front end of the robot.
  • the fifth position of the front end in the y direction is caused before and after the change of the first gradation value.
  • the sixth position is the position after the movement, and the distance between the fifth position and the sixth position is the minimum moving step of the front end, and the fifth position and the sixth position are respectively Both sides of the first boundary.
  • step S1024 in the process of moving the front end from the second position along the x direction of the visual system in step S1014, acquiring a plurality of images, and detecting a change of the second gray value on both sides of the second boundary from the plurality of images;
  • the gradation value on both sides of the second boundary is changed, the seventh and eighth positions of the front end in the x direction before and after the change of the second gradation value are obtained.
  • step S1014 is performed during the execution of step S1014.
  • the image of the calibration plate is acquired once for each movement of the front end of the robot.
  • the current end moves from one side of the second boundary to the other side at a certain movement, causing a change in the second gradation value, causing the seventh position of the front end in the x direction before and after the change of the second gradation value
  • the eighth position is the position after the movement, and the distance between the seventh position and the eighth position is the minimum moving step of the front end, and the seventh position and the eighth position are respectively Both sides of the second boundary.
  • step S103 includes the following steps:
  • S1011 Calculate coordinates of the initial position of the front end in the visual coordinate system according to the first distance and the second distance.
  • the first distance is the distance between the front end in the y direction and the first boundary
  • the second distance is the distance between the front end of the robot in the x direction and the second boundary. Since the first boundary is parallel to the x direction of the vision system and the second boundary is parallel to the y direction when setting the calibration plate, the first boundary can be regarded as the x axis and the second boundary as the y axis.
  • the first distance can be regarded as the distance of the front end from the x-axis in the y direction
  • the second distance is regarded as the distance of the front end from the y-axis in the x direction, that is, the initial position of the front end is obtained in the visual coordinate system. coordinate. It can be understood that there may be an error when setting the calibration plate, and thus the coordinates of the initial position of the obtained front end in the visual coordinate system may have errors.
  • the first reference line obtained according to the first position, the second position, the fifth position, and the sixth position is specifically a middle point between the first position and the second position and a middle position between the fifth position and the sixth position. Connect the points to get the first reference line.
  • the coordinates of the intersection of the first reference line and the second reference line are the coordinates of the calibration point in the robot coordinate system.
  • the difference between the coordinates of the calibration point in the robot coordinate system and the coordinates of the set calibration point in the visual coordinate system is less than or equal to the minimum moving step of the robot.
  • the calibration point is in the robot coordinate system.
  • the coordinates below are the same as the coordinates of the calibration point in the visual coordinate system.
  • the calibration plate is directly opposite to the vision system.
  • the calibration point on the calibration plate is the origin of the vision system.
  • the first boundary coincides with the x-axis and the second boundary coincides with the y-axis.
  • the calibration board is a checkerboard set between black and white. As shown in FIG. 7a, the area A and the area D are white spaces, and the area B and the area C are black spaces. In order to show the influence of the movement of the front end on the gray value, the black area B and C are not filled. Since the calibration plate is facing the vision system at this time, the x-axis and the y-axis are the first boundary and the second boundary, respectively, and the calibration point is the intersection of the x-axis and the y-axis in the visual system.
  • Figure 7a is a grayscale image of the calibration plate acquired by the vision system.
  • the shaded area E is the projection on the calibration plate when the front end contacts the calibration plate. (It can be understood that only the projection near the front end of the calibration plate is drawn in the figure. In fact, the projection of the front end should be continuous and extended to the edge of the calibration plate.).
  • Each cell in the figure represents a pixel.
  • the vision system can only get the grayscale distribution on the calibration plate, and the position of the contact point where the front end is in contact with the calibration plate cannot be directly obtained from the image.
  • the front end is moved from the initial position along the y direction of the visual system.
  • a plurality of images are acquired through step S1021, and the first gray level on both sides of the first boundary is detected from the acquired plurality of images.
  • the change in value Assuming that the front end of the robot moves a minimum step, that is, from one side of the first boundary to the other side of the first boundary, the acquired image is as shown in FIG. 7b, and the calculation is based on the gray distribution of FIGS. 7a and 7b.
  • the first distance between the initial position of the front end of the robot and the first boundary in the y direction is calculated by the gray value in the pixels on both sides of the first boundary.
  • the front end of the robot is returned to the initial position, and the front end is moved from the initial position in the x direction of the vision system through step S1012.
  • a plurality of images are acquired through step S1022, and detected from the acquired plurality of images.
  • a change in the second gray value on either side of the second boundary Assuming that the front end of the robot moves a minimum step, that is, from one side of the second boundary to the other side of the second boundary, the acquired image is as shown in FIG. 7c, and is calculated according to the gray scale distribution of FIGS. 7a and 7c.
  • the change of the second gray value on both sides of the two boundaries further obtains the third position 30 and the fourth position 40 of the front end of the robot before and after the movement.
  • the second distance between the initial position of the front end and the second boundary in the x direction is calculated by the gray value in the pixels on both sides of the second boundary.
  • the front end of the robot is returned to the initial position, and the front end is moved from the initial position to the fourth position in the x direction according to the second moving distance, and then the front end is moved from the fourth position along the y direction of the vision system according to the second moving distance.
  • mobile In the process of moving the front end from the fourth position in the y direction of the visual system, a plurality of images are acquired through step S1023, and changes of the first gray value on both sides of the first boundary are detected from the acquired plurality of images. . Assuming that the front end of the robot moves a minimum step, that is, from the fourth position to the other side of the first boundary, the acquired image is as shown in FIG.
  • the front end of the robot is again returned to the initial position, and the front end is moved from the initial position to the second position in the y direction according to the first moving distance, and then the front end is moved from the second position along the x direction of the vision system according to the first moving distance.
  • mobile In the process of moving the front end from the second position along the x direction of the vision system, a plurality of images are acquired through step S1024, and changes of the second gray value on both sides of the second boundary are detected from the acquired plurality of images. . Assuming that the front end of the robot moves a minimum step, that is, from one side of the second boundary to the other side of the second boundary, the acquired image is as shown in FIG.
  • the first distance between the initial position of the front end in the y direction and the first boundary and the second distance between the initial position of the front end and the second boundary in the x direction can calculate the initial position of the front end.
  • the coordinates in the visual coordinate system can calculate the initial position of the front end.
  • step S1021 and step S1023 the first position 10, the second position 20, the fifth position 50, and the sixth position 60 are acquired, and the midpoint between the first position 10 and the second position 20 is obtained. And the midpoint connection between the fifth position 50 and the sixth position 60, the first reference line L1 shown in Fig. 7f is obtained.
  • step S1021 and step S1023 the third position 30, the fourth position 40, the seventh position 70, and the eighth position 80 are acquired, and the midpoint between the third position 30 and the fourth position 40 is obtained.
  • the midpoint connection between the seventh position 70 and the eighth position 80, the second reference line L2 shown in Fig. 7g is obtained.
  • FIG. 7h the first reference line L1 and the second reference line L2 intersect, and the coordinates of the intersection point H are the coordinates of the calibration point in the robot coordinate system.
  • the distance between the first position and the second position is obtained, and the third The distance between the position and the fourth position, the distance between the fifth position and the sixth position, and the distance between the seventh position and the eighth position are substantially equal to the minimum moving step of the front end, so in theory, the standard The difference between the coordinates of the fixed point in the robot coordinate system and the coordinates of the set calibration point in the visual coordinate system is less than or equal to the minimum moving step of the robot. In the ideal state, the coordinates and the standard of the calibration point in the robot coordinate system The coordinates of the fixed point in the visual coordinate system are the same.
  • FIG. 8 is a schematic structural diagram of an embodiment of a storage medium of the present invention.
  • the storage medium 400 in the present embodiment stores program data 401 that can be executed, and the program data 401 is executed to implement the robot calibration method embodiment shown in FIGS. 1 to 6.
  • the storage medium 400 may be a storage module of the smart terminal, a mobile storage device (such as a mobile hard disk, a USB flash drive, etc.), a network cloud disk, or an application storage platform, and the like.
  • FIG. 9 is a functional block diagram of a first embodiment of the robot calibration system of the present invention.
  • the robot calibration system 200 includes a vision device 201, a processor 202, and a memory 204; wherein the vision device 201 and the memory 204 are respectively coupled to the processor 202;
  • the visual device 201 is configured to photograph a space operated by the front end of the robot to establish a corresponding visual system.
  • the memory 204 is configured to store a preset movement rule of the front end and an execution instruction of the processor.
  • the processor 202 is configured to perform the following actions:
  • the action performed by the processor 202 corresponds to the robot calibration method shown in FIG. 1 to FIG. 6, and the detailed description of the robot calibration method is specifically referred to, and details are not described herein again.
  • FIG. 10 is a schematic structural view of an embodiment of a robot according to the present invention.
  • the robot 300 includes a robot body 301 and a robot calibration system 302.
  • the robot 301 includes a front end of a robot for grabbing an object.
  • the robot calibration system 302 includes a vision device, a processor, and a memory; wherein the vision device and the memory are respectively coupled to the processor.
  • a visual device for photographing the space of the front end operation to establish a corresponding vision system.
  • a memory for storing preset movement rules of the front end and execution instructions of the processor.
  • a processor that performs the following actions:
  • the robot calibration system in this embodiment is the same as the robot calibration system shown in FIG. 9, and details are not described herein again.

Landscapes

  • Engineering & Computer Science (AREA)
  • Robotics (AREA)
  • Mechanical Engineering (AREA)
  • Manipulator (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

Provided are a robot calibration method and system, a robot and a storage medium, the calibration method comprising controlling a frond end of the robot to move according to a pre-set rule (S101); detecting the change condition of a grayscale value caused by the movement, and recording a movement distance of the front end (S102); calculating a coordinate of an original position of the front end in a visual coordinate system and a coordinate of the calibration point in a robot coordinate system (S103); and according to the coordinate of the original position in the visual coordinate system and the coordinate of the calibration point in the robot coordinate system, calculating and obtaining a conversion relationship between the robot coordinate system and the visual coordinate system (S104). The precision of the conversion relationship between the robot coordinate system and the visual coordinate system can be improved by means of the method.

Description

一种机器人标定方法、系统、机器人及存储介质 Robot calibration method, system, robot and storage medium
【技术领域】[Technical Field]
本发明涉及机器人坐标设定技术领域,尤其涉及一种机器人标定方法、系统、机器人及存储介质。The present invention relates to the field of robot coordinate setting technology, and in particular, to a robot calibration method, system, robot, and storage medium.
【背景技术】 【Background technique】
目前,在全世界的制造业中,工业机器人已经在生产中起到越来越重要的作用。为了使工业机器人能够胜任更复杂的工作,机器人不但要有更好的控制系统,还需要更多的感知环境变化。其中,机器人视觉以其信息量大、信息完整度高成为最重要的机器人感知装置。以用机器人进行电路板电子元件的精密焊接为例,焊接过程中,机器人可利用视觉系统中的摄像机对工件或工作面进行定位,计算工作场景相对于机器人的相对位置,以辅助机器人完成作业。At present, industrial robots have played an increasingly important role in production in manufacturing industries around the world. In order to make industrial robots more capable of more complex work, robots not only need better control systems, but also need to be more aware of environmental changes. Among them, robot vision has become the most important robot sensing device with its large amount of information and high information integrity. For example, in the welding process, the robot can perform precise welding of the electronic components of the circuit board. During the welding process, the robot can position the workpiece or the working surface by using the camera in the vision system, and calculate the relative position of the working scene relative to the robot to assist the robot to complete the work.
机器人利用视觉系统计算视觉坐标系与机器人坐标系之间的转换关系成为了机器人发展的重要研究课题,得到较精确的坐标系之间的转换关系是解决机器人完成高精度作业的前提。然而,现有的机器人通常是由人工控制将机器人移动至视觉系统的标定点以使机器人利用视觉系统计算视觉坐标系与机器人坐标系之间的转换关系,这种做法通常存在较大的人为误差,导致得到的转换关系的误差较大。The use of the vision system to calculate the conversion relationship between the visual coordinate system and the robot coordinate system has become an important research topic for the development of robots. Obtaining the conversion relationship between the more accurate coordinate systems is the premise for solving the high-precision operation of the robot. However, existing robots are usually manually controlled to move the robot to the calibration point of the vision system so that the robot uses the vision system to calculate the conversion relationship between the visual coordinate system and the robot coordinate system. This practice usually has large human error. The error resulting in the resulting conversion relationship is large.
【发明内容】 [Summary of the Invention]
本发明的目的在于提供一种机器人标定方法、系统、机器人及存储介质,能够提高机器人坐标系与视觉坐标之间的转换关系的精确度。The object of the present invention is to provide a robot calibration method, system, robot and storage medium, which can improve the accuracy of the conversion relationship between the robot coordinate system and the visual coordinates.
为实现上述目的,本发明提供一种机器人标定方法,该方法包括:To achieve the above object, the present invention provides a robot calibration method, the method comprising:
控制所述机器人的前端在标定板上根据预设规则从初始位置移动,其中,所述标定板上设置有用于标定的标定点,以及根据所述标定点确定的第一边界和第二边界;Controlling a front end of the robot to move from an initial position on a calibration plate according to a preset rule, wherein the calibration plate is provided with a calibration point for calibration, and a first boundary and a second boundary determined according to the calibration point;
在所述移动过程中获取视觉系统采集到的所述前端的多个图像,从所述多个图像中检测所述第一边界和第二边界两侧的灰度值的变化情况,并记录前端的移动距离;Acquiring a plurality of images of the front end collected by the visual system during the moving process, detecting changes of gray values on both sides of the first boundary and the second boundary from the plurality of images, and recording the front end Moving distance
根据所述灰度值的变化情况和所述移动距离计算得到所述前端的初始位置在视觉坐标系下的坐标以及所述标定点在机器人坐标系下的坐标;Calculating coordinates of the initial position of the front end in the visual coordinate system and coordinates of the calibration point in the robot coordinate system according to the change of the gray value and the moving distance;
根据所述初始位置和所述标定点的位置计算得到机器人坐标系与所述视觉坐标系之间的转换关系,从而完成对所述机器人的标定。Calculating a conversion relationship between the robot coordinate system and the visual coordinate system according to the initial position and the position of the calibration point, thereby completing calibration of the robot.
其中,所述控制所述机器人的前端在标定板上根据预设规则从初始位置移动包括:The controlling the front end of the robot to move from the initial position according to a preset rule on the calibration board includes:
将所述前端从所述初始位置沿所述视觉系统的y方向移动; Moving the front end from the initial position along the y direction of the vision system;
以及将所述前端从所述初始位置沿所述视觉系统的x方向移动。And moving the front end from the initial position along the x direction of the vision system.
其中,所述在所述移动过程中获取视觉系统采集到的所述前端的多个图像,从所述多个图像中检测所述第一边界和第二边界两侧的灰度值的变化情况,并记录前端的移动距离包括:The plurality of images of the front end acquired by the visual system are acquired during the moving process, and the change of the gray values on both sides of the first boundary and the second boundary is detected from the plurality of images. And record the moving distance of the front end including:
在所述将所述前端从所述初始位置沿所述视觉系统的y方向移动的过程中,获取所述多个图像,并从所述多个图像中检测所述第一边界两侧的第一灰度值的变化情况;在所述第一边界两侧的灰度值发生变化时,记录前端的第一移动距离,并得到引起所述第一灰度值变化前后,所述前端在y方向上的第一位置和第二位置,以及在y方向上所述前端的初始位置与所述第一边界之间的第一距离;Acquiring the plurality of images in the moving the front end from the initial position in the y direction of the vision system, and detecting the two sides of the first boundary from the plurality of images a change in the gray value; when the gray value on both sides of the first boundary changes, the first moving distance of the front end is recorded, and the front end is obtained before and after the change of the first gray value is obtained. a first position and a second position in the direction, and a first distance between the initial position of the front end and the first boundary in the y direction;
在所述将所述前端从所述初始位置沿所述视觉系统的x方向移动的过程中,获取所述多个图像,并从所述多个图像中检测所述第二边界两侧的第二灰度值的变化情况;在所述第二边界两侧的灰度值发生变化时,记录前端的第二移动距离;并得到引起所述第二灰度值变化前后,所述前端在x方向上的第三位置和第四位置,以及在x方向上所述前端的初始位置与所述第二边界之间的第二距离。Acquiring the plurality of images in the moving the front end from the initial position along the x direction of the vision system, and detecting the two sides of the second boundary from the plurality of images a change of the two gray values; when the gray value on both sides of the second boundary changes, the second moving distance of the front end is recorded; and the front end is at x before and after the change of the second gray value is obtained a third position and a fourth position in the direction, and a second distance between the initial position of the front end and the second boundary in the x direction.
其中,所述控制所述机器人的前端在标定板上根据预设规则移动还包括:The controlling the movement of the front end of the robot on the calibration board according to the preset rule further includes:
根据第二移动距离,将所述前端从所述初始位置沿视觉系统的x方向移动到所述第四位置,之后再将所述前端从所述第四位置沿所述视觉系统的y方向移动;Moving the front end from the initial position in the x direction of the vision system to the fourth position according to a second moving distance, and then moving the front end from the fourth position along the y direction of the vision system ;
以及根据第一移动距离,将所述前端从所述初始位置沿视觉系统的y方向移动到所述第二位置,之后再将所述前端从所述第二位置沿所述视觉系统的x方向移动。And moving the front end from the initial position in the y direction of the vision system to the second position according to the first moving distance, and then moving the front end from the second position along the x direction of the vision system mobile.
其中,所述在所述移动过程中获取视觉系统采集到的所述前端的多个图像,从所述多个图像中检测所述第一边界和第二边界两侧的灰度值的变化情况,并记录前端的移动距离,还包括:The plurality of images of the front end acquired by the visual system are acquired during the moving process, and the change of the gray values on both sides of the first boundary and the second boundary is detected from the plurality of images. And record the distance traveled by the front end, including:
在所述将所述前端从所述第四位置沿所述视觉系统的y方向移动的过程中,获取所述多个图像,并从所述多个图像中检测所述第一边界两侧的第一灰度值的变化情况;在所述第一边界两侧的灰度值发生变化时,得到引起所述第一灰度值变化前后,所述前端在y方向上的第五位和第六位置;Acquiring the plurality of images in the moving the front end from the fourth position along the y direction of the vision system, and detecting two sides of the first boundary from the plurality of images a change of the first gray value; when the gray value on both sides of the first boundary changes, the fifth bit and the first end of the front end in the y direction are obtained before and after the change of the first gray value Six positions;
在所述将所述前端从所述第二位置沿所述视觉系统的x方向移动的过程中,获取所述多个图像,并从所述多个图像中检测所述第二边界两侧的第二灰度值的变化情况;在所述第二边界两侧的灰度值发生变化时,得到引起所述第二灰度值变化前后,所述前端在x方向上的第七位和第八位置。Acquiring the plurality of images in the process of moving the front end from the second position along the x direction of the vision system, and detecting two sides of the second boundary from the plurality of images a change of the second gray value; when the gray value on both sides of the second boundary changes, the seventh bit and the first end of the front end in the x direction are obtained before and after the change of the second gray value Eight positions.
其中,所述根据所述灰度值的变化情况和所述移动距离计算得到所述前端的初始位置在视觉坐标系下的坐标以及所述标定点在机器人坐标系下的坐标,包括:The calculating, according to the change of the gray value and the moving distance, the coordinates of the initial position of the front end in the visual coordinate system and the coordinates of the calibration point in the robot coordinate system, including:
根据所述第一距离和第二距离,计算得到所述前端的初始位置在所述视觉坐标系下的坐标;Calculating, according to the first distance and the second distance, coordinates of an initial position of the front end in the visual coordinate system;
根据所述第一位置、第二位置、第五位置和第六位置得到第一参考线,根据所述第三位置、第四位置、第七位置和第八位置得到第二参考线,所述第一参考线和所述第二参考线的交点的坐标即为所述标定点在机器人坐标系下的坐标。Obtaining a first reference line according to the first position, the second position, the fifth position, and the sixth position, and obtaining a second reference line according to the third position, the fourth position, the seventh position, and the eighth position, The coordinates of the intersection of the first reference line and the second reference line are the coordinates of the calibration point in the robot coordinate system.
其中,所述根据所述第一位置、第二位置、第五位置和第六位置得到第一参考线,具体为:The first reference line is obtained according to the first location, the second location, the fifth location, and the sixth location, specifically:
将所述第一位置和第二位置之间的中点与所述第五位置和第六位置之间的中点进行连线,得到第一参考线;Connecting a midpoint between the first location and the second location to a midpoint between the fifth location and the sixth location to obtain a first reference line;
根据所述第三位置、第四位置、第七位置和第八位置得到第二参考线,具体为:Obtaining a second reference line according to the third location, the fourth location, the seventh location, and the eighth location, specifically:
将所述第三位置和第四位置之间的中点与所述第七位置和第八位置之间的中点进行连线,得到第二参考线。A midpoint between the third position and the fourth position is connected to a midpoint between the seventh position and the eighth position to obtain a second reference line.
其中,所述视觉系统的原点与所述标定点重合时;Wherein the origin of the vision system coincides with the calibration point;
将所述两条边界线中,与所述视觉系统的x轴最近的一条边界线定义为第一边界,与所述视觉系统的y轴最近的一条边界线定义为第二边界。Among the two boundary lines, one boundary line closest to the x-axis of the vision system is defined as a first boundary, and one boundary line closest to the y-axis of the vision system is defined as a second boundary.
其中,所述标定板为黑格和白格相间设置的棋盘格,所述标定板上设置的标定点为所述黑格和所述白格的交点;Wherein the calibration board is a checkerboard set between the black grid and the white grid, and the calibration point set on the calibration board is an intersection of the black grid and the white grid;
所述根据所述标定点确定的第一边界和第二边界,包括:The first boundary and the second boundary determined according to the calibration point include:
将经过所述标定点的两条黑白格的边缘线分别作为第一边界线和第二边界线。The edge lines of the two black and white cells passing through the calibration point are taken as the first boundary line and the second boundary line, respectively.
其中,所述检测所述第一边界和所述第二边界两侧的灰度值的变化情况,具体为:The detecting the change of the gray value on both sides of the first boundary and the second boundary is specifically:
检测所述第一边界和所述第二边界两侧的若干个像素的灰度值的变化情况。A change in a gray value of a plurality of pixels on both sides of the first boundary and the second boundary is detected.
另一方面,本发明提出一种存储介质,其中,该存储介质存储有程序数据,所述存储数据能够被执行以实现上述的机器人标定方法。In another aspect, the present invention provides a storage medium in which program data is stored, the stored data being executable to implement the robot calibration method described above.
另一方面,本发明提出了一种机器人标定系统,该系统包括:包括:视觉装置、处理器和存储器;其中,所述视觉装置和存储器分别与所述处理器连接;In another aspect, the present invention provides a robot calibration system, the system comprising: a visual device, a processor, and a memory; wherein the visual device and the memory are respectively connected to the processor;
所述视觉装置,用于对机器人的前端操作的空间进行拍摄,建立相应的视觉系统;The visual device is configured to photograph a space operated by a front end of the robot to establish a corresponding visual system;
所述存储器,用于存储机器人的前端的预设移动规则,以及所述处理器的执行指令;The memory is configured to store a preset movement rule of a front end of the robot, and an execution instruction of the processor;
所述处理器,用于执行下述动作:The processor is configured to perform the following actions:
控制所述机器人的前端在标定板上根据预设规则从初始位置移动,其中,所述标定板上设置有用于标定的标定点,以及根据所述标定点确定的第一边界和第二边界;Controlling a front end of the robot to move from an initial position on a calibration plate according to a preset rule, wherein the calibration plate is provided with a calibration point for calibration, and a first boundary and a second boundary determined according to the calibration point;
在所述移动过程中获取视觉系统采集到的所述前端的多个图像,从所述多个图像中检测所述第一边界和第二边界两侧的灰度值的变化情况,并记录前端的移动距离;Acquiring a plurality of images of the front end collected by the visual system during the moving process, detecting changes of gray values on both sides of the first boundary and the second boundary from the plurality of images, and recording the front end Moving distance
根据所述灰度值的变化情况和所述移动距离计算得到所述前端的初始位置在视觉坐标系下的坐标以及所述标定点在机器人坐标系下的坐标;Calculating coordinates of the initial position of the front end in the visual coordinate system and coordinates of the calibration point in the robot coordinate system according to the change of the gray value and the moving distance;
根据所述初始位置和所述标定点的位置计算得到机器人坐标系与所述视觉坐标系之间的转换关系,从而完成对所述机器人的标定。Calculating a conversion relationship between the robot coordinate system and the visual coordinate system according to the initial position and the position of the calibration point, thereby completing calibration of the robot.
其中,所述处理器执行的所述控制所述机器人的前端在标定板上根据预设规则从初始位置移动,包括:The controlling the execution of the front end of the robot on the calibration board to move from the initial position according to a preset rule, including:
将所述前端从所述初始位置沿所述视觉系统的y方向移动; Moving the front end from the initial position along the y direction of the vision system;
以及将所述前端从所述初始位置沿所述视觉系统的x方向移动。And moving the front end from the initial position along the x direction of the vision system.
其中,所述在所述移动过程中获取视觉系统采集到的所述前端的多个图像从所述多个图像中检测所述第一边界和第二边界两侧的灰度值的变化情况;并记录前端的移动距离,包括:The plurality of images of the front end acquired by the visual system acquired during the moving process detect a change of gray values on both sides of the first boundary and the second boundary from the plurality of images; And record the moving distance of the front end, including:
在所述将所述前端从所述初始位置沿所述视觉系统的y方向移动的过程中,获取所述多个图像,并从所述多个图像中检测所述第一边界两侧的第一灰度值的变化情况;在所述第一边界两侧的灰度值发生变化时,记录所述前端的第一移动距离,并得到引起所述第一灰度值变化前后,所述前端在y方向上的第一位置和第二位置,以及在y方向上所述前端的初始位置与所述第一边界之间的第一距离;Acquiring the plurality of images in the moving the front end from the initial position in the y direction of the vision system, and detecting the two sides of the first boundary from the plurality of images a change of a gray value; when the gray value on both sides of the first boundary changes, recording a first moving distance of the front end, and obtaining a front end before and after the change of the first gray value a first position and a second position in the y direction, and a first distance between the initial position of the front end and the first boundary in the y direction;
在所述将所述前端从所述初始位置沿所述视觉系统的x方向移动的过程中,获取所述多个图像,并从所述多个图像中检测所述第二边界两侧的第二灰度值的变化情况;在所述第二边界两侧的灰度值发生变化时,记录前端的第二移动距离;并得到引起所述第二灰度值变化前后,所述前端在x方向上的第三位置和第四位置,以及在x方向上所述前端的初始位置与所述第二边界之间的第二距离。Acquiring the plurality of images in the moving the front end from the initial position along the x direction of the vision system, and detecting the two sides of the second boundary from the plurality of images a change of the two gray values; when the gray value on both sides of the second boundary changes, the second moving distance of the front end is recorded; and the front end is at x before and after the change of the second gray value is obtained a third position and a fourth position in the direction, and a second distance between the initial position of the front end and the second boundary in the x direction.
其中,所述处理器执行的所述控制所述机器人的前端在标定板上根据预设规则从初始位置移动,进一步包括:The controlling the execution of the front end of the robot on the calibration board to move from the initial position according to a preset rule, further comprising:
根据第二移动距离,将所述前端从所述初始位置沿视觉系统的x方向移动到所述第四位置,之后再将所述前端从所述第四位置沿所述视觉系统的y方向移动;Moving the front end from the initial position in the x direction of the vision system to the fourth position according to a second moving distance, and then moving the front end from the fourth position along the y direction of the vision system ;
以及根据第一移动距离,将所述前端从所述初始位置沿视觉系统的y方向移动到所述第二位置,之后再将所述前端从所述第二位置沿所述视觉系统的x方向移动。And moving the front end from the initial position in the y direction of the vision system to the second position according to the first moving distance, and then moving the front end from the second position along the x direction of the vision system mobile.
其中,所述处理器执行的所述在所述移动过程中获取视觉系统采集到的所述前端的多个图像,从所述多个图像中检测所述第一边界和第二边界两侧的灰度值的变化情况,并记录前端的移动距离,进一步包括:The plurality of images of the front end acquired by the visual system are acquired by the processor during the moving process, and the first boundary and the second boundary are detected from the plurality of images. The change of the gray value, and record the moving distance of the front end, further including:
在所述将所述前端从所述第四位置沿所述视觉系统的y方向移动的过程中,获取所述多个图像,并从所述多个图像中检测所述第一边界两侧的第一灰度值的变化情况;在所述第一边界两侧的灰度值发生变化时,得到引起所述第一灰度值变化前后,所述前端在y方向上的第五位和第六位置;Acquiring the plurality of images in the moving the front end from the fourth position along the y direction of the vision system, and detecting two sides of the first boundary from the plurality of images a change of the first gray value; when the gray value on both sides of the first boundary changes, the fifth bit and the first end of the front end in the y direction are obtained before and after the change of the first gray value Six positions;
在所述将所述前端从所述第二位置沿所述视觉系统的x方向移动的过程中,获取所述多个图像,并从所述多个图像中检测所述第二边界两侧的第二灰度值的变化情况;在所述第二边界两侧的灰度值发生变化时,得到引起所述第二灰度值变化前后,所述前端在x方向上的第七位和第八位置。Acquiring the plurality of images in the process of moving the front end from the second position along the x direction of the vision system, and detecting two sides of the second boundary from the plurality of images a change of the second gray value; when the gray value on both sides of the second boundary changes, the seventh bit and the first end of the front end in the x direction are obtained before and after the change of the second gray value Eight positions.
其中,所述处理器执行的所述根据所述灰度值的变化情况和所述移动距离计算得到所述前端的初始位置在视觉坐标系下的坐标以及所述标定点在机器人坐标系下的坐标,包括:The calculation performed by the processor according to the change of the gray value and the moving distance, the coordinates of the initial position of the front end in the visual coordinate system and the calibration point in the robot coordinate system. Coordinates, including:
根据所述第一距离和第二距离,计算得到所述前端的初始位置在所述视觉系统中的坐标;Calculating, according to the first distance and the second distance, coordinates of an initial position of the front end in the vision system;
根据所述第一位置、第二位置、第五位置和第六位置得到第一参考线,根据所述第三位置、第四位置、第七位置和第八位置得到第二参考线,所述第一参考线和所述第二参考线的交点即为所述标定点在机器人坐标系下的坐标。Obtaining a first reference line according to the first position, the second position, the fifth position, and the sixth position, and obtaining a second reference line according to the third position, the fourth position, the seventh position, and the eighth position, The intersection of the first reference line and the second reference line is the coordinate of the calibration point in the robot coordinate system.
其中,所述根据所述第一位置、第二位置、第五位置和第六位置得到第一参考线,具体为:The first reference line is obtained according to the first location, the second location, the fifth location, and the sixth location, specifically:
将所述第一位置和第二位置之间的中点与所述第五位置和第六位置之间的中点进行连线,得到第一参考线;Connecting a midpoint between the first location and the second location to a midpoint between the fifth location and the sixth location to obtain a first reference line;
根据所述第三位置、第四位置、第七位置和第八位置得到第二参考线,具体为:Obtaining a second reference line according to the third location, the fourth location, the seventh location, and the eighth location, specifically:
将所述第三位置和第四位置之间的中点与所述第七位置和第八位置之间的中点进行连线,得到第二参考线。A midpoint between the third position and the fourth position is connected to a midpoint between the seventh position and the eighth position to obtain a second reference line.
其中,所述视觉系统的原点与所述标定点重合时;Wherein the origin of the vision system coincides with the calibration point;
将所述两条边界线中,与所述视觉系统的x轴最近的一条边界线定义为第一边界,与所述视觉系统的y轴最近的一条边界线定义为第二边界。Among the two boundary lines, one boundary line closest to the x-axis of the vision system is defined as a first boundary, and one boundary line closest to the y-axis of the vision system is defined as a second boundary.
其中,所述标定板为黑格和白格相间设置的棋盘格,所述标定板上设置的标定点为所述黑格和所述白格的交点;Wherein the calibration board is a checkerboard set between the black grid and the white grid, and the calibration point set on the calibration board is an intersection of the black grid and the white grid;
所述根据所述标定点确定的第一边界和第二边界,包括:The first boundary and the second boundary determined according to the calibration point include:
将经过所述标定点的两条黑白格的边缘线分别作为第一边界线和第二边界线。The edge lines of the two black and white cells passing through the calibration point are taken as the first boundary line and the second boundary line, respectively.
另一方面,本发明提出了一种机器人,该机器人包括机器人本体以及机器人标定系统,In another aspect, the present invention provides a robot including a robot body and a robot calibration system,
所述机器人包括用于抓取物体的机器人的前端;The robot includes a front end of a robot for grasping an object;
所述机器人标定系统包括:The robot calibration system includes:
视觉装置、处理器和存储器;其中,所述视觉装置和存储器分别与所述处理器连接; a visual device, a processor, and a memory; wherein the visual device and the memory are respectively coupled to the processor;
所述视觉装置,用于对机器人的前端操作的空间进行拍摄,建立相应的视觉系统;The visual device is configured to photograph a space operated by a front end of the robot to establish a corresponding visual system;
所述存储器,用于存储机器人的前端的预设移动规则,以及所述处理器的执行指令;The memory is configured to store a preset movement rule of a front end of the robot, and an execution instruction of the processor;
所述处理器,用于执行下述动作:The processor is configured to perform the following actions:
控制所述机器人的前端在标定板上根据预设规则从初始位置移动,其中,所述标定板上设置有用于标定的标定点,以及根据所述标定点确定的第一边界和第二边界;Controlling a front end of the robot to move from an initial position on a calibration plate according to a preset rule, wherein the calibration plate is provided with a calibration point for calibration, and a first boundary and a second boundary determined according to the calibration point;
在所述移动过程中获取视觉系统采集到的所述前端的多个图像,从所述多个图像中检测所述第一边界和第二边界两侧的灰度值的变化情况,并记录前端的移动距离;Acquiring a plurality of images of the front end collected by the visual system during the moving process, detecting changes of gray values on both sides of the first boundary and the second boundary from the plurality of images, and recording the front end Moving distance
根据所述灰度值的变化情况和所述移动距离计算得到所述前端的初始位置在视觉坐标系下的坐标以及所述标定点在机器人坐标系下的坐标;Calculating coordinates of the initial position of the front end in the visual coordinate system and coordinates of the calibration point in the robot coordinate system according to the change of the gray value and the moving distance;
根据所述初始位置和所述标定点的位置计算得到机器人坐标系与所述视觉坐标系之间的转换关系,从而完成对所述机器人的标定。Calculating a conversion relationship between the robot coordinate system and the visual coordinate system according to the initial position and the position of the calibration point, thereby completing calibration of the robot.
其中,所述视觉系统的原点与所述标定点重合时;Wherein the origin of the vision system coincides with the calibration point;
将所述两条边界线中,与所述视觉系统的x轴最近的一条边界线定义为第一边界,与所述视觉系统的y轴最近的一条边界线定义为第二边界。Among the two boundary lines, one boundary line closest to the x-axis of the vision system is defined as a first boundary, and one boundary line closest to the y-axis of the vision system is defined as a second boundary.
有益效果:区别于现有技术的情况,本发明通过控制机器人的前端根据预设规则移动,检测有上述移动引起的灰度值的变化情况,并记录前端的移动距离;计算所述前端的初始位置在视觉坐标系下的坐标以及所述标定点在机器人坐标系下的坐标;根据所述初始位置在视觉坐标系下的坐标以及所述标定点在机器人坐标系下的坐标计算得到机器人坐标系与所述视觉坐标系之间的转换关系。利用上述方法,能够计算得到前端的初始位置在视觉坐标系下的坐标以及所述标定点在机器人坐标系下的坐标,由于初始位置在机器人坐标系下的坐标以及所述标定点在视觉坐标系下的坐标是已知的,因此能够利用初始位置在视觉坐标系下的坐标和初始位置在机器人坐标系下的坐标,以及标定点在视觉坐标系下的坐标和标定点在机器人坐标系下的坐标,计算得到机器人坐标系与视觉坐标之间的转换关系,根据上述方法能够提高机器人坐标系与视觉坐标之间的转换关系的精确度。Advantageous Effects: Different from the prior art, the present invention detects the change of the gray value caused by the above movement by controlling the front end of the robot according to the preset rule, and records the moving distance of the front end; and calculates the initial of the front end. The coordinates of the position in the visual coordinate system and the coordinates of the calibration point in the robot coordinate system; the robot coordinate system is calculated according to the coordinates of the initial position in the visual coordinate system and the coordinates of the calibration point in the robot coordinate system A conversion relationship with the visual coordinate system. With the above method, the coordinates of the initial position of the front end in the visual coordinate system and the coordinates of the calibration point in the robot coordinate system can be calculated, since the coordinates of the initial position in the robot coordinate system and the calibration point are in the visual coordinate system. The coordinates below are known, so the coordinates of the initial position in the visual coordinate system and the coordinates of the initial position in the robot coordinate system, and the coordinates of the calibration point in the visual coordinate system and the calibration point in the robot coordinate system can be utilized. The coordinates are used to calculate the conversion relationship between the robot coordinate system and the visual coordinates. According to the above method, the accuracy of the conversion relationship between the robot coordinate system and the visual coordinates can be improved.
【附图说明】 [Description of the Drawings]
图1是是本发明机器人标定方法第一实施例的流程示意图;1 is a schematic flow chart of a first embodiment of a robot calibration method according to the present invention;
图2是图1所示的方法第一实施例中的步骤S101的流程示意图;2 is a schematic flow chart of step S101 in the first embodiment of the method shown in FIG. 1;
图3是图1所示的方法第一实施例中的步骤S102的流程示意图;3 is a schematic flow chart of step S102 in the first embodiment of the method shown in FIG. 1;
图4是图1所示的方法第一实施例中的步骤S101的流程示意图;4 is a schematic flow chart of step S101 in the first embodiment of the method shown in FIG. 1;
图5是图1所示的方法第一实施例中的步骤S102的流程示意图;FIG. 5 is a schematic flowchart of step S102 in the first embodiment of the method shown in FIG. 1;
图6是图1所示的方法第一实施例中的步骤S103的流程示意图;FIG. 6 is a schematic flowchart of step S103 in the first embodiment of the method shown in FIG. 1;
图7a-图7h是本发明机器人标定方法第一实施例的另一流程示意图;7a-7h are another flow diagrams of the first embodiment of the robot calibration method of the present invention;
图8是本发明存储介质实施例的结构示意图;8 is a schematic structural diagram of an embodiment of a storage medium of the present invention;
图9是本发明机器人标定系统第一实施例的功能模块图;Figure 9 is a functional block diagram of a first embodiment of the robot calibration system of the present invention;
图10是本发明机器人一实施例的结构示意图。Figure 10 is a schematic view showing the structure of an embodiment of the robot of the present invention.
【具体实施方式】【detailed description】
为使本领域的技术人员更好地理解本发明的技术方案,下面结合附图和具体实施方式对本发明所提供的一种机器人标定方法、系统、机器人及存储介质做进一步详细描述。显然,所描述的实施方式仅仅是本发明一种机器人标定方法、系统、机器人及存储介质的一部分实施方式,而不是全部的实施方式。基于本发明中的实施方式,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施方式,均属于本发明保护的范围。In order to enable those skilled in the art to better understand the technical solutions of the present invention, a robot calibration method, system, robot and storage medium provided by the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It will be apparent that the described embodiments are merely a partial embodiment of a robot calibration method, system, robot, and storage medium of the present invention, rather than all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
参阅图1,图1是本发明机器人标定方法第一实施例的流程示意图,该方法包括如下步骤:Referring to FIG. 1, FIG. 1 is a schematic flowchart of a first embodiment of a robot calibration method according to the present invention. The method includes the following steps:
S101、控制机器人的前端在标定板上根据预设规则从初始位置移动,其中,标定板上设置有用于标定的标定点,以及根据标定点确定的第一边界和第二边界。S101. The front end of the control robot moves from the initial position according to a preset rule on the calibration plate, wherein the calibration plate is provided with a calibration point for calibration, and a first boundary and a second boundary determined according to the calibration point.
在对机器人进行标定前,设置标定板,在标定板上设置用于标定该机器人的标定点。标定板设置在视觉系统的视觉范围之内,以便在移动机器人的过程中对标定板进行拍照获取相应的图像,以对图像进行后续分析和计算。可以理解的是,本实施例中的机器人为工业机器人,对机器人的标定即为对机器人前端的标定,移动机器人即指移动机器人前端。Before calibrating the robot, set the calibration plate and set the calibration point on the calibration plate to calibrate the robot. The calibration plate is set within the visual range of the vision system, so that the calibration plate is photographed during the process of moving the robot to obtain a corresponding image for subsequent analysis and calculation of the image. It can be understood that the robot in this embodiment is an industrial robot, and the calibration of the robot is the calibration of the front end of the robot, and the mobile robot refers to the front end of the mobile robot.
本实施例以黑格和白格相间设置的棋盘格做标定板为例,在视觉系统中的标定点即为黑格和白格的交点,第一边界和第二边界即为经过标定点的两条黑白格的边缘线,此时,第一边界和第二边界的两侧的灰度值即为具有较大的差异,一侧为黑格的灰度值,另一侧为白格的灰度值。同时,视觉系统的坐标系已知,其x轴和y轴也是确定的,则令视觉系统的原点与所述标定点重合,此时两条黑白格的边缘线中与视觉系统的x轴最近的一条边界线定义为第一边界,与视觉系统的y轴最近的一条边界线定义为第二边界。In this embodiment, the calibration plate set by the black grid and the white grid is taken as an example. The calibration point in the visual system is the intersection of the black grid and the white grid, and the first boundary and the second boundary are the calibration points. The edge lines of two black and white grids, at this time, the gray values on both sides of the first boundary and the second boundary are large differences, one side is the gray value of the black grid, and the other side is the white grid grayscale value. At the same time, the coordinate system of the vision system is known, and its x-axis and y-axis are also determined, so that the origin of the vision system coincides with the calibration point, and the edge lines of the two black and white grids are closest to the x-axis of the visual system. A boundary line is defined as a first boundary, and a boundary line closest to the y-axis of the visual system is defined as a second boundary.
本实施例中,该步骤即使机器人的前端接触标定板,之后设置前端的移动规则,根据该移动规则使机器人的前端从放置的初始位置开始发生相应运动。进一步的,前端的移动规则是指按机器人最小移动步径逐步移动。In this embodiment, if the front end of the robot contacts the calibration plate, the movement rule of the front end is set, and the front end of the robot is caused to move correspondingly from the initial position of the placement according to the movement rule. Further, the movement rule of the front end refers to moving step by step according to the minimum moving step of the robot.
可以理解的是,此时机器人前端在标定板上的初始位置在机器人坐标系中的坐标是已知的,以及标定点在视觉系统的视觉坐标系中的坐标也是已知的。It can be understood that the coordinates of the initial position of the robot front end on the calibration plate in the robot coordinate system are known at this time, and the coordinates of the calibration point in the visual coordinate system of the visual system are also known.
S102、在步骤S101中机器人前端的移动过程中获取视觉系统采集到的前端的多个图像,从多个图像中检测第一边界和第二边界两侧的灰度值的变化情况,并记录前端的移动距离。S102. Acquire a plurality of images of the front end collected by the visual system during the movement of the front end of the robot in step S101, and detect changes in gray values on both sides of the first boundary and the second boundary from the plurality of images, and record the front end. The distance traveled.
在机器人的前端的移动过程中,通过视觉系统获取标定板的图像,由于机器人是按其最小步径一步一步的移动的,因此,获取标定板的图像时,可以是前端每移动一次就获取一次标定板的图像,同时记录下前端的移动次数,利用记录下的前端的移动次数和每次移动的距离,即可计算出前端的移动距离。During the movement of the front end of the robot, the image of the calibration plate is acquired by the vision system. Since the robot moves step by step according to its minimum step, when the image of the calibration plate is acquired, the front end can be acquired once every time the movement is performed. The image of the calibration plate is recorded, and the number of movements of the front end is recorded at the same time. The moving distance of the front end can be calculated by using the number of movements of the front end recorded and the distance of each movement.
由于视觉系统需要对获取的图像进行灰度值的分析,因此,对获取的图像会进行二值化处理,获取的图像中并不能直接显示出前端在标定板上的具体位置,而仅仅是与前端对应的一个灰度值的区域,该区域为前端在标定板上投影。可以将前端看作一个触针,当前端接触标定板时,该前端会在标定板上形成相应的投影,该投影区域的灰度值与标定板其他位置的灰度值不同,通过检测标定板上的灰度值变化,并进行计算,能够得到前端在标定板上的位置。Since the vision system needs to analyze the gray value of the acquired image, the acquired image is binarized, and the acquired image does not directly display the specific position of the front end on the calibration plate, but only The area of the gray value corresponding to the front end, which is the front end projected on the calibration plate. The front end can be regarded as a stylus. When the current end contacts the calibration plate, the front end will form a corresponding projection on the calibration plate. The gray value of the projection area is different from the gray value of other positions of the calibration plate, and the calibration plate is detected. The gray value on the change and calculation, the position of the front end on the calibration plate can be obtained.
由于第一边界和第二边界均经过标定点,并且两侧的灰度值差异明显,因此,从获取的图像中检测第一边界和第二边界两侧的灰度值的变化情况,进而在第一边界和第二边界的两侧分别得到靠近标定点的若干个位置,进而执行步骤S103。Since the first boundary and the second boundary both pass through the calibration point, and the difference of the gray values on both sides is significant, the change of the gray value on both sides of the first boundary and the second boundary is detected from the acquired image, and then The first boundary and the two sides of the second boundary respectively obtain a plurality of positions close to the calibration point, and then step S103 is performed.
S103、根据灰度值的变化情况和移动距离计算得到前端的初始位置在视觉坐标系下的坐标以及标定点在机器人坐标系下的坐标。S103. Calculate coordinates of the initial position of the front end in the visual coordinate system and coordinates of the calibration point in the robot coordinate system according to the change of the gray value and the moving distance.
步骤S102能够获取靠近标定点的若干个位置,以及机器人的前端的初始位置分别距离第一边界和第二边界的第一距离和第二距离;则可以根据该靠近标定点的若干个位置计算得到标定点在机器人坐标系下的坐标。理论上,标定点在机器人坐标系下的坐标与设置的标定点在视觉坐标系下的坐标之间的差距小于或等于机器人的最小移动步径,且在理想状态下,标定点在机器人坐标系下的坐标与标定点在视觉坐标系下的坐标相同。Step S102 is capable of acquiring a plurality of positions close to the calibration point, and the initial distances of the front ends of the robots are respectively separated from the first boundary and the second boundary by a first distance and a second distance; and then the calculation may be performed according to the positions close to the calibration point. The coordinates of the calibration point in the robot coordinate system. Theoretically, the difference between the coordinates of the calibration point in the robot coordinate system and the coordinates of the set calibration point in the visual coordinate system is less than or equal to the minimum moving step of the robot, and in the ideal state, the calibration point is in the robot coordinate system. The coordinates below are the same as the coordinates of the calibration point in the visual coordinate system.
S104、根据初始位置和标定点的位置计算得到机器人坐标系与视觉坐标系之间的转换关系,从而完成对机器人的标定。S104. Calculate a conversion relationship between the robot coordinate system and the visual coordinate system according to the initial position and the position of the calibration point, thereby completing calibration of the robot.
步骤S103中计算得到了前端的初始位置在视觉坐标系下的坐标以及标定点在机器人坐标系下的坐标,且前端的初始位置在机器人坐标系下的坐标和标定点在视觉坐标系下的坐标是已知的,因此,利用前端的初始位置在视觉坐标系下的坐标和前端的初始位置在在机器人坐标系下的坐标,以及标定点在机器人坐标系下的坐标和标定点在视觉坐标系下的坐标,根据矩阵方程建立映射关系,即可计算得到机器人坐标系与视觉坐标系之间的转换关系,从而完成对机器人的标定。In step S103, the coordinates of the initial position of the front end in the visual coordinate system and the coordinates of the calibration point in the robot coordinate system are calculated, and the coordinates of the initial position of the front end in the robot coordinate system and the coordinates of the calibration point in the visual coordinate system are calculated. It is known, therefore, the coordinates of the initial position of the front end in the visual coordinate system and the initial position of the front end in the robot coordinate system, and the coordinates of the calibration point in the robot coordinate system and the calibration point in the visual coordinate system. The coordinates below, based on the matrix equation to establish the mapping relationship, can be calculated to obtain the conversion relationship between the robot coordinate system and the visual coordinate system, thus completing the calibration of the robot.
进一步的,如图2所示,步骤S101包括一下步骤:Further, as shown in FIG. 2, step S101 includes the following steps:
S1011、将前端从初始位置沿视觉系统的y方向移动。S1011, moving the front end from the initial position in the y direction of the vision system.
控制前端沿着视觉系统的y方向移动。可以理解的是,前端的移动路径与视觉系统的y轴平行,但不一定与设置的第二边界平行。在设置标定板时,标定板可能与视觉系统具有一定夹角,则导致第二边界与视觉系统的y方向不平行,进而导致前端在沿视觉系统的y方向移动时,与第二边界不平行。The control front end moves along the y direction of the vision system. It will be appreciated that the path of movement of the front end is parallel to the y-axis of the vision system, but not necessarily parallel to the second boundary of the set. When the calibration plate is set, the calibration plate may have an angle with the vision system, which causes the second boundary to be non-parallel to the y direction of the vision system, thereby causing the front end to be non-parallel to the second boundary when moving in the y direction of the vision system. .
S1012、将前端从初始位置沿视觉系统的x方向移动。S1012, moving the front end from the initial position along the x direction of the vision system.
与步骤S1011类似,机器人的前端的移动路径与视觉视同的x轴平行,但不一定与设置的第一边界平行。在设置标定板时,标定板可能与视觉系统具有一定夹角,则导致第一边界与视觉系统的x方向不平行,进而导致前端在沿视觉系统的x方向移动时,与第一边界不平行。Similar to step S1011, the moving path of the front end of the robot is parallel to the visually apparent x-axis, but not necessarily parallel to the set first boundary. When setting the calibration plate, the calibration plate may have an angle with the vision system, causing the first boundary to be non-parallel to the x-direction of the vision system, thereby causing the front end to be non-parallel to the first boundary when moving along the x-direction of the vision system. .
值得注意的是,步骤S1011和步骤S1012没有严格的执行顺序,可以先执行步骤S011,再执行步骤S1012;也可以先执行步骤S1012,后执行步骤S1011。步骤S1011和步骤S1012的执行并不影响最终的计算结果。It should be noted that step S1011 and step S1012 do not have a strict execution order, and step S011 may be performed first, and then step S1012 may be performed; step S1012 may be performed first, and then step S1011 may be performed. The execution of step S1011 and step S1012 does not affect the final calculation result.
进一步的,如图3所示,步骤S102包括以下步骤:Further, as shown in FIG. 3, step S102 includes the following steps:
S1021、获取多个图像,并从多个图像中检测第一边界两侧的第一灰度值的变化情况;在第一边界两侧的灰度值发生变化时,记录前端的第一移动距离,并得到引起第一灰度值变化前后,前端在y方向上的第一位置和第二位置,以及在y方向上前端的初始位置与第一边界之间的第一距离。S1021: Acquire a plurality of images, and detect a change of the first gray value on both sides of the first boundary from the plurality of images; and record a first moving distance of the front end when the gray value on both sides of the first boundary changes And obtaining a first position and a second position of the front end in the y direction before and after the change of the first gray value, and a first distance between the initial position of the front end and the first boundary in the y direction.
需要注意的是,本步骤并不是在完全执行完步骤S1011和步骤S1012之后执行,步骤S1021是在步骤S1011将前端从初始位置沿视觉系统的y方向移动的过程中执行的。It is to be noted that this step is not performed after the step S1011 and the step S1012 are completely performed, and the step S1021 is executed in the process of moving the front end from the initial position in the y direction of the visual system in step S1011.
即本步骤在步骤S1011将前端从初始位置沿视觉系统的y方向移动的过程中,每移动一次前端,即获取一次标定板的图像,并检测第一边界两侧的灰度值的变化情况,当检测到第一边界两侧的灰度值发生变化时,记录此时前端的第一移动距离,并得到引起第一灰度值变化前后,前端在y方向上的第一位置和第二位置,以及在y方向上前端的初始位置与第一边界之间的第一距离。That is, in the process of moving the front end from the initial position in the y direction of the visual system in step S1011, the image of the calibration plate is acquired once every time the front end is moved, and the change of the gray value on both sides of the first boundary is detected. When it is detected that the gray value on both sides of the first boundary changes, the first moving distance of the front end at this time is recorded, and the first position and the second position of the front end in the y direction before and after the change of the first gray value are obtained. And a first distance between the initial position of the front end and the first boundary in the y direction.
具体的,本实施例通过检测第一边界两侧的若干个像素的灰度值的变化情况来进行计算,当检测到第一边界两侧的若干个像素的灰度值发生变化时,记录下此时前端的移动次数,根据该次数和前端的最小移动步径即可得到前端的第一移动距离。当前端在某一次移动时,从第一边界的一侧移动到另一侧时,引起第一灰度值变化,则引起第一灰度值变化前后,前端在y方向上的第一位置即为这次移动前的位置,第二位置即为这次移动后的位置。第一位置和第二位置均为第二边界的同一侧。通过获取第一边界两侧的像素的灰度值,能够计算到第一位置与第一边界之间的距离,再根据前端移动到第一位置时的移动次数即可计算得到在y方向上前端的初始位置与第一边界之间的第一距离。Specifically, in this embodiment, the calculation is performed by detecting a change in the gray value of a plurality of pixels on both sides of the first boundary. When the gray value of several pixels on both sides of the first boundary is detected, the recording is performed. At this time, the number of movements of the front end can be obtained according to the number of times and the minimum moving step of the front end. When the current end moves from one side of the first boundary to the other side during a certain movement, causing the first gray value to change, the first position of the front end in the y direction is caused before and after the change of the first gray value. For the position before the move, the second position is the position after the move. The first location and the second location are both the same side of the second boundary. By obtaining the gray value of the pixels on both sides of the first boundary, the distance between the first position and the first boundary can be calculated, and then the front end in the y direction can be calculated according to the number of movements when the front end moves to the first position. The first distance between the initial position and the first boundary.
S1022、获取多个图像,并从多个图像中检测第二边界两侧的第二灰度值的变化情况;在第二边界两侧的灰度值发生变化时,记录前端的第二移动距离;并得到引起第二灰度值变化前后,前端在x方向上的第三位置和第四位置,以及在x方向上前端的初始位置与第二边界之间的第二距离。S1022: Acquire a plurality of images, and detect a change of the second gray value on both sides of the second boundary from the plurality of images; and record a second moving distance of the front end when the gray value on both sides of the second boundary changes And obtaining a third position and a fourth position of the front end in the x direction before and after the change of the second gray value, and a second distance between the initial position of the front end and the second boundary in the x direction.
需要注意的是,本步骤并不是在完全执行完步骤S1011和步骤S1012之后执行,步骤S1022是在步骤S1012将前端从初始位置沿视觉系统的x方向移动的过程中执行的。It is to be noted that this step is not performed after the step S1011 and the step S1012 are completely performed, and the step S1022 is executed in the process of moving the front end from the initial position in the x direction of the visual system in step S1012.
即本步骤在步骤S1012将前端从初始位置沿视觉系统的x方向移动的过程中,每移动一次机器人的前端,即获取一次标定板的图像,并检测第二边界两侧的灰度值的变化情况,当检测到第二边界两侧的灰度值发生变化时,记录此时前端的第二移动距离,并得到引起第二灰度值变化前后,前端在x方向上的第三位置和第四位置,以及在x方向上前端的初始位置与第二边界之间的第二距离。That is, in this step, in the process of moving the front end from the initial position in the x direction of the visual system in step S1012, the image of the calibration plate is acquired once every time the front end of the robot is moved, and the change of the gray value on both sides of the second boundary is detected. In the case, when it is detected that the gray value on both sides of the second boundary changes, the second moving distance of the front end is recorded, and the third position and the front end in the x direction are obtained before and after the change of the second gray value. Four positions, and a second distance between the initial position of the front end and the second boundary in the x direction.
具体的,本实施例通过检测第二边界两侧的若干个像素的灰度值的变化情况来进行计算,当检测到第二边界两侧的若干个像素的灰度值发生变化时,记录下此时前端的移动次数,根据该次数和前端的最小移动步径即可得到前端的第二移动距离。当前端在某一次移动时,从第二边界的一侧移动到另一侧时,引起第二灰度值变化,则引起第二灰度值变化前后,前端在x方向上的第三位置即为这次移动前的位置,第四位置即为这次移动后的位置。第三位置和第四位置均为第一边界的同一侧。通过获取第二边界两侧的像素的灰度值,能够计算到第三位置与第二边界之间的距离,再根据前端移动到第三位置时的移动次数即可计算得到在x方向上前端的初始位置与第二边界之间的第二距离。Specifically, in this embodiment, the calculation is performed by detecting a change in the gray value of a plurality of pixels on both sides of the second boundary. When the gray value of several pixels on both sides of the second boundary is detected to be changed, the recording is performed. At this time, the number of movements of the front end can be obtained according to the number of times and the minimum moving step of the front end. When the current end moves from one side of the second boundary to the other side during a certain movement, causing the second gray value to change, the third position of the front end in the x direction is caused before and after the change of the second gray value. For the position before the move, the fourth position is the position after the move. The third location and the fourth location are both the same side of the first boundary. By obtaining the gray value of the pixels on both sides of the second boundary, the distance between the third position and the second boundary can be calculated, and then the front end in the x direction can be calculated according to the number of movements when the front end moves to the third position. The second distance between the initial position and the second boundary.
进一步的,如图4所示,步骤S101还包括如下步骤:Further, as shown in FIG. 4, step S101 further includes the following steps:
S1013、根据第二移动距离,将前端从初始位置沿视觉系统的x方向移动到第四位置,之后再将前端从第四位置沿视觉系统的y方向移动。S1013. Move the front end from the initial position along the x-direction of the visual system to the fourth position according to the second moving distance, and then move the front end from the fourth position along the y direction of the visual system.
控制机器人的前端根据第二距离,沿x方向从其在标定板上的初始位置沿视觉系统的x方向移动,直至移动到步骤S1022中得到的第四位置,再将前端从第四位置沿视觉系统的y方向移动。其中,将前端从第四位置沿视觉系统的y方向移动的具体步骤与步骤S1011类似。Controlling the front end of the robot according to the second distance, moving from the initial position on the calibration plate in the x direction along the x direction of the vision system until moving to the fourth position obtained in step S1022, and then moving the front end from the fourth position along the vision The y direction of the system moves. The specific step of moving the front end from the fourth position in the y direction of the vision system is similar to step S1011.
S1014、根据第一移动距离,将前端从初始位置沿视觉系统的y方向移动到第二位置,之后再将前端从第二位置沿视觉系统的x方向移动。S1014. Move the front end from the initial position along the y direction of the vision system to the second position according to the first moving distance, and then move the front end from the second position along the x direction of the vision system.
控制机器人的前端根据第一距离,沿y方向从其在标定板的初始位置沿视觉系统的y方向移动到步骤S1021中得到的第二位置,再将前端从第二位置沿视觉系统的x方向移动。其中,将前端从第二位置沿视觉系统的x方向移动的具体步骤与步骤S1012类似。Controlling the front end of the robot according to the first distance, moving from the initial position of the calibration plate in the y direction along the y direction of the vision system to the second position obtained in step S1021, and then moving the front end from the second position along the x direction of the vision system mobile. The specific step of moving the front end from the second position in the x direction of the vision system is similar to step S1012.
进一步的,如图5所示,步骤S102还包括以下步骤:Further, as shown in FIG. 5, step S102 further includes the following steps:
S1023、在步骤S1013将前端从第四位置沿视觉系统的y方向移动的过程中,获取多个图像,并从多个图像中检测第一边界两侧的第一灰度值的变化情况;在第一边界两侧的灰度值发生变化时,得到引起所示第一灰度值变化前后,前端在y方向上的第五位和第六位置。S1023, in the process of moving the front end from the fourth position in the y direction of the visual system in step S1013, acquiring a plurality of images, and detecting a change of the first gray value on both sides of the first boundary from the plurality of images; When the gradation value on both sides of the first boundary changes, the fifth and sixth positions of the front end in the y direction before and after the change of the first gradation value are obtained.
需要注意的是,本步骤是在步骤S1013的执行过程中执行的。It should be noted that this step is performed during the execution of step S1013.
即本步骤在步骤S1013将前端从第四位置沿视觉系统的y方向移动的过程中,每移动一次机器人的前端,即获取一次标定板的图像。当前端在某一次移动时,从第一边界的一侧移动到另一侧时,引起第一灰度值变化,则引起第一灰度值变化前后,前端在y方向上的第五位置即为这次移动前的位置,第六位置即为这次移动后的位置,第五位置和第六位置之间的距离即为前端的最小移动步径,且第五位置和第六位置分别在第一边界的两侧。That is, in this step, in the process of moving the front end from the fourth position in the y direction of the visual system in step S1013, the image of the calibration plate is acquired once for each movement of the front end of the robot. When the current end moves from one side of the first boundary to the other side at a certain movement, causing the first gradation value to change, the fifth position of the front end in the y direction is caused before and after the change of the first gradation value. For the position before the movement, the sixth position is the position after the movement, and the distance between the fifth position and the sixth position is the minimum moving step of the front end, and the fifth position and the sixth position are respectively Both sides of the first boundary.
S1024、在步骤S1014将前端从第二位置沿视觉系统的x方向移动的过程中,获取多个图像,并从多个图像中检测第二边界两侧的第二灰度值的变化情况;在第二边界两侧的灰度值发生变化时,得到引起第二灰度值变化前后,前端在x方向上的第七位和第八位置。S1024, in the process of moving the front end from the second position along the x direction of the visual system in step S1014, acquiring a plurality of images, and detecting a change of the second gray value on both sides of the second boundary from the plurality of images; When the gradation value on both sides of the second boundary is changed, the seventh and eighth positions of the front end in the x direction before and after the change of the second gradation value are obtained.
需要注意的是,本步骤是在步骤S1014的执行过程中执行的。It should be noted that this step is performed during the execution of step S1014.
即本步骤在步骤S1014将前端从第二位置沿视觉系统的x方向移动的过程中,每移动一次机器人的前端,即获取一次标定板的图像。当前端在某一次移动时,从第二边界的一侧移动到另一侧时,引起第二灰度值变化,则引起第二灰度值变化前后,前端在x方向上的第七位置即为这次移动前的位置,第八位置即为这次移动后的位置,第七位置和第八位置之间的距离即为前端的最小移动步径,且第七位置和第八位置分别在第二边界的两侧。That is, in this step, in the process of moving the front end from the second position in the x direction of the visual system in step S1014, the image of the calibration plate is acquired once for each movement of the front end of the robot. When the current end moves from one side of the second boundary to the other side at a certain movement, causing a change in the second gradation value, causing the seventh position of the front end in the x direction before and after the change of the second gradation value For the position before the movement, the eighth position is the position after the movement, and the distance between the seventh position and the eighth position is the minimum moving step of the front end, and the seventh position and the eighth position are respectively Both sides of the second boundary.
进一步的,如图6所示,步骤S103包括如下步骤:Further, as shown in FIG. 6, step S103 includes the following steps:
S1031、根据第一距离和第二距离,计算得到前端的初始位置在视觉坐标系下的坐标。S1011: Calculate coordinates of the initial position of the front end in the visual coordinate system according to the first distance and the second distance.
第一距离为前端在y方向上与第一边界之间的距离,第二距离为机器人的前端在x方向上与第二边界之间的距离。由于在设置标定板时,会尽量让第一边界与视觉系统的x方向平行,第二边界与y方向平行,既可以将第一边界认为是x轴,第二边界为y轴。则可以将第一距离看作是前端在y方向上与x轴的距离,将第二距离看作是前端在x方向上与y轴的距离,即得到前端的初始位置在视觉坐标系下的坐标。可以理解的是,在设置标定板时,可能会存在误差,因此得到的前端的初始位置在视觉坐标系下的坐标可能存在误差。The first distance is the distance between the front end in the y direction and the first boundary, and the second distance is the distance between the front end of the robot in the x direction and the second boundary. Since the first boundary is parallel to the x direction of the vision system and the second boundary is parallel to the y direction when setting the calibration plate, the first boundary can be regarded as the x axis and the second boundary as the y axis. The first distance can be regarded as the distance of the front end from the x-axis in the y direction, and the second distance is regarded as the distance of the front end from the y-axis in the x direction, that is, the initial position of the front end is obtained in the visual coordinate system. coordinate. It can be understood that there may be an error when setting the calibration plate, and thus the coordinates of the initial position of the obtained front end in the visual coordinate system may have errors.
S1032、根据第一位置、第二位置、第五位置和第六位置得到第一参考线,根据第三位置、第四位置、第七位置和第八位置得到第二参考线,第一参考线和第二参考线的交点即为经校正的标定点在机器人坐标系下的坐标。S1032, obtaining a first reference line according to the first position, the second position, the fifth position, and the sixth position, and obtaining a second reference line according to the third position, the fourth position, the seventh position, and the eighth position, the first reference line The intersection with the second reference line is the coordinate of the corrected calibration point in the robot coordinate system.
其中,根据第一位置、第二位置、第五位置和第六位置得到第一参考线具体为将第一位置和第二位置之间的中点与第五位置和第六位置之间的中点进行连线,得到第一参考线。根据第三位置、第四位置、第七位置和第八位置得到第二参考线具体为将第三位置和第四位置之间的中点与第七位置和第八位置之间的中点进行连线,得到第二参考线。第一参考线和第二参考线的交点的坐标即为标定点在机器人坐标系下的坐标。理论上,该标定点在机器人坐标系下的坐标与设置的标定点在视觉坐标系下的坐标之间的差距小于或等于机器人的最小移动步径,在理想状态下,标定点在机器人坐标系下的坐标与标定点在视觉坐标系下的坐标相同。利用前端的初始位置在视觉坐标系下的坐标和前端的初始位置在在机器人坐标系下的坐标,以及标定点在机器人坐标系下的坐标和标定点在视觉坐标系下的坐标,根据矩阵方程建立映射关系,即可得到机器人坐标系与视觉坐标系之间的转换关系,从而完成对机器人的标定。The first reference line obtained according to the first position, the second position, the fifth position, and the sixth position is specifically a middle point between the first position and the second position and a middle position between the fifth position and the sixth position. Connect the points to get the first reference line. Obtaining a second reference line according to the third position, the fourth position, the seventh position, and the eighth position, specifically, performing a midpoint between the third position and the fourth position and a midpoint between the seventh position and the eighth position Connect to the second reference line. The coordinates of the intersection of the first reference line and the second reference line are the coordinates of the calibration point in the robot coordinate system. Theoretically, the difference between the coordinates of the calibration point in the robot coordinate system and the coordinates of the set calibration point in the visual coordinate system is less than or equal to the minimum moving step of the robot. In the ideal state, the calibration point is in the robot coordinate system. The coordinates below are the same as the coordinates of the calibration point in the visual coordinate system. Use the coordinates of the initial position of the front end in the visual coordinate system and the initial position of the front end in the coordinates of the robot coordinate system, and the coordinates of the calibration point in the robot coordinate system and the coordinates of the calibration point in the visual coordinate system, according to the matrix equation By establishing a mapping relationship, a conversion relationship between the robot coordinate system and the visual coordinate system can be obtained, thereby completing the calibration of the robot.
参阅图7a至图7h,根据上述对本发明机器人标定方法第一实施例的详细说明,进一步举例进行说明。Referring to Figures 7a to 7h, a detailed description of the first embodiment of the robot calibration method of the present invention will be further described by way of example.
令标定板与视觉系统正对,标定板上的标定点即为视觉系统的原点,第一边界与x轴重合,第二边界与y轴重合。标定板为黑格和白格相间设置的棋盘格。如图7a所示,令区域A和区域D为白格,区域B和区域C为黑格,为了显示清楚前端的移动对灰度值的影响,对黑格区域B、C没有进行填充。由于此时标定板与视觉系统正对,则x轴和y轴分别为第一边界和第二边界,标定点在视觉系统中即为x轴和y轴的交点。The calibration plate is directly opposite to the vision system. The calibration point on the calibration plate is the origin of the vision system. The first boundary coincides with the x-axis and the second boundary coincides with the y-axis. The calibration board is a checkerboard set between black and white. As shown in FIG. 7a, the area A and the area D are white spaces, and the area B and the area C are black spaces. In order to show the influence of the movement of the front end on the gray value, the black area B and C are not filled. Since the calibration plate is facing the vision system at this time, the x-axis and the y-axis are the first boundary and the second boundary, respectively, and the calibration point is the intersection of the x-axis and the y-axis in the visual system.
图7a为视觉系统获取的标定板的灰度图像,阴影区域E即为前端接触标定板时在标定板上的投影(可以理解的是,图中只绘出了前端接触标定板处附近的投影,实际上前端的投影应是连续的且延长至标定板边缘。)。图中每个小格表示一个像素。此时,视觉系统只能得到标定板上的灰度分布,并不能直接从该图像中得到前端与标定板接触的接触点的位置。Figure 7a is a grayscale image of the calibration plate acquired by the vision system. The shaded area E is the projection on the calibration plate when the front end contacts the calibration plate. (It can be understood that only the projection near the front end of the calibration plate is drawn in the figure. In fact, the projection of the front end should be continuous and extended to the edge of the calibration plate.). Each cell in the figure represents a pixel. At this point, the vision system can only get the grayscale distribution on the calibration plate, and the position of the contact point where the front end is in contact with the calibration plate cannot be directly obtained from the image.
经过步骤S1011,将前端从初始位置沿视觉系统的y方向移动,在该过程中,通过步骤S1021,获取多个图像,并从获取的多个图像中检测第一边界两侧的第一灰度值的变化情况。假设机器人前端移动一个最小步径即从第一边界的一侧运动到第一边界的另一侧,则获取的图像即如图7b所示,根据图7a和图7b的灰度分布计算得到第一边界两侧的第一灰度值的变化情况,进而可以得到机器人的前端与标定板的接触点F的位置,以及移动前和移动后前端的第一位置10和第二位置20(即为移动前和移动后,前端与标定板的接触点的位置)。同时,通过第一边界的两侧的像素内的灰度值,计算得到在y方向上机器人的前端的初始位置与第一边界之间的第一距离。After the step S1011, the front end is moved from the initial position along the y direction of the visual system. In the process, a plurality of images are acquired through step S1021, and the first gray level on both sides of the first boundary is detected from the acquired plurality of images. The change in value. Assuming that the front end of the robot moves a minimum step, that is, from one side of the first boundary to the other side of the first boundary, the acquired image is as shown in FIG. 7b, and the calculation is based on the gray distribution of FIGS. 7a and 7b. a change of the first gray value on both sides of a boundary, thereby obtaining the position of the contact point F of the front end of the robot and the calibration plate, and the first position 10 and the second position 20 of the front end before and after the movement (ie, The position of the contact point between the front end and the calibration plate before and after the movement). At the same time, the first distance between the initial position of the front end of the robot and the first boundary in the y direction is calculated by the gray value in the pixels on both sides of the first boundary.
令机器人的前端回到初始位置,并经过步骤S1012,将前端从初始位置沿视觉系统的x方向移动,在该过程中,通过步骤S1022,获取多个图像,并从获取的多个图像中检测第二边界两侧的第二灰度值的变化情况。假设机器人前端移动一个最小步径即从第二边界的一侧运动到第二边界的另一侧,则获取的图像即如图7c所示,根据图7a和图7c的灰度分布计算得到第二边界两侧的第二灰度值的变化情况,进而可以得到移动前和移动后机器人的前端的第三位置30和第四位置40。同时,通过第二边界的两侧的像素内的灰度值,计算得到在x方向上前端的初始位置与第二边界之间的第二距离。The front end of the robot is returned to the initial position, and the front end is moved from the initial position in the x direction of the vision system through step S1012. In the process, a plurality of images are acquired through step S1022, and detected from the acquired plurality of images. A change in the second gray value on either side of the second boundary. Assuming that the front end of the robot moves a minimum step, that is, from one side of the second boundary to the other side of the second boundary, the acquired image is as shown in FIG. 7c, and is calculated according to the gray scale distribution of FIGS. 7a and 7c. The change of the second gray value on both sides of the two boundaries further obtains the third position 30 and the fourth position 40 of the front end of the robot before and after the movement. At the same time, the second distance between the initial position of the front end and the second boundary in the x direction is calculated by the gray value in the pixels on both sides of the second boundary.
再令机器人的前端回到初始位置,并经过步骤S1013,根据第二移动距离,将前端沿x方向从初始位置移动到第四位置,之后再将该前端从第四位置沿视觉系统的y方向移动。在将前端从第四位置沿视觉系统的y方向移动的过程中,通过步骤S1023,获取多个图像,并从获取的多个图像中检测第一边界两侧的第一灰度值的变化情况。假设机器人前端移动一个最小步径即从第四位置运动到第一边界的另一侧,则获取的图像即如图7d所示,根据将前端沿x方向从第二边界的一侧移动到另一侧时获得图像(未画出)和图7d的灰度分布计算得到第一边界两侧的第一灰度值的变化情况,进而可以得到移动前和移动后前端的第五位置50和第六位置60。The front end of the robot is returned to the initial position, and the front end is moved from the initial position to the fourth position in the x direction according to the second moving distance, and then the front end is moved from the fourth position along the y direction of the vision system according to the second moving distance. mobile. In the process of moving the front end from the fourth position in the y direction of the visual system, a plurality of images are acquired through step S1023, and changes of the first gray value on both sides of the first boundary are detected from the acquired plurality of images. . Assuming that the front end of the robot moves a minimum step, that is, from the fourth position to the other side of the first boundary, the acquired image is as shown in FIG. 7d, according to moving the front end in the x direction from one side of the second boundary to another. The image obtained by one side (not shown) and the gray scale distribution of FIG. 7d are calculated to obtain the change of the first gray value on both sides of the first boundary, thereby obtaining the fifth position 50 and the front of the front end before and after the movement. Six positions 60.
再次令机器人的前端回到初始位置,并经过步骤S1014,根据第一移动距离,将前端沿y方向从初始位置移动到第二位置,之后再将该前端从第二位置沿视觉系统的x方向移动。在将前端从第二位置沿视觉系统的x方向移动的过程中,通过步骤S1024,获取多个图像,并从获取的多个图像中检测第二边界两侧的第二灰度值的变化情况。假设机器人前端移动一个最小步径即从第二边界的一侧运动到第二边界的另一侧,则获取的图像即如图7e所示,根据将前端沿y方向从第一边界的一侧移动到另一侧获取的图像(未画出)和图7e的灰度分布计算得到第二边界两侧的第二灰度值的变化情况,进而可以得到移动前和移动后前端的第七位置70和第八位置80。The front end of the robot is again returned to the initial position, and the front end is moved from the initial position to the second position in the y direction according to the first moving distance, and then the front end is moved from the second position along the x direction of the vision system according to the first moving distance. mobile. In the process of moving the front end from the second position along the x direction of the vision system, a plurality of images are acquired through step S1024, and changes of the second gray value on both sides of the second boundary are detected from the acquired plurality of images. . Assuming that the front end of the robot moves a minimum step, that is, from one side of the second boundary to the other side of the second boundary, the acquired image is as shown in FIG. 7e, according to the side of the front end in the y direction from the first boundary. The image acquired by moving to the other side (not shown) and the gray-scale distribution of FIG. 7e are calculated to obtain the change of the second gray value on both sides of the second boundary, thereby obtaining the seventh position of the front end before the movement and after the movement. 70 and eighth position 80.
根据上述步骤获取的在y方向上前端的初始位置与第一边界之间的第一距离以及在x方向上前端的初始位置与第二边界之间的第二距离,能够计算得到前端的初始位置在视觉坐标系下的坐标。According to the above steps, the first distance between the initial position of the front end in the y direction and the first boundary and the second distance between the initial position of the front end and the second boundary in the x direction can calculate the initial position of the front end. The coordinates in the visual coordinate system.
如图7f所示,根据步骤S1021和步骤S1023,获取了第一位置10、第二位置20、第五位置50和第六位置60,将第一位置10与第二位置20之间的中点和第五位置50与第六位置60之间的中点连接,得到图7f中所示的第一参考线L1。如图7g所示,根据步骤S1021和步骤S1023,获取了第三位置30、第四位置40、第七位置70和第八位置80,将第三位置30与第四位置40之间的中点和第七位置70与第八位置80之间的中点连接,得到图7g中所示的第二参考线L2。如图7h所示,第一参考线L1和第二参考线L2相交,其交点H的坐标即为标定点在机器人坐标系下的坐标。As shown in FIG. 7f, according to step S1021 and step S1023, the first position 10, the second position 20, the fifth position 50, and the sixth position 60 are acquired, and the midpoint between the first position 10 and the second position 20 is obtained. And the midpoint connection between the fifth position 50 and the sixth position 60, the first reference line L1 shown in Fig. 7f is obtained. As shown in FIG. 7g, according to step S1021 and step S1023, the third position 30, the fourth position 40, the seventh position 70, and the eighth position 80 are acquired, and the midpoint between the third position 30 and the fourth position 40 is obtained. And the midpoint connection between the seventh position 70 and the eighth position 80, the second reference line L2 shown in Fig. 7g is obtained. As shown in FIG. 7h, the first reference line L1 and the second reference line L2 intersect, and the coordinates of the intersection point H are the coordinates of the calibration point in the robot coordinate system.
由于第一边界或第二边界两侧的灰度值发生变化是由机器人的前端在某一次运动最小移动步径时造成的,则得到的第一位置和第二位置之间的距离、第三位置与第四位置之间的距离、第五位置与第六位置之间的距离,以及第七位置和第八位置之间的距离实际上均等于前端的最小移动步径,因此理论上,标定点在机器人坐标系下的坐标与设置的标定点在视觉坐标系下的坐标之间的差距小于或等于机器人的最小移动步径,在理想状态下,标定点在机器人坐标系下的坐标与标定点在视觉坐标系下的坐标相同。则利用前端的初始位置在视觉坐标系下的坐标和前端的初始位置在在机器人坐标系下的坐标,以及标定点在机器人坐标系下的坐标和标定点在视觉坐标系下的坐标,根据矩阵方程建立映射关系,即可得到机器人坐标系与视觉坐标系之间的转换关系,从而完成对机器人的标定。Since the change of the gray value on both sides of the first boundary or the second boundary is caused by the front end of the robot at the minimum moving step of the movement, the distance between the first position and the second position is obtained, and the third The distance between the position and the fourth position, the distance between the fifth position and the sixth position, and the distance between the seventh position and the eighth position are substantially equal to the minimum moving step of the front end, so in theory, the standard The difference between the coordinates of the fixed point in the robot coordinate system and the coordinates of the set calibration point in the visual coordinate system is less than or equal to the minimum moving step of the robot. In the ideal state, the coordinates and the standard of the calibration point in the robot coordinate system The coordinates of the fixed point in the visual coordinate system are the same. Then use the coordinates of the initial position of the front end in the visual coordinate system and the initial position of the front end in the coordinate of the robot coordinate system, and the coordinates of the calibration point in the robot coordinate system and the coordinates of the calibration point in the visual coordinate system, according to the matrix. By establishing a mapping relationship, the conversion relationship between the robot coordinate system and the visual coordinate system can be obtained, thereby completing the calibration of the robot.
参阅图8,图8是本发明存储介质实施例的结构示意图。如图8所示,本实施例中的存储介质400中存储有能够被执行的程序数据401,该程序数据401被执行能够实现图1至图6所示的机器人标定方法实施例。本实施例中,该存储介质400可以是智能终端的存储模块、移动存储装置(如移动硬盘、U盘等)、网络云盘或应用存储平台等具备存储功能的介质。Referring to FIG. 8, FIG. 8 is a schematic structural diagram of an embodiment of a storage medium of the present invention. As shown in FIG. 8, the storage medium 400 in the present embodiment stores program data 401 that can be executed, and the program data 401 is executed to implement the robot calibration method embodiment shown in FIGS. 1 to 6. In this embodiment, the storage medium 400 may be a storage module of the smart terminal, a mobile storage device (such as a mobile hard disk, a USB flash drive, etc.), a network cloud disk, or an application storage platform, and the like.
参阅图9,图9是本发明机器人标定系统第一实施例的功能模块图。该机器人标定系统200包括视觉装置201、处理器202和存储器204;其中,视觉装置201和存储器204分别与处理器202连接; Referring to Figure 9, Figure 9 is a functional block diagram of a first embodiment of the robot calibration system of the present invention. The robot calibration system 200 includes a vision device 201, a processor 202, and a memory 204; wherein the vision device 201 and the memory 204 are respectively coupled to the processor 202;
视觉装置201,用于对机器人的前端操作的空间进行拍摄,建立相应的视觉系统。存储器204,用于存储前端的预设移动规则,以及处理器的执行指令。The visual device 201 is configured to photograph a space operated by the front end of the robot to establish a corresponding visual system. The memory 204 is configured to store a preset movement rule of the front end and an execution instruction of the processor.
处理器202,用于执行下述动作:The processor 202 is configured to perform the following actions:
控制所述机器人的前端在标定板上根据预设规则从初始位置移动,其中,所述标定板上设置有用于标定的标定点,以及根据所述标定点确定的第一边界和第二边界;在所述移动过程中获取视觉系统采集到的所述前端的多个图像,从所述多个图像中检测所述第一边界和第二边界两侧的灰度值的变化情况,并记录前端的移动距离;根据所述灰度值的变化情况和所述移动距离计算得到所述前端的初始位置在视觉坐标系下的坐标以及所述标定点在机器人坐标系下的坐标;根据所述初始位置和所述标定点的位置计算得到机器人坐标系与所述视觉坐标系之间的转换关系,从而完成对所述机器人的标定。Controlling a front end of the robot to move from an initial position on a calibration plate according to a preset rule, wherein the calibration plate is provided with a calibration point for calibration, and a first boundary and a second boundary determined according to the calibration point; Acquiring a plurality of images of the front end collected by the visual system during the moving process, detecting changes of gray values on both sides of the first boundary and the second boundary from the plurality of images, and recording the front end a moving distance; calculating a coordinate of the initial position of the front end in the visual coordinate system and a coordinate of the calibration point in the robot coordinate system according to the change of the gray value and the moving distance; according to the initial The position and the position of the calibration point are calculated to obtain a conversion relationship between the robot coordinate system and the visual coordinate system, thereby completing calibration of the robot.
本实施例中,处理器202执行的动作与图1至图6所示的机器人标定方法相对应,具体参照上述对机器人标定方法的详细说明,此处不再赘述。In this embodiment, the action performed by the processor 202 corresponds to the robot calibration method shown in FIG. 1 to FIG. 6, and the detailed description of the robot calibration method is specifically referred to, and details are not described herein again.
参阅图10,图10是本发明机器人一实施例的结构示意图。该机器人300包括机器人本体301以及机器人标定系统302。Referring to FIG. 10, FIG. 10 is a schematic structural view of an embodiment of a robot according to the present invention. The robot 300 includes a robot body 301 and a robot calibration system 302.
机器人301包括用于抓取物体的机器人的前端。机器人标定系统302包括:视觉装置、处理器和存储器;其中,视觉装置和存储器分别与处理器连接。视觉装置,用于对前端操作的空间进行拍摄,建立相应的视觉系统。存储器,用于存储前端的预设移动规则,以及处理器的执行指令。处理器,用于执行下述动作:The robot 301 includes a front end of a robot for grabbing an object. The robot calibration system 302 includes a vision device, a processor, and a memory; wherein the vision device and the memory are respectively coupled to the processor. A visual device for photographing the space of the front end operation to establish a corresponding vision system. A memory for storing preset movement rules of the front end and execution instructions of the processor. A processor that performs the following actions:
控制所述机器人的前端在标定板上根据预设规则从初始位置移动,其中,所述标定板上设置有用于标定的标定点,以及根据所述标定点确定的第一边界和第二边界;在所述移动过程中获取视觉系统采集到的所述前端的多个图像,从所述多个图像中检测所述第一边界和第二边界两侧的灰度值的变化情况,并记录前端的移动距离;根据所述灰度值的变化情况和所述移动距离计算得到所述前端的初始位置在视觉坐标系下的坐标以及所述标定点在机器人坐标系下的坐标;根据所述初始位置和所述标定点的位置计算得到机器人坐标系与所述视觉坐标系之间的转换关系,从而完成对所述机器人的标定。Controlling a front end of the robot to move from an initial position on a calibration plate according to a preset rule, wherein the calibration plate is provided with a calibration point for calibration, and a first boundary and a second boundary determined according to the calibration point; Acquiring a plurality of images of the front end collected by the visual system during the moving process, detecting changes of gray values on both sides of the first boundary and the second boundary from the plurality of images, and recording the front end a moving distance; calculating a coordinate of the initial position of the front end in the visual coordinate system and a coordinate of the calibration point in the robot coordinate system according to the change of the gray value and the moving distance; according to the initial The position and the position of the calibration point are calculated to obtain a conversion relationship between the robot coordinate system and the visual coordinate system, thereby completing calibration of the robot.
本实施例中的机器人标定系统与图9所示的机器人标定系统相同,此处不再赘述。The robot calibration system in this embodiment is the same as the robot calibration system shown in FIG. 9, and details are not described herein again.
以上仅为本发明的实施方式,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围。 The above is only the embodiment of the present invention, and is not intended to limit the scope of the invention, and the equivalent structure or equivalent process transformation made by the specification and the drawings of the present invention may be directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of the present invention.

Claims (23)

  1. 一种机器人标定方法,其中,包括:A robot calibration method includes:
    控制所述机器人的前端在标定板上根据预设规则从初始位置移动,其中,所述标定板上设置有用于标定的标定点,以及根据所述标定点确定的第一边界和第二边界;Controlling a front end of the robot to move from an initial position on a calibration plate according to a preset rule, wherein the calibration plate is provided with a calibration point for calibration, and a first boundary and a second boundary determined according to the calibration point;
    在所述移动过程中获取视觉系统采集到的所述前端的多个图像,从所述多个图像中检测所述第一边界和第二边界两侧的灰度值的变化情况,并记录前端的移动距离;Acquiring a plurality of images of the front end collected by the visual system during the moving process, detecting changes of gray values on both sides of the first boundary and the second boundary from the plurality of images, and recording the front end Moving distance
    根据所述灰度值的变化情况和所述移动距离计算得到所述前端的初始位置在视觉坐标系下的坐标以及所述标定点在机器人坐标系下的坐标;Calculating coordinates of the initial position of the front end in the visual coordinate system and coordinates of the calibration point in the robot coordinate system according to the change of the gray value and the moving distance;
    根据所述初始位置和所述标定点的位置计算得到机器人坐标系与所述视觉坐标系之间的转换关系,从而完成对所述机器人的标定。Calculating a conversion relationship between the robot coordinate system and the visual coordinate system according to the initial position and the position of the calibration point, thereby completing calibration of the robot.
  2. 根据权利要求1所述的标定方法,其中,所述控制所述机器人的前端在标定板上根据预设规则从初始位置移动包括:The calibration method according to claim 1, wherein the controlling the front end of the robot to move from the initial position according to a preset rule on the calibration board comprises:
    将所述前端从所述初始位置沿所述视觉系统的y方向移动; Moving the front end from the initial position along the y direction of the vision system;
    以及将所述前端从所述初始位置沿所述视觉系统的x方向移动。And moving the front end from the initial position along the x direction of the vision system.
  3. 根据权利要求2所述的标定方法,其中,所述在所述移动过程中获取视觉系统采集到的所述前端的多个图像,从所述多个图像中检测所述第一边界和第二边界两侧的灰度值的变化情况,并记录前端的移动距离包括:The calibration method according to claim 2, wherein said acquiring a plurality of images of said front end acquired by a vision system during said moving, detecting said first boundary and said second from said plurality of images The change of the gray value on both sides of the boundary, and recording the moving distance of the front end includes:
    在所述将所述前端从所述初始位置沿所述视觉系统的y方向移动的过程中,获取所述多个图像,并从所述多个图像中检测所述第一边界两侧的第一灰度值的变化情况;在所述第一边界两侧的灰度值发生变化时,记录前端的第一移动距离,并得到引起所述第一灰度值变化前后,所述前端在y方向上的第一位置和第二位置,以及在y方向上所述前端的初始位置与所述第一边界之间的第一距离;Acquiring the plurality of images in the moving the front end from the initial position in the y direction of the vision system, and detecting the two sides of the first boundary from the plurality of images a change in the gray value; when the gray value on both sides of the first boundary changes, the first moving distance of the front end is recorded, and the front end is obtained before and after the change of the first gray value is obtained. a first position and a second position in the direction, and a first distance between the initial position of the front end and the first boundary in the y direction;
    在所述将所述前端从所述初始位置沿所述视觉系统的x方向移动的过程中,获取所述多个图像,并从所述多个图像中检测所述第二边界两侧的第二灰度值的变化情况;在所述第二边界两侧的灰度值发生变化时,记录前端的第二移动距离;并得到引起所述第二灰度值变化前后,所述前端在x方向上的第三位置和第四位置,以及在x方向上所述前端的初始位置与所述第二边界之间的第二距离。Acquiring the plurality of images in the moving the front end from the initial position along the x direction of the vision system, and detecting the two sides of the second boundary from the plurality of images a change of the two gray values; when the gray value on both sides of the second boundary changes, the second moving distance of the front end is recorded; and the front end is at x before and after the change of the second gray value is obtained a third position and a fourth position in the direction, and a second distance between the initial position of the front end and the second boundary in the x direction.
  4. 根据权利要求3所述的标定方法,其中,所述控制所述机器人的前端在标定板上根据预设规则移动还包括:The calibration method according to claim 3, wherein the controlling the front end of the robot to move according to a preset rule on the calibration plate further comprises:
    根据第二移动距离,将所述前端从所述初始位置沿视觉系统的x方向移动到所述第四位置,之后再将所述前端从所述第四位置沿所述视觉系统的y方向移动;Moving the front end from the initial position in the x direction of the vision system to the fourth position according to a second moving distance, and then moving the front end from the fourth position along the y direction of the vision system ;
    以及根据第一移动距离,将所述前端从所述初始位置沿视觉系统的y方向移动到所述第二位置,之后再将所述前端从所述第二位置沿所述视觉系统的x方向移动。And moving the front end from the initial position in the y direction of the vision system to the second position according to the first moving distance, and then moving the front end from the second position along the x direction of the vision system mobile.
  5. 根据权利要求4所述的标定方法,其中,所述在所述移动过程中获取视觉系统采集到的所述前端的多个图像,从所述多个图像中检测所述第一边界和第二边界两侧的灰度值的变化情况,并记录前端的移动距离,还包括:The calibration method according to claim 4, wherein said acquiring a plurality of images of said front end acquired by a vision system during said moving, detecting said first boundary and said second from said plurality of images The change of the gray value on both sides of the boundary, and record the moving distance of the front end, also includes:
    在所述将所述前端从所述第四位置沿所述视觉系统的y方向移动的过程中,获取所述多个图像,并从所述多个图像中检测所述第一边界两侧的第一灰度值的变化情况;在所述第一边界两侧的灰度值发生变化时,得到引起所述第一灰度值变化前后,所述前端在y方向上的第五位和第六位置;Acquiring the plurality of images in the moving the front end from the fourth position along the y direction of the vision system, and detecting two sides of the first boundary from the plurality of images a change of the first gray value; when the gray value on both sides of the first boundary changes, the fifth bit and the first end of the front end in the y direction are obtained before and after the change of the first gray value Six positions;
    在所述将所述前端从所述第二位置沿所述视觉系统的x方向移动的过程中,获取所述多个图像,并从所述多个图像中检测所述第二边界两侧的第二灰度值的变化情况;在所述第二边界两侧的灰度值发生变化时,得到引起所述第二灰度值变化前后,所述前端在x方向上的第七位和第八位置。Acquiring the plurality of images in the process of moving the front end from the second position along the x direction of the vision system, and detecting two sides of the second boundary from the plurality of images a change of the second gray value; when the gray value on both sides of the second boundary changes, the seventh bit and the first end of the front end in the x direction are obtained before and after the change of the second gray value Eight positions.
  6. 根据权利要求5所述的标定方法,其中,所述根据所述灰度值的变化情况和所述移动距离计算得到所述前端的初始位置在视觉坐标系下的坐标以及所述标定点在机器人坐标系下的坐标,包括:The calibration method according to claim 5, wherein said calculating a coordinate of said initial position of said front end in a visual coordinate system and said calibration point in said robot based on said change in said gray value and said moving distance Coordinates in the coordinate system, including:
    根据所述第一距离和第二距离,计算得到所述前端的初始位置在所述视觉坐标系下的坐标;Calculating, according to the first distance and the second distance, coordinates of an initial position of the front end in the visual coordinate system;
    根据所述第一位置、第二位置、第五位置和第六位置得到第一参考线,根据所述第三位置、第四位置、第七位置和第八位置得到第二参考线,所述第一参考线和所述第二参考线的交点的坐标即为所述标定点在机器人坐标系下的坐标。Obtaining a first reference line according to the first position, the second position, the fifth position, and the sixth position, and obtaining a second reference line according to the third position, the fourth position, the seventh position, and the eighth position, The coordinates of the intersection of the first reference line and the second reference line are the coordinates of the calibration point in the robot coordinate system.
  7. 根据权利要求6所述的标定方法,其中,所述根据所述第一位置、第二位置、第五位置和第六位置得到第一参考线,具体为:The calibration method according to claim 6, wherein the first reference line is obtained according to the first position, the second position, the fifth position, and the sixth position, specifically:
    将所述第一位置和第二位置之间的中点与所述第五位置和第六位置之间的中点进行连线,得到第一参考线;Connecting a midpoint between the first location and the second location to a midpoint between the fifth location and the sixth location to obtain a first reference line;
    根据所述第三位置、第四位置、第七位置和第八位置得到第二参考线,具体为:Obtaining a second reference line according to the third location, the fourth location, the seventh location, and the eighth location, specifically:
    将所述第三位置和第四位置之间的中点与所述第七位置和第八位置之间的中点进行连线,得到第二参考线。A midpoint between the third position and the fourth position is connected to a midpoint between the seventh position and the eighth position to obtain a second reference line.
  8. 根据权利要求7所述的标定方法,其中,所述视觉系统的原点与所述标定点重合时;The calibration method according to claim 7, wherein an origin of the vision system coincides with the calibration point;
    将所述两条边界线中,与所述视觉系统的x轴最近的一条边界线定义为第一边界,与所述视觉系统的y轴最近的一条边界线定义为第二边界。Among the two boundary lines, one boundary line closest to the x-axis of the vision system is defined as a first boundary, and one boundary line closest to the y-axis of the vision system is defined as a second boundary.
  9. 根据权利要求1所述的标定方法,其中,所述标定板为黑格和白格相间设置的棋盘格,所述标定板上设置的标定点为所述黑格和所述白格的交点;The calibration method according to claim 1, wherein the calibration plate is a checkerboard set between black and white grids, and a calibration point set on the calibration plate is an intersection of the black grid and the white grid;
    所述根据所述标定点确定的第一边界和第二边界,包括:The first boundary and the second boundary determined according to the calibration point include:
    将经过所述标定点的两条黑白格的边缘线分别作为第一边界线和第二边界线。The edge lines of the two black and white cells passing through the calibration point are taken as the first boundary line and the second boundary line, respectively.
  10. 根据权利要求1所述的标定方法,其中,所述检测所述第一边界和所述第二边界两侧的灰度值的变化情况,具体为:The calibration method according to claim 1, wherein the detecting the change of the gray value on both sides of the first boundary and the second boundary is specifically:
    检测所述第一边界和所述第二边界两侧的若干个像素的灰度值的变化情况。A change in a gray value of a plurality of pixels on both sides of the first boundary and the second boundary is detected.
  11. 一种存储介质,其中,所述存储介质存储有程序数据,所述存储数据能够被执行以实现如权利要求1-10任意一项所述的机器人标定方法。A storage medium, wherein the storage medium stores program data, the stored data being executable to implement the robot calibration method according to any one of claims 1-10.
  12. 一种机器人标定系统,其中,包括:视觉装置、处理器和存储器;其中,所述视觉装置和存储器分别与所述处理器连接; A robot calibration system, comprising: a visual device, a processor, and a memory; wherein the visual device and the memory are respectively connected to the processor;
    所述视觉装置,用于对机器人的前端操作的空间进行拍摄,建立相应的视觉系统;The visual device is configured to photograph a space operated by a front end of the robot to establish a corresponding visual system;
    所述存储器,用于存储机器人的前端的预设移动规则,以及所述处理器的执行指令;The memory is configured to store a preset movement rule of a front end of the robot, and an execution instruction of the processor;
    所述处理器,用于执行下述动作:The processor is configured to perform the following actions:
    控制所述机器人的前端在标定板上根据预设规则从初始位置移动,其中,所述标定板上设置有用于标定的标定点,以及根据所述标定点确定的第一边界和第二边界;Controlling a front end of the robot to move from an initial position on a calibration plate according to a preset rule, wherein the calibration plate is provided with a calibration point for calibration, and a first boundary and a second boundary determined according to the calibration point;
    在所述移动过程中获取视觉系统采集到的所述前端的多个图像,从所述多个图像中检测所述第一边界和第二边界两侧的灰度值的变化情况,并记录前端的移动距离;Acquiring a plurality of images of the front end collected by the visual system during the moving process, detecting changes of gray values on both sides of the first boundary and the second boundary from the plurality of images, and recording the front end Moving distance
    根据所述灰度值的变化情况和所述移动距离计算得到所述前端的初始位置在视觉坐标系下的坐标以及所述标定点在机器人坐标系下的坐标;Calculating coordinates of the initial position of the front end in the visual coordinate system and coordinates of the calibration point in the robot coordinate system according to the change of the gray value and the moving distance;
    根据所述初始位置和所述标定点的位置计算得到机器人坐标系与所述视觉坐标系之间的转换关系,从而完成对所述机器人的标定。Calculating a conversion relationship between the robot coordinate system and the visual coordinate system according to the initial position and the position of the calibration point, thereby completing calibration of the robot.
  13. 根据权利要求12所述的标定系统,其中,所述处理器执行的所述控制所述机器人的前端在标定板上根据预设规则从初始位置移动,包括:The calibration system according to claim 12, wherein said controlling said front end of said robot to move from said initial position on said calibration plate according to a preset rule comprises:
    将所述前端从所述初始位置沿所述视觉系统的y方向移动; Moving the front end from the initial position along the y direction of the vision system;
    以及将所述前端从所述初始位置沿所述视觉系统的x方向移动。And moving the front end from the initial position along the x direction of the vision system.
  14. 根据权利要求13所述的标定系统,其中,所述在所述移动过程中获取视觉系统采集到的所述前端的多个图像从所述多个图像中检测所述第一边界和第二边界两侧的灰度值的变化情况;并记录前端的移动距离,包括:The calibration system according to claim 13, wherein said acquiring a plurality of images of said front end acquired by a vision system during said moving process detects said first boundary and said second boundary from said plurality of images The change of the gray value on both sides; and record the moving distance of the front end, including:
    在所述将所述前端从所述初始位置沿所述视觉系统的y方向移动的过程中,获取所述多个图像,并从所述多个图像中检测所述第一边界两侧的第一灰度值的变化情况;在所述第一边界两侧的灰度值发生变化时,记录所述前端的第一移动距离,并得到引起所述第一灰度值变化前后,所述前端在y方向上的第一位置和第二位置,以及在y方向上所述前端的初始位置与所述第一边界之间的第一距离;Acquiring the plurality of images in the moving the front end from the initial position in the y direction of the vision system, and detecting the two sides of the first boundary from the plurality of images a change of a gray value; when the gray value on both sides of the first boundary changes, recording a first moving distance of the front end, and obtaining a front end before and after the change of the first gray value a first position and a second position in the y direction, and a first distance between the initial position of the front end and the first boundary in the y direction;
    在所述将所述前端从所述初始位置沿所述视觉系统的x方向移动的过程中,获取所述多个图像,并从所述多个图像中检测所述第二边界两侧的第二灰度值的变化情况;在所述第二边界两侧的灰度值发生变化时,记录前端的第二移动距离;并得到引起所述第二灰度值变化前后,所述前端在x方向上的第三位置和第四位置,以及在x方向上所述前端的初始位置与所述第二边界之间的第二距离。Acquiring the plurality of images in the moving the front end from the initial position along the x direction of the vision system, and detecting the two sides of the second boundary from the plurality of images a change of the two gray values; when the gray value on both sides of the second boundary changes, the second moving distance of the front end is recorded; and the front end is at x before and after the change of the second gray value is obtained a third position and a fourth position in the direction, and a second distance between the initial position of the front end and the second boundary in the x direction.
  15. 根据权利要求14所述的标定系统,其中,所述处理器执行的所述控制所述机器人的前端在标定板上根据预设规则从初始位置移动,进一步包括:The calibration system according to claim 14, wherein the controlling the execution of the front end of the robot on the calibration plate to move from the initial position according to a preset rule further comprises:
    根据第二移动距离,将所述前端从所述初始位置沿视觉系统的x方向移动到所述第四位置,之后再将所述前端从所述第四位置沿所述视觉系统的y方向移动;Moving the front end from the initial position in the x direction of the vision system to the fourth position according to a second moving distance, and then moving the front end from the fourth position along the y direction of the vision system ;
    以及根据第一移动距离,将所述前端从所述初始位置沿视觉系统的y方向移动到所述第二位置,之后再将所述前端从所述第二位置沿所述视觉系统的x方向移动。And moving the front end from the initial position in the y direction of the vision system to the second position according to the first moving distance, and then moving the front end from the second position along the x direction of the vision system mobile.
  16. 根据权利要求15所述的标定系统,其中,所述处理器执行的所述在所述移动过程中获取视觉系统采集到的所述前端的多个图像,从所述多个图像中检测所述第一边界和第二边界两侧的灰度值的变化情况,并记录前端的移动距离,进一步包括:The calibration system according to claim 15, wherein said plurality of images of said front end acquired by said visual system are acquired by said processor during said moving, said detecting said said plurality of images The change of the gray value on both sides of the first boundary and the second boundary, and recording the moving distance of the front end, further including:
    在所述将所述前端从所述第四位置沿所述视觉系统的y方向移动的过程中,获取所述多个图像,并从所述多个图像中检测所述第一边界两侧的第一灰度值的变化情况;在所述第一边界两侧的灰度值发生变化时,得到引起所述第一灰度值变化前后,所述前端在y方向上的第五位和第六位置;Acquiring the plurality of images in the moving the front end from the fourth position along the y direction of the vision system, and detecting two sides of the first boundary from the plurality of images a change of the first gray value; when the gray value on both sides of the first boundary changes, the fifth bit and the first end of the front end in the y direction are obtained before and after the change of the first gray value Six positions;
    在所述将所述前端从所述第二位置沿所述视觉系统的x方向移动的过程中,获取所述多个图像,并从所述多个图像中检测所述第二边界两侧的第二灰度值的变化情况;在所述第二边界两侧的灰度值发生变化时,得到引起所述第二灰度值变化前后,所述前端在x方向上的第七位和第八位置。Acquiring the plurality of images in the process of moving the front end from the second position along the x direction of the vision system, and detecting two sides of the second boundary from the plurality of images a change of the second gray value; when the gray value on both sides of the second boundary changes, the seventh bit and the first end of the front end in the x direction are obtained before and after the change of the second gray value Eight positions.
  17. 根据权利要求16所述的标定系统,其中,所述处理器执行的所述根据所述灰度值的变化情况和所述移动距离计算得到所述前端的初始位置在视觉坐标系下的坐标以及所述标定点在机器人坐标系下的坐标,包括:The calibration system according to claim 16, wherein said calculating, by said processor, said coordinate of said initial position of said front end in a visual coordinate system based on said change in said gray value and said moving distance The coordinates of the calibration point in the robot coordinate system include:
    根据所述第一距离和第二距离,计算得到所述前端的初始位置在所述视觉系统中的坐标;Calculating, according to the first distance and the second distance, coordinates of an initial position of the front end in the vision system;
    根据所述第一位置、第二位置、第五位置和第六位置得到第一参考线,根据所述第三位置、第四位置、第七位置和第八位置得到第二参考线,所述第一参考线和所述第二参考线的交点即为所述标定点在机器人坐标系下的坐标。Obtaining a first reference line according to the first position, the second position, the fifth position, and the sixth position, and obtaining a second reference line according to the third position, the fourth position, the seventh position, and the eighth position, The intersection of the first reference line and the second reference line is the coordinate of the calibration point in the robot coordinate system.
  18. 根据权利要求17所述的标定系统,其中,所述根据所述第一位置、第二位置、第五位置和第六位置得到第一参考线,具体为:The calibration system according to claim 17, wherein the first reference line is obtained according to the first position, the second position, the fifth position, and the sixth position, specifically:
    将所述第一位置和第二位置之间的中点与所述第五位置和第六位置之间的中点进行连线,得到第一参考线;Connecting a midpoint between the first location and the second location to a midpoint between the fifth location and the sixth location to obtain a first reference line;
    根据所述第三位置、第四位置、第七位置和第八位置得到第二参考线,具体为:Obtaining a second reference line according to the third location, the fourth location, the seventh location, and the eighth location, specifically:
    将所述第三位置和第四位置之间的中点与所述第七位置和第八位置之间的中点进行连线,得到第二参考线。A midpoint between the third position and the fourth position is connected to a midpoint between the seventh position and the eighth position to obtain a second reference line.
  19. 根据权利要求18所述的标定方法,其特征在于,所述经校正的参考点为第一参考下和第二参考线的交点。The calibration method according to claim 18, wherein the corrected reference point is an intersection of the first reference lower and the second reference line.
  20. 根据权利要求19所述的标定方法,其中,所述视觉系统的原点与所述标定点重合时;The calibration method according to claim 19, wherein an origin of said vision system coincides with said calibration point;
    将所述两条边界线中,与所述视觉系统的x轴最近的一条边界线定义为第一边界,与所述视觉系统的y轴最近的一条边界线定义为第二边界。Among the two boundary lines, one boundary line closest to the x-axis of the vision system is defined as a first boundary, and one boundary line closest to the y-axis of the vision system is defined as a second boundary.
  21. 根据权利要求12所述的标定系统,其中,所述标定板为黑格和白格相间设置的棋盘格,所述标定板上设置的标定点为所述黑格和所述白格的交点;The calibration system according to claim 12, wherein the calibration plate is a checkerboard set between black and white grids, and a calibration point set on the calibration plate is an intersection of the black grid and the white grid;
    所述根据所述标定点确定的第一边界和第二边界,包括:The first boundary and the second boundary determined according to the calibration point include:
    将经过所述标定点的两条黑白格的边缘线分别作为第一边界线和第二边界线。The edge lines of the two black and white cells passing through the calibration point are taken as the first boundary line and the second boundary line, respectively.
  22. 一种机器人,其中,包括机器人本体以及机器人标定系统, a robot including a robot body and a robot calibration system,
    所述机器人包括用于抓取物体的机器人的前端;The robot includes a front end of a robot for grasping an object;
    所述机器人标定系统包括:The robot calibration system includes:
    视觉装置、处理器和存储器;其中,所述视觉装置和存储器分别与所述处理器连接; a visual device, a processor, and a memory; wherein the visual device and the memory are respectively coupled to the processor;
    所述视觉装置,用于对机器人的前端操作的空间进行拍摄,建立相应的视觉系统;The visual device is configured to photograph a space operated by a front end of the robot to establish a corresponding visual system;
    所述存储器,用于存储机器人的前端的预设移动规则,以及所述处理器的执行指令;The memory is configured to store a preset movement rule of a front end of the robot, and an execution instruction of the processor;
    所述处理器,用于执行下述动作:The processor is configured to perform the following actions:
    控制所述机器人的前端在标定板上根据预设规则从初始位置移动,其中,所述标定板上设置有用于标定的标定点,以及根据所述标定点确定的第一边界和第二边界;Controlling a front end of the robot to move from an initial position on a calibration plate according to a preset rule, wherein the calibration plate is provided with a calibration point for calibration, and a first boundary and a second boundary determined according to the calibration point;
    在所述移动过程中获取视觉系统采集到的所述前端的多个图像,从所述多个图像中检测所述第一边界和第二边界两侧的灰度值的变化情况,并记录前端的移动距离;Acquiring a plurality of images of the front end collected by the visual system during the moving process, detecting changes of gray values on both sides of the first boundary and the second boundary from the plurality of images, and recording the front end Moving distance
    根据所述灰度值的变化情况和所述移动距离计算得到所述前端的初始位置在视觉坐标系下的坐标以及所述标定点在机器人坐标系下的坐标;Calculating coordinates of the initial position of the front end in the visual coordinate system and coordinates of the calibration point in the robot coordinate system according to the change of the gray value and the moving distance;
    根据所述初始位置和所述标定点的位置计算得到机器人坐标系与所述视觉坐标系之间的转换关系,从而完成对所述机器人的标定。Calculating a conversion relationship between the robot coordinate system and the visual coordinate system according to the initial position and the position of the calibration point, thereby completing calibration of the robot.
  23. 根据权利要求22所述的机器人,其中,所述视觉系统的原点与所述标定点重合时;The robot according to claim 22, wherein an origin of said vision system coincides with said calibration point;
    将所述两条边界线中,与所述视觉系统的x轴最近的一条边界线定义为第一边界,与所述视觉系统的y轴最近的一条边界线定义为第二边界。Among the two boundary lines, one boundary line closest to the x-axis of the vision system is defined as a first boundary, and one boundary line closest to the y-axis of the vision system is defined as a second boundary.
PCT/CN2017/086094 2017-05-26 2017-05-26 Robot calibration method and system, robot and storage medium WO2018214147A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2017/086094 WO2018214147A1 (en) 2017-05-26 2017-05-26 Robot calibration method and system, robot and storage medium
CN201780034033.XA CN109952176B (en) 2017-05-26 2017-05-26 Robot calibration method and system, robot and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/086094 WO2018214147A1 (en) 2017-05-26 2017-05-26 Robot calibration method and system, robot and storage medium

Publications (1)

Publication Number Publication Date
WO2018214147A1 true WO2018214147A1 (en) 2018-11-29

Family

ID=64395167

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/086094 WO2018214147A1 (en) 2017-05-26 2017-05-26 Robot calibration method and system, robot and storage medium

Country Status (2)

Country Link
CN (1) CN109952176B (en)
WO (1) WO2018214147A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109636859A (en) * 2018-12-24 2019-04-16 武汉大音科技有限责任公司 A kind of scaling method of the 3D vision detection based on one camera
CN110017852A (en) * 2019-04-25 2019-07-16 广东省智能机器人研究院 A kind of navigation positioning error measurement method
CN111145247A (en) * 2019-12-18 2020-05-12 配天机器人技术有限公司 Vision-based position detection method, robot and computer storage medium
CN112123329A (en) * 2020-02-21 2020-12-25 深圳市三宝创新智能有限公司 Robot 3D vision hand-eye calibration method
CN114838659A (en) * 2022-04-26 2022-08-02 深圳市商汤科技有限公司 Manipulator testing device, testing method, calibration method and storage medium
CN115416022A (en) * 2022-08-26 2022-12-02 汕头大学 Positioning method, device and medium for mobile platform system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1590040A (en) * 2003-09-03 2005-03-09 中国科学院自动化研究所 Pickup camera self calibration method based on robot motion
CN103292695A (en) * 2013-05-10 2013-09-11 河北科技大学 Monocular stereoscopic vision measuring method
CN104180753A (en) * 2014-07-31 2014-12-03 东莞市奥普特自动化科技有限公司 Rapid calibration method of robot visual system
CN104786226A (en) * 2015-03-26 2015-07-22 华南理工大学 Posture and moving track positioning system and method of robot grabbing online workpiece
CN105234943A (en) * 2015-09-09 2016-01-13 大族激光科技产业集团股份有限公司 Industrial robot demonstration device and method based on visual recognition
US20160346932A1 (en) * 2014-02-11 2016-12-01 Tyco Electronics (Shanghai) Co. Ltd. Automatic Calibration Method For Robot Systems Using a Vision Sensor

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101626572B1 (en) * 2009-05-20 2016-06-01 삼성전자주식회사 Apparatus and Method for Calibration, and Calibration Rig
CN101698303B (en) * 2009-09-11 2011-02-02 大连理工大学 Automatic calibration method between three-dimensional laser and monocular vision
CN102063721B (en) * 2011-01-06 2012-07-18 大连理工大学 Method for compensating inclination of straight calibration object in calibration process of external parameter of vision system
CN103192397B (en) * 2012-01-09 2015-08-12 沈阳新松机器人自动化股份有限公司 Vision robot's off-line programing method and system
CN103292725A (en) * 2012-02-29 2013-09-11 鸿富锦精密工业(深圳)有限公司 Special boundary measuring system and method
CN105945909A (en) * 2016-05-13 2016-09-21 大族激光科技产业集团股份有限公司 Error correction method and system for three-degree-of-freedom parallel robot

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1590040A (en) * 2003-09-03 2005-03-09 中国科学院自动化研究所 Pickup camera self calibration method based on robot motion
CN103292695A (en) * 2013-05-10 2013-09-11 河北科技大学 Monocular stereoscopic vision measuring method
US20160346932A1 (en) * 2014-02-11 2016-12-01 Tyco Electronics (Shanghai) Co. Ltd. Automatic Calibration Method For Robot Systems Using a Vision Sensor
CN104180753A (en) * 2014-07-31 2014-12-03 东莞市奥普特自动化科技有限公司 Rapid calibration method of robot visual system
CN104786226A (en) * 2015-03-26 2015-07-22 华南理工大学 Posture and moving track positioning system and method of robot grabbing online workpiece
CN105234943A (en) * 2015-09-09 2016-01-13 大族激光科技产业集团股份有限公司 Industrial robot demonstration device and method based on visual recognition

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109636859A (en) * 2018-12-24 2019-04-16 武汉大音科技有限责任公司 A kind of scaling method of the 3D vision detection based on one camera
CN109636859B (en) * 2018-12-24 2022-05-10 武汉大音科技有限责任公司 Single-camera-based calibration method for three-dimensional visual inspection
CN110017852A (en) * 2019-04-25 2019-07-16 广东省智能机器人研究院 A kind of navigation positioning error measurement method
CN111145247A (en) * 2019-12-18 2020-05-12 配天机器人技术有限公司 Vision-based position detection method, robot and computer storage medium
CN111145247B (en) * 2019-12-18 2023-07-07 配天机器人技术有限公司 Position degree detection method based on vision, robot and computer storage medium
CN112123329A (en) * 2020-02-21 2020-12-25 深圳市三宝创新智能有限公司 Robot 3D vision hand-eye calibration method
CN114838659A (en) * 2022-04-26 2022-08-02 深圳市商汤科技有限公司 Manipulator testing device, testing method, calibration method and storage medium
CN114838659B (en) * 2022-04-26 2024-04-12 深圳市商汤科技有限公司 Manipulator testing device, testing method, calibration method and storage medium
CN115416022A (en) * 2022-08-26 2022-12-02 汕头大学 Positioning method, device and medium for mobile platform system

Also Published As

Publication number Publication date
CN109952176B (en) 2022-04-15
CN109952176A (en) 2019-06-28

Similar Documents

Publication Publication Date Title
WO2018214147A1 (en) Robot calibration method and system, robot and storage medium
WO2016074169A1 (en) Target detecting method, detecting device, and robot
WO2019156518A1 (en) Method for tracking hand pose and electronic device thereof
WO2016065626A1 (en) Gas leakage processing method and apparatus, and air vehicle
WO2013055137A1 (en) Apparatus and method for recognizing motion by using event-based vision sensor
WO2012053792A2 (en) Input device and contact position detecting method thereof
WO2017018650A1 (en) Touch pressure sensitivity correction method and computer-readable recording medium
WO2019142997A1 (en) Apparatus and method for compensating for image change caused by optical image stabilization motion
WO2018201638A1 (en) Image recognition based information collection method, mobile terminal and storage medium
WO2013129742A1 (en) Position sensing method of touch panel and integrated circuit
WO2019225955A1 (en) Method for checking crack in display and electronic device for performing same
WO2020071884A1 (en) Electronic device including sensor mounted below display panel
EP3891591A1 (en) Method of controlling device and electronic device
WO2015037853A1 (en) Touch panel
WO2022065763A1 (en) Display apparatus and method for controlling thereof
WO2017135707A9 (en) Touch-pressure sensitivity correction method and computer-readable recording medium
WO2022035054A1 (en) Robot and method for controlling same
WO2020224089A1 (en) Pattern code position adjustment method and apparatus, and computer readable storage medium
WO2019199086A1 (en) Electronic device and control method for electronic device
WO2018213980A1 (en) Robot calibration method, system, and calibration board
WO2021206380A1 (en) Electronic device including force sensors disposed on same layer and method for controlling same
WO2021071301A1 (en) Electronic device and control method of electronic device
WO2020171510A1 (en) Electronic device including touch circuit and operating method therefor
WO2023163373A1 (en) Method for calibrating parameters for affine transformation and motion control system using same
WO2020171511A1 (en) Touch circuit for processing touch-associated data, electronic device comprising touch circuit, and method for operating same

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17911087

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17911087

Country of ref document: EP

Kind code of ref document: A1