The present application claims priority from chinese patent application No. 202211609084.X entitled "a method, apparatus, device and storage medium for locating a cargo box" filed on 12/14 of 2022, the entire contents of which are incorporated herein by reference.
Disclosure of Invention
The application provides a container positioning method, device, equipment and storage medium, which are used for improving the efficiency of positioning a container. Specifically, the embodiment of the application discloses the following technical scheme:
In a first aspect, an embodiment of the present application provides a container positioning method applied to a terminal device, where the terminal device is connected to a control device and a vision scanning device on a container taking device, and the control device is connected to a mechanical arm on the container taking device, the method includes:
After the transfer robot moves the goods shelf to the workstation, acquiring image information of a to-be-identified mark on the goods shelf, which is acquired by the visual scanning equipment, wherein the to-be-identified mark comprises at least one of a visual identification code arranged on the goods shelf, a vertex angle of the goods shelf and a crossing position of the grid openings in the goods shelf, and the number of the visual identification codes arranged on the goods shelf is smaller than that of the grid openings in the goods shelf;
calculating first position information of the identification to be identified under a first coordinate system based on image information of the identification to be identified, wherein the first coordinate system is a coordinate system constructed based on the visual scanning equipment;
Acquiring second position information of the identification to be identified under a second coordinate system, wherein the second coordinate system is a coordinate system constructed based on the goods shelf;
Calculating a conversion relationship between the first coordinate system and the second coordinate system based on the first position information and the second position information;
acquiring third position information of at least one container to be carried on the goods shelf under a second coordinate system, determining fourth position information of the container to be carried relative to the container taking device based on the third position information and the conversion relation, sending the fourth position information to the control device, and triggering the control device to control the mechanical arm to take the container to be carried based on the fourth position information.
With reference to the first aspect, in one possible implementation manner of the first aspect, the number of the to-be-identified identifiers is greater than or equal to four, and positions of the to-be-identified identifiers are not on a straight line.
With reference to the first aspect, in a possible implementation manner of the first aspect, the identifier to be identified includes four top corners of the front area of the shelf or four top corners of the top area of the shelf.
With reference to the first aspect, in one possible implementation manner of the first aspect, the identification to be identified includes an intersection position of a grid of a front area of the shelf, or an intersection position of a grid of a top area of the shelf.
With reference to the first aspect, in a possible implementation manner of the first aspect, the identifier to be identified includes a crossing position of a top corner of the shelf front area and a grid of the shelf front area, or the identifier to be identified includes a crossing position of a top corner of the shelf top area and a grid of the shelf top area.
With reference to the first aspect, in one possible implementation manner of the first aspect, the identifier to be identified includes visual identifier codes, the number of the visual identifier codes is greater than four, each visual identifier code is respectively disposed at four top corners of a front area of the shelf and at least one preset target position of a top area of the shelf, or each visual identifier code is respectively disposed at four top corners of the top area of the shelf and at least one preset target position of the front area, where the preset target positions include a top corner position and a center position.
With reference to the first aspect, in one possible implementation manner of the first aspect, the identifier to be identified includes four visual identification codes, and each visual identification code is respectively disposed at four top corners of the front area or the top area of the shelf.
With reference to the first aspect, in one possible implementation manner of the first aspect, the identifier to be identified includes three visual identification codes, where each visual identification code is respectively disposed at any three top corners of the front area or the top area of the shelf, or two visual identification codes, where each visual identification code is respectively disposed at two top corners of the front area or the top area of the shelf and located at a diagonal line, or one visual identification code, where each visual identification code is disposed at a central position of the front area or the top area of the shelf.
With reference to the first aspect, in a possible implementation manner of the first aspect, calculating a conversion relationship between the first coordinate system and the second coordinate system based on the first position information and the second position information includes:
calculating the first position information and the second position information by adopting a preset algorithm to generate rotation parameters and translation parameters;
based on the rotation parameters and the translation parameters, a conversion relationship between the first coordinate system and the second coordinate system is determined.
With reference to the first aspect, in one possible implementation manner of the first aspect, determining fourth position information of the container to be handled relative to the container pickup device based on the third position information and the conversion relationship includes:
determining intermediate position information of the container to be carried relative to the visual scanning equipment based on the third position information and the conversion relation;
And determining fourth position information of the container to be carried relative to the box taking device based on the intermediate position information and a preset position relation between the visual scanning equipment and the box taking device.
With reference to the first aspect, in a possible implementation manner of the first aspect, obtaining second location information of the identifier to be identified in the second coordinate system includes:
Constructing a second coordinate system by taking a preset target point on the goods shelf as an origin;
and calculating second position information of the identification to be identified under a second coordinate system based on preset size information of a grid for placing the container to be carried on the goods shelf.
In a second aspect, embodiments of the present application further provide a container positioning device, including:
The system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring image information of a to-be-identified mark acquired by visual scanning equipment after a transfer robot transfers a shelf to a workstation, the to-be-identified mark comprises at least one of a visual identification code arranged on the shelf, a top angle of the shelf and a crossing position of a grid opening in the shelf, and the number of the visual identification codes arranged on the shelf is smaller than that of the grid openings in the shelf;
the first computing module is used for computing first position information of the identification to be identified under a first coordinate system based on image information of the identification to be identified, wherein the first coordinate system is a coordinate system constructed based on the visual scanning equipment;
The second acquisition module is used for acquiring second position information of the mark to be identified under a second coordinate system, wherein the second coordinate system is a coordinate system constructed based on the goods shelf;
The second calculation module is used for calculating a conversion relation between the first coordinate system and the second coordinate system based on the first position information and the second position information;
The determining module is used for acquiring third position information of at least one container to be carried on the goods shelf under the second coordinate system, determining fourth position information of the container to be carried relative to the container taking device based on the third position information and the conversion relation, sending the fourth position information to the control device, and triggering the control device to control the mechanical arm to take the container to be carried based on the fourth position information.
In a third aspect, an embodiment of the present application provides an electronic device (computer device) including a processor and a memory, where the memory is configured to store computer executable instructions, and a processor configured to read the instructions from the memory and execute the instructions to implement the method of the first aspect and any implementation manner of the first aspect.
In a fourth aspect, embodiments of the present application also provide a computer-readable storage medium having stored therein computer instructions for causing the computer to perform the method of the first aspect and any implementation manner of the first aspect.
In addition, an embodiment of the present application also provides a computer program product comprising a computer program stored on a computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method in any implementation of the first aspect.
According to the container positioning method, device, equipment and storage medium, image information of a to-be-identified mark on a goods shelf acquired by visual scanning equipment is acquired, first position information of the to-be-identified mark under a first coordinate system is calculated based on the image information of the to-be-identified mark, second position information of the to-be-identified mark under a second coordinate system is acquired, a conversion relation between the first coordinate system and the second coordinate system is calculated based on the first position information and the second position information, finally third position information of at least one to-be-carried container on the goods shelf under the second coordinate system is acquired, fourth position information of the to-be-carried container relative to a container taking device is determined based on the third position information and the conversion relation, the fourth position information is sent to a control device, and a mechanical arm is triggered to take the to-be-carried container based on the fourth position information. The application can determine the position information of the container to be carried relative to the container taking device by identifying the to-be-identified mark comprising at least one of the visual identification code, the top angle of the goods shelf and the crossing position of the grid openings in the goods shelf, so that the visual identification code is not required to be installed on the goods shelf, or a small number of visual identification codes are only required to be installed on the goods shelf, the manufacturing cost and the installation cost of the visual identification code are reduced, and in addition, the position information of all containers can be determined at one time only by collecting the image information of the to-be-identified mark once and by calculating the conversion relation, thereby improving the efficiency of positioning the containers.
Detailed Description
In order to better understand the technical solution in the embodiments of the present application and make the above objects, features and advantages of the embodiments of the present application more comprehensible, the technical solution in the embodiments of the present application is described in further detail below with reference to the accompanying drawings.
In order to accurately position the current position of a container, a visual identification code is generally arranged at each grid port of the container placed on a goods shelf, after the container to be carried is roughly positioned through preset position information, the visual acquisition equipment in the container taking device is used for acquiring image information of the visual identification code at the grid port of the container to be carried, and further, the position information of the container to be carried relative to the visual scanning equipment is calculated based on the image information. Because the vision scanning equipment is arranged on the box taking device and the relative position relation between the vision scanning equipment and the box taking device is known, accurate position information of the container to be carried relative to the box taking device can be calculated, and then the mechanical arm can be controlled to take the container to be carried based on the position information. In addition, because the image information of the visual identification code at each grid position needs to be acquired, all containers to be carried on the goods shelf can be accurately positioned, and the efficiency of positioning the containers is reduced.
In view of the above, the embodiment of the application provides a container positioning method, device, equipment and storage medium, which can determine the position information of a container to be carried relative to a container taking device by identifying a to-be-identified mark comprising at least one of a visual identification code, a top angle of a goods shelf and a crossing position of a grid in the goods shelf, so that the visual identification code is not required to be installed on the goods shelf, or a small number of visual identification codes are required to be installed on the goods shelf, and the manufacturing cost and the installation cost of the visual identification code are reduced.
As shown in fig. 1, fig. 1 is a schematic view of a scenario of a container positioning method provided by an embodiment of the present application, where a terminal device 102 is connected to a control device 104 and a visual scanning device 1061 on a box taking device 106, and the control device 104 is connected to a mechanical arm 1062 on the box taking device 106. The terminal device 102 is configured with an upper layer service system for executing a container positioning method, the visual scanning device 1061 may be a camera for scanning and identifying a visual identification code on a shelf and collecting image information of the visual identification code, and the control device 104 may include a programmable logic controller (Programmable Logic Controller, abbreviated as PLC) for receiving position information of a container to be handled relative to the container taking device sent by the terminal device 102, and controlling the mechanical arm 1062 to take the container to be handled based on the position information. The mechanical arm 1062 may be a suction-type mechanical arm, or may be another type of mechanical arm, which is not limited in particular in the embodiment of the present application.
The following describes the technical scheme provided by the embodiment of the application in detail by combining the drawings. Fig. 2 is a flowchart of a method for positioning a cargo box according to an embodiment of the present application, where the method includes the following steps:
Step 202, after the transfer robot transfers the goods shelf to the workstation, acquiring image information of the to-be-identified mark on the goods shelf acquired by the visual scanning equipment.
The identification to be identified comprises at least one of a visual identification code arranged on the goods shelf, the vertex angle of the goods shelf and the crossing position of the grid openings in the goods shelf, and the number of the visual identification codes arranged on the goods shelf is smaller than the number of the grid openings in the goods shelf.
In some embodiments, the top angle of the shelf and/or the crossing position of the grid openings in the shelf can be used as the identification to be identified without setting a visual identification code on the shelf. In some embodiments, a number of visual identification codes smaller than the number of the grid openings in the shelf can be arranged on the shelf, and the visual identification codes are used as the identification to be identified on the shelf. In other embodiments, the visual identification code and the top corner of the shelf may be used as the identification to be identified on the shelf. Or the intersection position of the visual identification code and the grid mouth in the goods shelf can be used as the identification to be identified on the goods shelf. Or the visual identification code, the top angle of the goods shelf and the crossing position of the grid mouth in the goods shelf can be used as the identification to be identified on the goods shelf.
For example, the number of the marks to be identified may be greater than or equal to four, and the positions of the marks to be identified are not on a straight line. The more the number of the marks to be identified, the more accurate the position of the container to be carried is determined.
Illustratively, the identification to be identified includes a shelf top angle. When the identification to be identified only comprises the top angles of the shelf, the number of the top angles of the shelf is more than or equal to four. For example, the identification to be identified includes four corners of the shelf front area, or four corners of the shelf top area. For another example, the identification to be identified may also include four corners of the shelf side area. When the to-be-identified mark comprises a shelf top angle, a grid intersection position and/or a visual identification code in the shelf, the number of the shelf top angles can be smaller than four. The embodiment of the application does not limit the positions and the number of the top angles of the goods shelf included in the identification to be identified, and the positions of the top angles of the goods shelf included in the identification to be identified are related to the installation positions of the visual scanning equipment.
For example, fig. 3A is a schematic diagram of a front area of a shelf including a to-be-identified mark according to an embodiment of the present application, as shown in fig. 3A, gray dots in fig. 3A represent four top corners of the front area of the shelf, where the four top corners of the front area of the shelf are to-be-identified marks on the shelf.
Illustratively, the identification to be identified includes the intersection location of the grid in the shelf. When the identification to be identified only comprises crossing positions of the grid openings in the shelf, the number of the crossing positions of the grid openings of the shelf is more than or equal to four. For example, the identification to be identified includes at least four intersecting locations of the pockets in the front area of the shelf, or at least four intersecting locations of the pockets in the top area of the shelf. For another example, the identification to be identified may also include at least four intersecting locations of the pockets in the side areas of the shelf. When the to-be-identified mark comprises a shelf top angle and/or a visual identification code in addition to the crossing positions of the grid openings, the number of the crossing positions of the grid openings of the shelf can be smaller than four. The embodiment of the application does not limit the positions and the number of the crossing positions of the grids included in the identification to be identified, and the crossing positions of the grids included in the identification to be identified are related to the installation positions of the visual scanning equipment.
For example, fig. 3B is a schematic diagram of a front area of a shelf including a to-be-identified mark according to another embodiment of the present application, where, as shown in fig. 3B, the shelf includes a bin a to a bin L, an intersection point of each bin is a to-be-identified mark, and gray dots in fig. 3B each represent the to-be-identified mark.
For example, the identification to be identified may include both the top corners of the shelf and the intersection locations of the grid openings in the shelf. For example, the identification to be identified includes the intersection of the top corner of the shelf front area and the grid of the shelf front area. For another example, the identification to be identified includes the intersection of the top corner of the shelf top area and the grid of the shelf top area.
Illustratively, the identification to be identified comprises a visual identification code. The visual identification code is an identification code for positioning, and Apriltag codes and Apriltag codes can be generally used as a visual positioning identifier, which is similar to a two-dimensional code or a bar code. ArUco codes may of course also be used, and embodiments of the present application are not limited in this regard. The principle of positioning by adopting Apriltag codes and ArUco codes is the prior art and is not described herein.
In addition, in the embodiment of the application, the number of the visual identification codes installed on the shelf is smaller than the number of the grid openings in the shelf, and one visual identification code is not required to be installed at each grid opening of the shelf. As shown in fig. 3C, fig. 3C is a schematic diagram of setting a visual identifier in a front area of a shelf according to an embodiment of the present application, where the shelf includes a bin a to a bin L, and gray dots below each bin represent the visual identifier corresponding to the bin, that is, in the prior art, a visual identifier is set at each bin. The number of the visual identification codes arranged on the shelf in the embodiment of the application is smaller than the number of the grid openings in the shelf, and the embodiment of the application does not limit the positions of the visual identification codes arranged on the shelf.
In some embodiments, the number of visual identification codes may be greater than four and less than the number of grid openings in the shelf, each visual identification code being disposed at four corners of the front area and at least one preset target location of the top area of the shelf, respectively, or each visual identification code being disposed at four corners of the top area of the shelf and at least one preset target location of the front area, respectively.
The preset target positions comprise vertex angle positions and center positions, and are described by taking four vertex angle positions of the front area of the goods shelf and four vertex angle positions of the top area as examples.
The position information of the goods shelf can be determined through the visual identification codes at the four top corners of the front area, the position information of the goods shelf can be determined through the visual identification codes at the four top corners of the top area, then the two determined position information can be compared, for example, difference comparison can be carried out, if the difference value is smaller than a preset threshold value, the determined position information of the goods shelf is accurate, if the difference value is larger than the preset threshold value, the determined position information of the goods shelf is inaccurate, at the moment, whether deviation occurs in the installation position of the visual identification code or not can be checked again, and therefore the manufacturing cost and the installation cost of the visual identification code can be reduced, and the accuracy of positioning a container can be improved.
In some embodiments, the number of visual identification codes may be four, and each visual identification code may be disposed at four top corners of the shelf front area or the top area, respectively. With continued reference to fig. 3C, it can be seen that the dots at the four corners of the shelf represent a visual identification code, respectively, which can be identified as TAG1, TAG2, TAG3, TAG4, respectively.
In addition, fig. 4 is a schematic diagram of setting a visual identification code in a top area of a shelf according to an embodiment of the present application, where four visual identification codes are represented by small rectangular boxes at four top corners. The positioning of all containers can be realized by adopting four visual identification codes, so that the manufacturing cost and the installation cost of the visual identification codes are greatly reduced, and the maintenance cost of the visual identification codes in the later period is also reduced. The embodiment of the application does not limit the positions and the number of the visual identification codes arranged on the goods shelf, the arrangement positions of the visual identification codes are related to the installation positions of the visual scanning equipment, and the arrangement number of the visual identification codes is smaller than the number of the grid openings in the goods shelf.
In other embodiments, the number of the visual identification codes may be three, and each visual identification code is respectively disposed at any three vertex angles of the front area or the top area of the shelf, and the surface where the whole shelf is located can still be determined through the three visual identification codes, so that the position information of the shelf can be determined.
In other embodiments, the number of visual identification codes may be two, each visual identification code being disposed at two top corners of the shelf front or top area, respectively, at a diagonal. The number of visual identification codes may also be one, which is arranged in the central position of the front or top area of the shelf. The position information of the goods shelf can be determined by combining two visual identification codes or one visual identification code and the goods shelf size information, and in addition, the manufacturing cost and the installation cost of the visual identification codes are further reduced.
It should be noted that, when the identification to be identified is a visual identification code, a specific implementation manner of obtaining the position information of the container to be carried relative to the box taking device is similar to a specific implementation manner of obtaining the position information of the container to be carried relative to the box taking device when the identification to be identified is the top angle of the goods shelf and/or the crossing position of the grid openings in the goods shelf.
Step 204, calculating first position information of the identification to be identified under the first coordinate system based on the image information of the identification to be identified.
Wherein the first coordinate system is a coordinate system constructed based on the visual scanning device. Taking the example that the identification to be identified includes visual identification codes, please continue to refer to fig. 3C, the position information of the four visual identification codes under the first coordinate system may be respectively expressed as :PTAG1Camera=(X1,Y1,Z1)、PTAG2Camera=(X2,Y2,Z2)、PTAG3Camera=(X3,Y3,Z3)、PTAG4Camera=(X4,Y4,Z4).
Step 206, obtaining second position information of the identification to be identified in the second coordinate system.
The second coordinate system is a coordinate system constructed based on the shelf, please continue to refer to fig. 3C, and coordinate system XYZ in fig. 3C is the second coordinate system. In calculating the second location information, as shown in fig. 5, fig. 5 is a flowchart of calculating the second location information according to an embodiment of the present application, where the method includes the following steps:
step 502, a second coordinate system is constructed by taking a preset target point on the shelf as an origin.
Step 504, calculating second position information of the identification to be identified under a second coordinate system based on preset size information of a grid for placing the container to be carried on the goods shelf.
The preset target point may be any predetermined position in the shelf, as shown in fig. 3C, and may be a top corner in an upper left corner position of four top corners of the shelf, so that the top corner may be used as an origin of the second coordinate system, an X axis is established in a horizontal direction, a Y axis is established in a vertical direction, and Z axes are respectively perpendicular to the X axis and the Y axis, so as to construct the second coordinate system.
In fig. 3C, N may be used to represent the size of each of the slits in the horizontal direction in the preset size information of each of the slits, M represents the size of each of the slits in the vertical direction, and the size in the Z-axis direction may be uniformly set to 0. Taking the example of the identification to be identified as the visual identification codes arranged at the four top corners of the front area of the shelf, the second position information of the four visual identification codes under the second coordinate system can be respectively expressed as PTAG1 Shelf=(0,0,0)、PTAG2Shelf=(3N,0,0)、PTAG3Shelf=(0,4M,0)、PTAG4Shelf = (3 n,4m, 0).
In some embodiments, taking an example that the to-be-identified marks include crossing positions of the grid openings in the shelf, where the crossing positions of the grid openings are grid openings of the front area of the shelf, in order to determine the second position information of each to-be-identified mark under the second coordinate system, the image information of the to-be-identified marks collected by the visual scanning device may include all grid openings of the front area of the shelf. For example, the visual scanning device may be a fisheye camera, and after the transfer robot carries the shelf to the workstation, the fisheye camera collects image information of all the grid openings including the front area of the shelf, and can determine second position information of intersection positions of all the grid openings in the identification to be identified under the second coordinate system through the image information. For another example, after the transfer robot transfers the shelf to the workstation, the vision scanning device collects image information of an upper part of the shelf (for example, an upper part of the shelf, a lower part of the shelf, a left part of the shelf, or a right part of the shelf, and for another example, an upper part of the shelf, a lower part of the shelf, a left part of the shelf, or a right part of the shelf, and the cross position of each of the shelf in the to-be-identified identifier is determined according to the image information. For another example, the vision scanning device may collect a plurality of images including the to-be-identified mark during the process of transporting the shelf to the workstation by the transfer robot, and determine the second position information of the crossing position of each grid in the to-be-identified mark under the second coordinate system by using the plurality of images.
Step 208, calculating a conversion relationship between the first coordinate system and the second coordinate system based on the first position information and the second position information.
Fig. 6 is a flowchart of calculating a conversion relationship according to an embodiment of the present application, where, as shown in fig. 6, the method includes the following steps:
Step 602, calculating the first position information and the second position information by adopting a preset algorithm, and generating a rotation parameter and a translation parameter.
Step 604, determining a conversion relation between the first coordinate system and the second coordinate system based on the rotation parameter and the translation parameter.
Illustratively, the preset algorithm may be a PnP (PERSPECTIVE-n-Point) algorithm, which is a corresponding method of solving 3D to 2D points, which describes how to estimate the pose of the camera when knowing n 3D spatial points and their locations. By the following formula (1), after the four sets of first position information and the four sets of second position information are substituted into the formula, the rotation parameter R and the translation parameter t can be calculated by adopting a PnP algorithm, and a specific solving process is the prior art and is not described herein. So that the conversion relation between the first coordinate system and the second coordinate system can be determined based on the rotation parameter R and the translation parameter t.
PTAGCamera=PTAGShelf R+t (1)
Wherein PTAG Camera represents first position information of a to-be-identified mark, PTAG Shelf represents second position information of the to-be-identified mark, R represents a rotation parameter, and t represents a translation parameter.
Step 210, obtaining third position information of at least one container to be carried on the goods shelf under the second coordinate system, determining fourth position information of the container to be carried relative to the container taking device based on the third position information and the conversion relation, sending the fourth position information to the control device, and triggering the control device to control the mechanical arm to take the container to be carried based on the fourth position information.
The method for determining the third position information of the container to be handled in the second coordinate system refers to the process of determining the second position information. Taking the case of the container to be handled placed at the site E in fig. 3C as an example, the third position information of the container to be handled may be expressed asBased on this, in determining the fourth location information, as shown in fig. 7, fig. 7 is a flowchart of determining the fourth location information according to an embodiment of the present application, where the method includes the following steps:
Step 702, determining intermediate position information of the container to be handled relative to the vision scanning device based on the third position information and the conversion relation.
Step 704, determining fourth position information of the container to be carried relative to the container taking device based on the intermediate position information and a preset position relation between the vision scanning device and the container taking device.
Taking the to-be-handled container placed at the bin E in fig. 3C as an example, based on the third position information and the conversion relationship, the position information of the to-be-handled container relative to the vision scanning device, that is, the intermediate position information, can be calculated by the following formula (2).
PECamera=PEShelf R+t (2)
Wherein PE Camera represents position information (e.g., intermediate position information) of the container to be handled placed at the lane E in the first coordinate system, and PE Shelf represents position information (e.g., third position information) of the container to be handled placed at the lane E in the second coordinate system.
Since the vision scanning device is manually installed on the box taking device, the preset position relationship between the vision scanning device and the box taking device is also known, so that the intermediate position information can be converted into fourth position information of the container to be carried relative to the box taking device based on the preset position relationship and the intermediate position information calculated by the formula (2).
After the fourth position information of the container to be carried relative to the container taking device is finally calculated, the terminal equipment can send the fourth position information to the control device, and the control device is triggered to control the mechanical arm to take the container to be carried based on the fourth position information.
In addition, it should be noted that, when a plurality of containers to be handled need to be fetched once, the fourth position information corresponding to each container to be handled can be obtained through the calculation of the above formula (2), so that all the fourth position information is sent to the control device, and thus, the plurality of containers to be handled need to be fetched once can be realized. Also for returning containers, the method can be used for returning a plurality of containers at one time.
Embodiments of the apparatus corresponding to the foregoing method embodiments are described below.
The embodiment of the present application also provides a container positioning device 800 for performing the container positioning method in the foregoing embodiment.
Specifically, as shown in FIG. 8, the device comprises a first acquisition module 801, a first calculation module 802, a second acquisition module 803, a second calculation module 804 and a determination module 805. In addition, the apparatus may include other more or fewer units/modules, such as a storage unit, a transmission unit, etc.
The first obtaining module 801 is configured to obtain, after the transfer robot transfers the shelf to the workstation, image information of a to-be-identified identifier on the shelf collected by the visual scanning device, where the to-be-identified identifier includes at least one of a visual identifier code set on the shelf, a vertex angle of the shelf, and a crossing position of a grid in the shelf, and the number of the visual identifier codes set on the shelf is less than the number of the grid in the shelf.
The first calculating module 802 is configured to calculate, based on image information of the identifier to be identified, first position information of the identifier to be identified in a first coordinate system, where the first coordinate system is a coordinate system constructed based on the visual scanning device.
And the second obtaining module 803 is configured to obtain second position information of the identifier to be identified in a second coordinate system, where the second coordinate system is a coordinate system constructed based on the shelf.
The second calculating module 804 is configured to calculate a conversion relationship between the first coordinate system and the second coordinate system based on the first position information and the second position information.
The determining module 805 is configured to obtain third position information of at least one container to be handled on the rack in the second coordinate system, determine fourth position information of the container to be handled relative to the container fetching device based on the third position information and the conversion relationship, send the fourth position information to the control device, and trigger the control device to control the mechanical arm to fetch the container to be handled based on the fourth position information.
In some embodiments, the indicia to be identified includes four corners of the shelf front area, or four corners of the shelf top area.
In some embodiments, the identification to be identified includes the intersection location of the shelf front area's intersection, or the intersection location of the shelf top area's intersection.
In some embodiments, the identification to be identified includes the intersection location of the top corner of the shelf front area and the grid of the shelf front area, or the identification to be identified includes the intersection location of the top corner of the shelf top area and the grid of the shelf top area.
In some embodiments, the number of the marks to be identified is greater than or equal to four, and the positions of the marks to be identified are not on a straight line.
In some embodiments, the number of visual identification codes is greater than four, each visual identification code is respectively arranged at four corners of the front area and at least one preset target position of the top area of the shelf, or each visual identification code is respectively arranged at four corners of the top area of the shelf and at least one preset target position of the front area, wherein the preset target positions comprise a corner position and a center position.
In some embodiments, the number of visual identification codes is four, each visual identification code being disposed at four top corners of the shelf front or top area, respectively.
In some embodiments, the number of visual identification codes is three, each visual identification code is respectively arranged at any three top corners of the front area or the top area of the goods shelf, or the number of visual identification codes is two, each visual identification code is respectively arranged at two top corners of the front area or the top area of the goods shelf, which are positioned at the diagonal, or the number of visual identification codes is one, and the visual identification code is arranged at the central position of the front area or the top area of the goods shelf.
The second calculating module 804 is specifically configured to calculate the first position information and the second position information by using a preset algorithm to generate a rotation parameter and a translation parameter, and determine a conversion relationship between the first coordinate system and the second coordinate system based on the rotation parameter and the translation parameter.
The determining module 805 is specifically configured to determine intermediate position information of the container to be handled relative to the vision scanning device based on the third position information and the conversion relationship, and determine fourth position information of the container to be handled relative to the box taking device based on the intermediate position information and a preset position relationship between the vision scanning device and the box taking device.
The second obtaining module 803 is specifically configured to construct a second coordinate system with a preset target point on the shelf as an origin, and calculate second position information of the visual identification code under the second coordinate system based on preset size information of a grid for placing a container to be handled on the shelf.
In a specific implementation, the embodiment of the application further provides an electronic device, which may be a server in the foregoing embodiment, for implementing all or part of the steps of the foregoing container positioning method.
Fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application. Comprising at least one processor, a memory and at least one interface, and may further comprise a communication bus for connecting these components.
Wherein the at least one processor may be a CPU or processing chip configured to read and execute the computer program instructions stored in the memory to enable the at least one processor to perform the method flows of the various embodiments described above.
The memory may be non-transitory memory (non-transitory memory), which may contain volatile memory, such as high-speed random access memory (Random Access Memory, RAM), or may include non-volatile memory, such as at least one disk memory.
At least one interface includes an input-output interface, and a communication interface, which may be a wired or wireless interface, to enable a communication connection between the electronic device and other devices. The input-output interface may be used to connect peripheral devices such as a display screen, a keyboard, etc.
In an embodiment of the present application, there is provided a computer device including a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
After the transfer robot transfers the goods shelf to the workstation, the image information of the to-be-identified mark on the goods shelf, which is acquired by the visual scanning equipment, is acquired, wherein the to-be-identified mark comprises at least one of a visual identification code arranged on the goods shelf, the vertex angle of the goods shelf and the crossing position of the grid openings in the goods shelf, and the number of the visual identification codes arranged on the goods shelf is smaller than the number of the grid openings in the goods shelf.
And calculating first position information of the identification to be identified under a first coordinate system based on the image information of the identification to be identified, wherein the first coordinate system is a coordinate system constructed based on the visual scanning equipment.
And obtaining second position information of the identification to be identified under a second coordinate system, wherein the second coordinate system is a coordinate system constructed based on the goods shelf.
Based on the first position information and the second position information, a conversion relationship between the first coordinate system and the second coordinate system is calculated.
Acquiring third position information of at least one container to be carried on the goods shelf under a second coordinate system, determining fourth position information of the container to be carried relative to the container taking device based on the third position information and the conversion relation, sending the fourth position information to the control device, and triggering the control device to control the mechanical arm to take the container to be carried based on the fourth position information.
In some embodiments, the indicia to be identified includes four corners of the shelf front area, or four corners of the shelf top area.
In some embodiments, the identification to be identified includes the intersection location of the shelf front area grid, or the intersection location of the shelf top area grid.
In some embodiments, the identification to be identified includes the intersection location of the top corner of the shelf front area and the shelf front area grid, or the identification to be identified includes the intersection location of the top corner of the shelf top area and the shelf top area grid.
In some embodiments, the number of the marks to be identified is greater than or equal to four, and the positions of the marks to be identified are not on a straight line.
In the embodiment of the application, the number of the visual identification codes can be more than four, each visual identification code is respectively arranged at four vertex angles of the front area of the goods shelf and at least one preset target position of the top area, or each visual identification code is respectively arranged at four vertex angles of the top area of the goods shelf and at least one preset target position of the front area, wherein the preset target positions comprise vertex angle positions and center positions.
In the embodiment of the application, the number of the visual identification codes can be four, and each visual identification code is respectively arranged at four vertex angles of the front area or the top area of the goods shelf.
In the embodiment of the application, the number of the visual identification codes can be three, each visual identification code is respectively arranged at any three vertex angles of the front area or the top area of the goods shelf, or the number of the visual identification codes can be two, each visual identification code is respectively arranged at two vertex angles of the front area or the top area of the goods shelf, which are positioned at the diagonal line, or the number of the visual identification codes is one, and the visual identification code is arranged at the central position of the front area or the top area of the goods shelf.
In the embodiment of the application, the processor also realizes the following steps when executing the computer program, namely, adopting a preset algorithm to calculate the first position information and the second position information to generate a rotation parameter and a translation parameter, and determining the conversion relation between the first coordinate system and the second coordinate system based on the rotation parameter and the translation parameter.
In the embodiment of the application, the processor further realizes the following steps when executing the computer program, wherein the intermediate position information of the container to be carried relative to the vision scanning equipment is determined based on the third position information and the conversion relation, and the fourth position information of the container to be carried relative to the box taking device is determined based on the intermediate position information and the preset position relation between the vision scanning equipment and the box taking device.
In the embodiment of the application, the processor also realizes the steps of constructing a second coordinate system by taking a preset target point on the goods shelf as an origin, and calculating second position information of the identification to be identified under the second coordinate system based on preset size information of a grid for placing the container to be carried on the goods shelf.
The implementation principle and technical effects of the computer device provided by the embodiment of the present application are similar to those of the above method embodiment, and are not described herein.
In some implementations, a memory stores computer readable program instructions that when read and executed by a processor implement a container positioning method as in the previous embodiments.
In addition, the embodiment of the application also provides a computer program product for storing computer readable program instructions, which can realize the container positioning method in the previous embodiment when the instructions are executed by a processor.
It is noted that in the present application, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments in part.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions.
For the purposes of this description, a "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
More specific examples (a non-exhaustive list) of the computer-readable medium would include an electrical connection (an electronic device) having one or more wires, a portable computer diskette (a magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM).
Additionally, the computer-readable medium may even be paper or other suitable medium upon which the program is printed, as the program may be electronically captured, via, for instance, optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner, if necessary, and then stored in a computer memory. It is to be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof.
In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of techniques known in the art, discrete logic circuits with logic gates for implementing logic functions on data signals, application specific integrated circuits with appropriate combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
The above embodiments of the present invention do not limit the scope of the present invention.