Robot guidance method, device, computer equipment and storage medium
By obtaining the relative posture of industrial robots and directly determining the target guidance data, the problems of complexity of hand-eye calibration and high human and material consumption in the prior art are solved, and a simplified robot guidance process is realized.
Patent Information
- Application Number
- CN202011134308.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-21
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2040-10-21
AI Technical Summary
When using industrial robots, the existing technology requires the collection of a large amount of position information through hand-eye calibration, resulting in complex operations and the inability to place or install the calibration plate smoothly, which consumes a lot of manpower and material resources.
By obtaining the relative position of the robot at the reference position and the current position and the relative position of the target position and the reference position, determine the target guidance data, and directly guide the robot to perform pose transformation, avoiding the use of the calibration plate.
It reduces the difficulty of determining robot guidance data, reduces manpower and material resources consumption, and simplifies the robot guidance process.
Smart Images

Figure CN112184819B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot technology, and in particular to a robot guiding method, device, computer equipment and storage medium. Background Art
[0002] With the development of automation technology, more and more production lines are beginning to use industrial robots to perform operations.
[0003] When an industrial robot is used to perform work, it is necessary to determine the guidance data of the industrial robot, and guide the industrial robot to perform posture transformation based on the guidance data. In the prior art, when determining the guidance data of the industrial robot, it is necessary to use a calibration plate to perform hand-eye calibration on the robot.
[0004] However, when using the calibration plate to calibrate the robot's hand and eye, a large amount of position information of the industrial robot needs to be collected, and due to the limitations of the equipment's operating space or fixtures, the calibration plate cannot be placed or installed smoothly in many cases. A complete calibration solution involving mechanisms, software, vision, etc. needs to be designed in the early stage of the equipment. The operation is complicated, which results in a high cost of manpower and material resources for robot guidance. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a robot guidance method, apparatus, computer equipment and storage medium to reduce the manpower and material resources consumed in robot guidance.
[0006] In a first aspect, an embodiment of the present invention provides a robot guidance method, comprising:
[0007] Acquire a relative position and posture of the robot, wherein the relative position and posture include a current relative position and posture when the robot is located at a reference position and a current position respectively, and a target relative position and posture when the robot is located at a target position and the reference position respectively;
[0008] Determining target guidance data of the robot according to the relative posture;
[0009] The robot is guided to perform posture transformation based on the target guidance data.
[0010] In a second aspect, an embodiment of the present invention provides a guiding device for a robot, comprising:
[0011] A posture acquisition module, used to acquire the relative posture of the robot, wherein the relative posture includes a current relative posture when the robot is located at a reference position and a current position respectively, and a target relative posture when the robot is located at a target position and the reference position respectively;
[0012] A data determination module, used for determining target guidance data of the robot according to the relative posture;
[0013] The posture transformation module is used to guide the robot to perform posture transformation based on the target guidance data.
[0014] In a third aspect, an embodiment of the present invention provides a computer device, including:
[0015] one or more processors;
[0016] a memory for storing one or more programs,
[0017] When the one or more programs are executed by the one or more processors, the one or more processors implement the robot guiding method as described in the embodiment of the present invention.
[0018] In a fourth aspect, an embodiment of the present invention further provides a method comprising a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the robot guiding method as described in the embodiment of the present invention is implemented.
[0019] The robot guidance method, device, computer equipment and storage medium provided in the embodiments of the present invention respectively obtain the current relative posture of the robot when it is located between the reference position and the current position and the target relative posture of the robot when it is located between the target position and the reference position, determine the target guidance data of the robot according to the current relative posture and the target relative posture, and guide the robot to perform posture transformation based on the target guidance data. The embodiments of the present invention adopt the above technical solution to determine the guidance data of the robot according to the relative posture of the robot, without the need to calibrate the robot using a calibration plate, which can reduce the difficulty of determining the guidance data of the robot and reduce the manpower and material resources consumed by the robot guidance. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0021] Figure 1 A schematic diagram of a flow chart of a robot guidance method provided in Embodiment 1 of the present invention;
[0022] Figure 2 A schematic flow chart of a robot guidance method provided in Embodiment 2 of the present invention;
[0023] Figure 3 A structural block diagram of a robot guidance device provided in Embodiment 3 of the present invention;
[0024] Figure 4 A schematic diagram of the structure of a computer device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0025] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only the parts related to the present invention are shown in the accompanying drawings, rather than the entire contents. In addition, the embodiments of the present invention and the features in the embodiments may be combined with each other without conflict.
[0026] Embodiment 1
[0027] Embodiment 1 of the present invention provides a robot guidance method. The method can be executed by a robot guidance device, wherein the device can be implemented by software and / or hardware, and can generally be integrated in a computer device capable of guiding the robot to perform posture transformation, and is suitable for guiding the robot to perform operations, especially for guiding industrial robots to perform operations. Figure 1 FIG. 1 is a flow chart of a robot guidance method provided by Embodiment 1 of the present invention. Figure 1 As shown, the method includes:
[0028] S110, acquiring a relative posture of the robot, wherein the relative posture comprises a current relative posture when the robot is located at a reference position and a current position respectively, and a target relative posture when the robot is located at a target position and the reference position respectively.
[0029] Among them, the robot can be understood as a robot that needs to be guided, such as a mobile robot or an industrial robot, etc., and the following takes an industrial robot (i.e., a manipulator) as an example for explanation. Accordingly, the relative posture of the robot can be understood as the change in the posture of the robot's gripper when it is located at two different positions. The relative posture of the robot can include the current relative posture of the robot at the reference position relative to the current position and the target relative posture of the robot at the target position relative to the reference position. The current relative posture and the target relative posture can be the relative posture of the robot in the image coordinate system. The current position can be understood as the starting position of the gripper of the industrial robot when guiding the industrial robot this time; the target position can be understood as the end position of the gripper of the industrial robot when guiding the industrial robot this time.
[0030] Specifically, the current posture and target posture of the robot in the image coordinate system can be determined by image acquisition, and then the current relative posture and target relative posture of the robot can be calculated based on the current posture and target posture, as well as the pre-stored reference posture of the robot at a reference position, as the relative posture of the robot.
[0031] In this embodiment, the reference position may include one or two positions where the robot posture is known, and it is sufficient that at least one reference position exists in the shooting range of the camera used to collect images to determine the current posture of the robot and the shooting range of the camera used to collect images to determine the target posture of the robot. For example, the current posture of the robot can be determined by collecting images through the first camera, and the target posture of the robot can be determined by collecting images through the second camera. When the shooting range of the first camera and the shooting range of the second camera have an intersection, the reference position may include one or two positions where the robot posture is known; when the shooting range of the first camera and the shooting range of the second camera do not have an intersection, the reference position may include two positions where the robot posture is known. The following is an example in which the reference position includes two positions where the robot posture is known. At this time, preferably, the reference position includes a first reference position and a second reference position, the current relative posture is the relative posture of the robot in the first image coordinate system of the first camera when the robot is located at the first reference position and the current position respectively, and the target relative posture is the relative posture of the robot in the second image coordinate system of the second camera when the robot is located at the target position and the second reference position respectively. The first reference position may be understood as a position within the shooting range of the first camera where the robot posture is known, and the second reference position may be understood as a position within the shooting range of the second camera where the robot posture is known.
[0032] S120. Determine target guidance data of the robot according to the relative position and posture.
[0033] Among them, the target guidance data can be understood as guidance information used to guide the robot to move from the current position to the target position and present a corresponding posture at the target position. When guiding the robot to perform posture transformation in a two-dimensional plane, it may include the distance that the robot needs to move in the x-axis and y-axis directions of the spatial coordinate system corresponding to the two-dimensional plane and the angle that the robot needs to rotate; when guiding the robot to perform posture transformation in three-dimensional space, it may include the distance that the robot needs to move in the x-axis, y-axis and z-axis directions of the spatial coordinate system corresponding to the three-dimensional space and the angle that the robot needs to rotate.
[0034] Specifically, after obtaining the current relative posture and target relative posture of the robot in the image coordinate system, the current relative posture and target relative posture can be converted into the relative posture in the spatial coordinate system according to the angle between the image coordinate system and the spatial coordinate system (i.e., the robot's own coordinate system) and the pixel equivalent of the camera corresponding to the image coordinate system, and then the distance and angle of rotation required for the robot to be converted from the current posture to the target posture are determined, and the target guidance data of the robot is obtained. The pixel equivalent of a camera is the physical length corresponding to a pixel in the image captured by the camera in the spatial coordinate system, and the unit is mm / pixel.
[0035] S130, guiding the robot to perform posture transformation based on the target guidance data.
[0036] In this embodiment, when guiding the robot to change its posture based on the target guidance data, the movement of the robot's position and the rotation of its direction can be performed in parallel or serially, that is, the robot can be controlled to move the distance it needs to move in the target guidance data, and the robot can be controlled to rotate the angle it needs to rotate in the target guidance data while the robot moves; the robot can also be controlled to move the distance it needs to move first, and then control the robot to rotate the angle it needs to rotate after the movement is completed, or the robot can be controlled to rotate the angle it needs to rotate first, and then control the robot to move the distance it needs to move after the rotation is completed. This embodiment does not limit this.
[0037] The robot guidance method provided in the first embodiment of the present invention obtains the current relative posture of the robot when it is located between the reference position and the current position and the target relative posture of the robot when it is located between the target position and the reference position, determines the target guidance data of the robot according to the current relative posture and the target relative posture, and guides the robot to perform posture transformation based on the target guidance data. This embodiment adopts the above technical solution to determine the guidance data of the robot according to the relative posture of the robot, without the need to calibrate the robot using a calibration plate, which can reduce the difficulty of determining the guidance data of the robot and reduce the manpower and material resources consumed by the robot guidance.
[0038] Embodiment 2
[0039] Figure 2A flowchart of a robot guidance method provided in Embodiment 2 of the present invention. Based on the above embodiments, this embodiment optimizes "obtaining the relative posture of the robot" as follows: respectively obtaining the current posture of the robot in the first image coordinate system of the first camera when the robot is at the current position and the target posture of the robot in the second image coordinate system of the second camera when the robot is at the target position; determining the current relative posture and target relative posture of the robot as the relative posture of the robot according to the current posture, the target posture, the first reference posture when the robot is at the first reference position, and the second reference posture when the robot is at the second reference position.
[0040] Furthermore, before obtaining the relative posture of the robot, it also includes: capturing a first reference image when the robot is located at a first reference position through a first camera, and recording the first reference posture of the robot in the first reference image; and capturing a second reference image when the robot is located at a second reference position through a second camera, and recording the second reference posture of the robot in the second reference image.
[0041] Further, determining the target guidance data of the robot according to the relative posture includes: determining the target guidance data of the robot according to the relative posture and reference guidance data of the robot, and the reference guidance data is used to guide the robot to transform from the first reference posture to the second reference posture.
[0042] Correspondingly, such as Figure 2 As shown, the robot guidance method provided in this embodiment may include:
[0043] S210. Capture, through a first camera, a first reference image of the robot when the robot is located at a first reference position, and record a first reference posture of the robot in the first reference image.
[0044] S220. Capture, by a second camera, a second reference image of the robot when the robot is located at a second reference position, and record a second reference posture of the robot in the second reference image.
[0045] Among them, the first camera may be a camera for photographing the first component and collecting the image of the first component, and the second camera may be a camera for photographing the second component and collecting the image of the second component. The first component and the second component may be understood as two components that need to be docked by the guiding robot. For example, when the guiding robot picks up a component with an uncertain position (i.e., an unknown position), the first component may be the robot's gripper, and the second component may be the component to be picked up; when the guiding robot places a certain component at a specified position, the first component may be the component to be placed, and the second component may be the specified position to be placed; when the guiding robot docks two components with uncertain positions, the first component may be one component to be docked, and the second component may be another component to be docked. At this time, correspondingly, the first reference pose of the robot in the first reference image may be the pose of the first component in the first reference image when it is located at the first reference position, and the second reference pose of the robot in the second reference image may be the pose of the second component in the second reference image when it is located at the second reference position.
[0046] Exemplarily, the staff member fixes the first camera (i.e., does not move with the robot), and after the first camera is installed, moves the first component to a suitable position within the shooting range of the first camera (such as placing the first component near the center of the first reference image), and executes a first trigger operation for triggering this end to determine the first reference posture; accordingly, when this end detects the staff member's first trigger operation, it controls the first camera to capture images, obtains the first reference image, and uses a set algorithm to identify and determine the posture (i.e., position coordinates and angle) of the first component in the first reference image as the first reference posture of the robot in the first reference image.
[0047] The staff fixes and installs the second camera, and after the second camera is installed, moves the second component to a suitable position within the shooting range of the second camera, and executes a second trigger operation for triggering this end to determine the second reference posture; correspondingly, when the local end detects the second trigger operation of the staff, it controls the second camera to collect images, obtains the second reference image and uses the set algorithm to identify and determine the posture (i.e., position coordinates and angle) of the second component in the second reference image as the second reference posture of the robot in the second reference image.
[0048] It is understandable that in some application scenarios, the first reference pose or the second reference pose may not be collected. For example, when guiding the robot to pick up a component with an uncertain position, the pose of the first component (i.e., the robot gripper) is generally known, and the first reference pose may not be collected at this time, that is, the first camera may not be installed; when guiding the robot to place a component at a specified position, the second component (i.e., the specified position to be placed) is known, and the second reference pose may not be collected at this time, that is, the second camera may not be installed. In actual application, the robot's guidance process may include a combination of multiple scenes, such as when guiding the robot to pick up a component with an uncertain position and place it at a specified position, the robot's guidance process includes a combination of a scene of picking up a component with an uncertain position and a scene of placing the component at a specified position; when guiding the robot to pick up a component with an uncertain position and docking it with another component with an uncertain position, the robot's guidance process includes a combination of a scene of picking up a component with an uncertain position and a scene of docking two components with uncertain positions. At this time, the sub-guidance data of each guidance scene included in the robot's guidance process can be calculated separately, and the sub-guidance data can be combined to obtain the robot's target guidance data.
[0049] S230, respectively acquiring a current posture of the robot in a first image coordinate system of the first camera when the robot is at the current position and a target posture of the robot in a second image coordinate system of the second camera when the robot is at the target position.
[0050] The current position of the robot can be represented by the position of the first target component that the robot currently needs to dock with in the first image coordinate system of the first camera before docking; the target position of the robot can be represented by the position of the second target component that the robot currently needs to dock with in the second image coordinate system of the second camera before docking. Here, the first target component is preferably a component of the same model as the first component and located within the shooting range of the first camera, and the second component is preferably a component of the same model as the second component and located within the shooting range of the second camera.
[0051] Specifically, when it is necessary to guide the robot to complete the docking of the first target component and the second target component, the first camera and the second camera can be controlled respectively to perform image acquisition to obtain a first target image containing the first target component and a second target image containing the second target component, and a set algorithm is used to determine the position and posture of the first target component in the first target image as the current position and posture of the robot, and a set algorithm is used to determine the position and posture of the second target component in the second target image as the target position and posture of the robot.
[0052] In this embodiment, when determining the position and posture of a certain component (such as a first component, a second component, a first target component or a second target component, etc.) in a certain image (such as a first reference image, a second reference image, a first target image or a second target image, etc.), each feature point of the component in the image can be first identified, and the position and posture of the component in the image can be determined based on each feature point. The algorithm used to identify the feature points of a certain component in the image can be set as needed. For example, the Halcon machine vision algorithm can be used as the basic algorithm. When it is necessary to identify the feature points of a certain component in the image, based on the information pre-entered by the staff (such as the template file that needs to be called when obtaining the feature points of the component and the edge information of its feature points that need to be captured), the template file corresponding to the component is called, and the feature points of the component in the image can be identified.
[0053] Among them, the feature points of the parts can be set as needed. When the intersection of two edges on the part is taken as the feature point and the direction of one of the edges is taken as the direction of the part, the staff can provide the corresponding template file and two regions of interest (ROI) for grabbing the edges; when the center of a circle on the part is taken as the feature point and the direction of one edge is taken as the direction of the part, the staff can provide the corresponding template file and two ROIs for grabbing the edges; when the center of a cross mark on the part is taken as the feature point and the direction of the straight line formed by the center of the cross mark and the center of another cross mark on the part is taken as the direction of the part, the staff can provide the corresponding template file and four ROIs for grabbing the edges; when the center of a circle on the part is taken as the feature point and the direction of the straight line formed by the center of the circle and the center of another circle on the part is taken as the direction of the part, the staff can To provide the corresponding template file and two ROIs for grabbing edges; when the intersection of the midline of a pair of edges on the component and the midline of another pair of edges is used as the feature point, and the direction of the midline of the first pair of edges is used as the direction of the component, the staff can provide the corresponding template file and four ROIs for grabbing edges; when creating a model on the component, and using the origin of the model as the feature point, and the direction of the model as the direction of the component, the staff can provide the corresponding template file; when creating two models on the component, using the origin of the first model as the feature point, and the direction of the line connecting the two model origins as the direction of the component, the staff is required to provide two template files of the component.
[0054] S240. Determine the current relative posture and the target relative posture of the robot as the relative posture of the robot according to the current posture, the target posture, the first reference posture when the robot is located at a first reference position, and the second reference posture when the robot is located at a second reference position.
[0055] Among them, the current relative posture is the relative posture of the robot in the first image coordinate system of the first camera when it is respectively located at the first reference position and the current position, and the target relative posture is the relative posture of the robot in the second image coordinate system of the second camera when it is respectively located at the target position and the second reference position.
[0056] In this embodiment, the posture can be described by position coordinates and angles. Accordingly, the current relative posture of the robot can be determined by calculating the position coordinate difference and angle difference between the first reference posture of the robot and the current posture, and the target relative posture of the robot can be determined by calculating the position coordinate difference and angle difference between the target posture of the robot and the second reference posture.
[0057] S250. Determine target guidance data of the robot according to the relative posture and reference guidance data of the robot, wherein the reference guidance data is used to guide the robot to transform from the first reference posture to the second reference posture.
[0058] Among them, the reference guidance data can be collected in advance. For example, after the first camera and the second camera are installed, the staff can set the first component to the first reference posture and the second component to the second reference posture respectively, manually operate the robot to make the robot complete the docking of the first component and the second component, and record the distance moved and the angle of rotation of the robot in the spatial coordinate system as the reference guidance data of the robot.
[0059] In this step, since the current relative posture is calculated based on the first reference position and the current posture, and the first reference posture and the current posture are the postures of the robot in the same image coordinate system, the corresponding relationship between the current relative posture and the corresponding actual distance and angle in its spatial coordinate system is fixed. Similarly, the relationship between the target relative posture and the corresponding actual distance and angle in the spatial rectangular coordinate system is also fixed. Therefore, this embodiment can determine the target guidance data of the robot based on the current relative posture, reference guidance data and the target relative posture.
[0060] In a preferred embodiment, the first guidance data and the second guidance data of the robot can be determined according to the relative posture, the first guidance data is used to guide the robot to transform from the current posture to the first reference posture, and the second guidance data is used to guide the robot to transform from the second reference posture to the target reference posture; the target guidance data of the robot is determined according to the first guidance data, the reference guidance data and the second guidance data. Wherein, the first guidance data may include the distance that the robot needs to move in the x-axis direction and the y-axis direction of the spatial coordinate system and the angle that the robot needs to rotate when the first target component moves from the current position to the first reference position, which can be obtained by calculating the actual distance and angle corresponding to the current relative posture in the control coordinate system; the second guidance data may include the distance that the robot needs to move in the x-axis direction and the y-axis direction of the spatial coordinate system and the angle that the robot needs to rotate when the first target component moves from the second reference position to the target position, which can be obtained by calculating the actual distance and angle corresponding to the target relative posture in the control coordinate system.
[0061] S260: Guiding the robot to perform posture transformation based on the target guidance data.
[0062] In one embodiment, the robot guidance method further includes: correcting the target guidance data using pre-set correction data; correspondingly, guiding the robot to perform posture change based on the target guidance data includes: guiding the robot to perform posture change based on the corrected target guidance data.
[0063] In the above embodiment, since the staff is required to manually dock the first component and the second component to determine the first reference posture and the second reference posture of the robot before guiding the robot, which serves as the basis for subsequent guiding the robot, in order to overcome the errors that occur when the staff manually docks the first component and the second component and determines the first reference posture and the second reference posture of the robot, this embodiment can correct the distance that the robot needs to move and the angle that the robot needs to rotate in the determined target guidance data through corresponding compensation values, and guide the robot to perform posture transformation based on the modified target guidance data.
[0064] Among them, the method for determining the compensation value can be flexibly selected, such as taking an image after the first component and the second component are docked, and calculating the compensation value according to the posture of the first component in the image (that is, the position coordinates and angle) and the posture of the second component in the image, such as calculating the coordinate difference and angle difference between the second component and the first component in the image, and setting the compensation value in a certain coordinate axis direction in the spatial coordinate system to the distance value corresponding to the coordinate difference in the corresponding coordinate axis direction of the spatial coordinate system, and setting the compensation value corresponding to the rotation angle in the spatial coordinate system to the angle value corresponding to the angle difference in the spatial coordinate system; when the compensation value cannot be determined by the above method, the staff can determine the size and direction of the error through experience such as judging whether compression deformation occurs after the docking of the first component and the second component, and then determine the compensation value.
[0065] In an exemplary application scenario, taking guiding a robot to dock two parts (a first target part and a second target part) with uncertain positions in a two-dimensional plane as an example, the robot guidance method provided in this embodiment can be implemented by the following steps:
[0066] a. Before guiding the robot to dock with the first target component and the second target component, the first camera and the second camera are fixedly installed in advance. It is assumed that after the fixed installation, the angle between the x-axis of the first image coordinate system of the first camera and the x-axis of the robot's space coordinate system is AngleAxToRx, and the angle between the x-axis of the second image coordinate system of the second camera and the x-axis of the robot's space coordinate system is AngleBxToRx.
[0067] b. Move the first component to a first reference position within the shooting range of the first camera, move the second component to a second reference position within the shooting range of the second camera, control the first camera and the second camera to capture images respectively, and record the coordinates (RefAx, RefAy) and direction RefAt (assuming the unit is radians) of the first component in the image captured by the first camera as the first reference pose, and record the position coordinates (RefBx, RefBy) and angle RefBt (assuming the unit is radians) of the second component in the image captured by the second camera as the second reference pose.
[0068] c. Record the first position coordinates and the first angle of the first component clamped by the robot when it is in the first reference position, manually control the robot to clamp the first component to perform posture transformation so that the first component and the second component are completely docked, and record the second position coordinates and the second angle of the first component at this time, calculate the difference RefRbtDx between the second position coordinate and the first position coordinate in the x-axis direction, the difference RefRbtDy between the second position coordinate and the second position coordinate in the y-axis direction, and the difference RefRbtDt between the second angle and the first angle as reference guidance data.
[0069] d. Determine the compensation value CompensatRx of the robot in the x-axis direction of the spatial coordinate system, the compensation value CompensatRy of the robot in the y-axis direction of the spatial coordinate system, and the compensation value CompensatRt of the robot at the angle of the control coordinate system.
[0070] e. Determine the pixel equivalent P2mmA of the first camera and the pixel equivalent P2mmB of the second camera. Taking the first camera as an example, when the lens magnification of the first camera is a fixed magnification, the pixel equivalent can be calculated according to the relevant parameters of its lens, that is, P2mmA = pixel size / lens magnification; when the lens magnification of the first camera is not a fixed magnification, its pixel equivalent can be determined by controlling the first camera to shoot an object of fixed length, that is, P2mmA = object length / number of pixels, where the object length is the actual length of the photographed object in the spatial coordinate system; the number of pixels is the number of pixels of the photographed object in the length direction of the object in the captured image.
[0071] f. When guiding the robot to dock with the first target component and the second target component, the first camera and the second camera are controlled to capture images respectively, and the position coordinates (CurrentAx, CurrentAy) and the angle CurrentAt of the first target component in the image are determined according to the image captured by the first camera, which are recorded as the current posture of the robot; and the position coordinates (CurrentBx, CurrentBy) and the angle CurrentBt of the second target component in the image are determined according to the image captured by the second camera, which are recorded as the target posture of the robot.
[0072] g. Use the following formula to calculate the distance CurrentRbtDx that the robot needs to move in the x-axis direction of the spatial coordinate system, the distance CurrentRbtDy that the robot needs to move in the y-axis direction of the spatial coordinate system, and the angle CurrentRbtDt that the robot needs to rotate as target guidance data.
[0073] CurrentRbtDx=ADx+RefRbtDx+BDx+CompensatRx;
[0074] CurrentRbtDy=ADy+RefRbtDy+BDy+CompensatRy;
[0075] CurrentRbtDt=(RefAt-CurrentAt)+RefRbtDt×π / 180+(CurrentBt-RefBt)+CompensatRt×π / 180, wherein ADx is the distance that the robot needs to move in the x-axis direction of the spatial coordinate system when the first target component moves from the current position to the first reference position; BDx is the distance that the robot needs to move in the x-axis direction of the spatial coordinate system when the first target component moves from the second reference position to the target position; ADy is the distance that the robot needs to move in the y-axis direction of the spatial coordinate system when the first target component moves from the current position to the first reference position; BDy is the distance that the robot needs to move in the y-axis direction of the spatial coordinate system when the first target component moves from the second reference position to the target position. ADx, BDx, ADy and BDy can be calculated using the following formulas:
[0076] ADx=[CurrentAdx×Cos(AngleAxToRx)-CurrentAdy×Sin(AngleAxToRx)]×P2mmA;
[0077] BDx=[CurrentBdx×Cos(AngleBxToRx)-CurrentBdy×Sin(AngleBxToRx)]×P2mmB;
[0078] ADy=[CurrentAdx×Sin(AngleAxToRx)+CurrentAdy×Cos(AngleAxToRx)]×P2mmA;
[0079] BDy=[CurrentBdx×Sin(AngleBxToRx)+CurrentBdy×Cos(AngleBxToRx)]×P2mmB
[0080] h. Guide the robot to change its posture according to the target guidance parameters.
[0081] The robot guidance method provided in the second embodiment of the present invention determines the first reference posture and the second reference posture by means of image acquisition, and determines the target guidance data of the robot based on this, without the need for complex robot hand-eye calibration and calibration of the position relationship of multiple cameras. This can further simplify the robot guidance process and reduce the manpower, material resources and financial resources consumed in robot guidance.
[0082] Embodiment 3
[0083] Embodiment 3 of the present invention provides a robot guidance device. The device can be implemented by software and / or hardware, and can generally be integrated in a computer device capable of guiding a robot to perform posture changes. The device is suitable for guiding a robot to perform operations, and is particularly suitable for guiding an industrial robot to perform operations. The device can guide the robot to perform posture changes by executing a robot guidance method. Figure 3 This is a structural block diagram of a robot guidance device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device includes: a posture acquisition module 301, a data determination module 302 and a posture transformation module 303, wherein:
[0084] A posture acquisition module 301 is used to acquire the relative posture of the robot, wherein the relative posture includes the current relative posture when the robot is located at the reference position and the current position respectively, and the target relative posture when the robot is located at the target position and the reference position respectively;
[0085] A data determination module 302, configured to determine target guidance data of the robot according to the relative position and posture;
[0086] The posture transformation module 303 is used to guide the robot to perform posture transformation based on the target guidance data.
[0087] The robot guidance device provided in the third embodiment of the present invention obtains the current relative posture of the robot when it is located between the reference position and the current position and the target relative posture of the robot when it is located between the target position and the reference position respectively through the posture acquisition module, determines the target guidance data of the robot according to the current relative posture and the target relative posture through the data determination module, and guides the robot to perform posture transformation based on the target guidance data through the posture transformation module. This embodiment adopts the above technical solution to determine the guidance data of the robot according to the relative posture of the robot, without the need to calibrate the robot using a calibration plate, which can reduce the difficulty of determining the guidance data of the robot and reduce the manpower and material resources consumed by the robot guidance.
[0088] In the above scheme, the reference position may include a first reference position and a second reference position, the current relative posture may be the relative posture of the robot in the first image coordinate system of the first camera when the robot is located at the first reference position and the current position respectively, and the target relative posture may be the relative posture of the robot in the second image coordinate system of the second camera when the robot is located at the target position and the second reference position respectively.
[0089] In the above scheme, the posture acquisition module 301 may include: a posture acquisition unit, used to respectively acquire the current posture of the robot in the first image coordinate system of the first camera when the robot is at the current position and the target posture in the second image coordinate system of the second camera when the robot is at the target position; a posture determination unit, used to determine the current relative posture and target relative posture of the robot according to the current posture, the target posture, the first reference posture when the robot is at the first reference position and the second reference posture when the robot is at the second reference position, as the relative posture of the robot.
[0090] Furthermore, the guiding device of the robot provided in this embodiment may also include: a reference posture determination module, which is used to capture a first reference image when the robot is located at a first reference position through a first camera, and record the first reference posture of the robot in the first reference image before obtaining the relative posture of the robot; and, capture a second reference image when the robot is located at a second reference position through a second camera, and record the second reference posture of the robot in the second reference image.
[0091] In the above scheme, the data determination module 302 can be used to: determine the target guidance data of the robot according to the relative posture and the reference guidance data of the robot, and the reference guidance data is used to guide the robot to transform from the first reference posture to the second reference posture.
[0092] In the above scheme, the data determination module 302 may include: a first data determination unit, used to determine the first guidance data and the second guidance data of the robot according to the relative posture, the first guidance data being used to guide the robot to transform from the current posture to the first reference posture, and the second guidance data being used to guide the robot to transform from the second reference posture to the target reference posture; a second data determination unit, used to determine the target guidance data of the robot according to the first guidance data, the reference guidance data and the second guidance data.
[0093] Furthermore, the robot guidance device provided in this embodiment may also include: a data correction module, used to correct the target guidance data using pre-set correction data; correspondingly, the posture transformation module 303 can be used to: guide the robot to perform posture transformation based on the corrected target guidance data.
[0094] The robot guidance device provided in the third embodiment of the present invention can execute the robot guidance method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the robot guidance method. For technical details not described in detail in this embodiment, please refer to the robot guidance method provided in any embodiment of the present invention.
[0095] Embodiment 4
[0096] Figure 4 A schematic diagram of the structure of a computer device provided in Embodiment 4 of the present invention is shown in FIG. Figure 4 As shown, the computer device includes a processor 40 and a memory 41, and may also include an input device 42 and an output device 43; the number of processors 40 in the computer device may be one or more. Figure 4 A processor 40 is taken as an example; the processor 40, memory 41, input device 42 and output device 43 in the computer device can be connected by a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0097] The memory 41, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the robot guidance method in the embodiment of the present invention (for example, the posture acquisition module 301, the data determination module 302 and the posture transformation module 303 in the robot guidance device). The processor 40 executes various functional applications and data processing of the computer device by running the software programs, instructions and modules stored in the memory 41, that is, realizes the above-mentioned robot guidance method.
[0098] The memory 41 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 41 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 41 may further include a memory remotely arranged relative to the processor 40, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0099] The input device 42 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the computer device. The output device 43 may include a display device such as a display screen.
[0100] Embodiment 4 of the present invention further provides a storage medium containing computer executable instructions, wherein the computer executable instructions are used to execute a robot guidance method when executed by a computer processor, the method comprising:
[0101] Acquire a relative position and posture of the robot, wherein the relative position and posture include a current relative position and posture when the robot is located at a reference position and a current position respectively, and a target relative position and posture when the robot is located at a target position and the reference position respectively;
[0102] Determining target guidance data of the robot according to the relative posture;
[0103] The robot is guided to perform posture transformation based on the target guidance data.
[0104] Of course, the computer executable instructions of a storage medium containing computer executable instructions provided by an embodiment of the present invention are not limited to the method operations described above, but can also execute related operations in the robot guidance method provided by any embodiment of the present invention.
[0105] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0106] It is worth noting that in the embodiment of the guiding device of the above-mentioned robot, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0107] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A robot guidance method, characterized in that: include: Acquire a relative position and posture of the robot, wherein the relative position and posture include a current relative position and posture when the robot is located at a reference position and a current position respectively, and a target relative position and posture when the robot is located at a target position and the reference position respectively; Wherein, the reference position includes a first reference position and a second reference position, the current relative position is the relative position of the robot in the first image coordinate system of the first camera when the robot is located at the first reference position and the current position respectively, and the target relative position is the relative position of the robot in the second image coordinate system of the second camera when the robot is located at the target position and the second reference position respectively; Determine the target guidance data of the robot according to the relative position and posture; wherein the target guidance data is guidance information for guiding the robot to move from a current position to a target position and present a corresponding posture at the target position; Guiding the robot to perform posture transformation based on the target guidance data; The obtaining of the relative position and posture of the robot comprises: Respectively obtain a current posture of the robot in a first image coordinate system of the first camera when the robot is at a current position and a target posture of the robot in a second image coordinate system of the second camera when the robot is at a target position; The current relative posture and the target relative posture of the robot are determined according to the current posture, the target posture, the first reference posture when the robot is located at a first reference position, and the second reference posture when the robot is located at a second reference position as the relative posture of the robot.
2. The method according to claim 1, characterized in that Before obtaining the relative position and posture of the robot, the method further includes: capturing a first reference image of the robot when it is located at a first reference position through a first camera, and recording a first reference posture of the robot in the first reference image; and, A second reference image when the robot is located at a second reference position is captured by a second camera, and a second reference posture of the robot in the second reference image is recorded.
3. The method according to claim 1, characterized in that Determining the target guidance data of the robot according to the relative posture includes: The target guidance data of the robot is determined according to the relative posture and the reference guidance data of the robot, and the reference guidance data is used to guide the robot to transform from the first reference posture to the second reference posture.
4. The method according to claim 3, characterized in that The determining the target guidance data of the robot according to the relative position and the reference guidance data of the robot comprises: Determine first guidance data and second guidance data of the robot according to the relative posture, the first guidance data being used to guide the robot to transform from the current posture to the first reference posture, and the second guidance data being used to guide the robot to transform from the second reference posture to a target reference posture; Target guidance data of the robot is determined according to the first guidance data, the reference guidance data and the second guidance data.
5. The method according to any one of claims 1 to 4, characterized in that: Also includes: Correcting the target guidance data using preset correction data; Accordingly, guiding the robot to perform posture transformation based on the target guidance data includes: The robot is guided to perform posture transformation based on the corrected target guidance data.
6. A guiding device for a robot, characterized in that: include: A posture acquisition module, used to acquire the relative posture of the robot, wherein the relative posture includes a current relative posture when the robot is located at a reference position and a current position respectively, and a target relative posture when the robot is located at a target position and the reference position respectively; Wherein, the reference position includes a first reference position and a second reference position, the current relative position is the relative position of the robot in the first image coordinate system of the first camera when the robot is located at the first reference position and the current position respectively, and the target relative position is the relative position of the robot in the second image coordinate system of the second camera when the robot is located at the target position and the second reference position respectively; A data determination module, used to determine the target guidance data of the robot according to the relative position and posture; wherein the target guidance data is guidance information for guiding the robot to move from a current position to a target position and present a corresponding posture at the target position; A posture transformation module, used for guiding the robot to perform posture transformation based on the target guidance data; The posture acquisition module includes: a posture acquisition unit and a posture determination unit; The posture acquisition unit is used to respectively acquire the current posture of the robot in the first image coordinate system of the first camera when the robot is at the current position and the target posture of the robot in the second image coordinate system of the second camera when the robot is at the target position; The posture determination unit is used to determine the current relative posture and target relative posture of the robot as the relative posture of the robot based on the current posture, the target posture, the first reference posture when the robot is located at a first reference position, and the second reference posture when the robot is located at a second reference position.
7. A computer device, characterized in that: include: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the robot guiding method as described in any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the robot guiding method as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Industrial robot workpiece positioning grabbing method and system based on visual guidance
CN103895042A
Image processing method and device
CN106139564A
Position and posture detection method for high-precision automatic butt joint of parts
CN108036791A
Grabbing control method and device based on visual servo and robot
CN109955244A
A holder control method, a holder, a photographing device and a readable storage medium
CN110337560A
