Alignment method, device, storage medium and electronic terminal for loading and unloading equipment
By integrating the camera and six-axis robotic arm on the loading and unloading equipment and combining the target detection algorithm, high-precision alignment of the energy storage equipment is achieved, solving the problem of insufficient automation and intelligence of the loading and unloading process in the existing technology, and improving the loading and unloading efficiency and Security.
Patent Information
- Application Number
- CN202411112144.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-08-14
AI Technical Summary
In the container loading and unloading of large energy storage equipment, the degree of automation and intelligence is insufficient, especially in the alignment of energy storage equipment, which makes it difficult to achieve high-precision control, resulting in equipment damage and safety hazards.
Using the loading and unloading equipment of the camera and the six-axis robotic arm, the coordinate system between the camera and the six-axis robotic arm is constructed, and the object detection algorithm is used to calculate the offset between the loading and unloading equipment and the container in real time to achieve high-precision alignment.
High-precision alignment of energy storage equipment is achieved, reducing the risk of equipment damage, improving the intelligence and safety of the loading and unloading process, reducing manual intervention, and improving work efficiency.
Smart Images

Figure CN118864599B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of energy storage device loading and unloading alignment, and in particular to an alignment method, device, storage medium and electronic terminal for loading and unloading equipment. Background Art
[0002] With the acceleration of global energy transformation and the widespread application of renewable energy, large energy storage equipment such as battery packs and energy storage tanks are being transported in containers. How to efficiently and safely load or unload these heavy energy storage equipment into or out of containers is a technical problem that needs to be solved urgently.
[0003] The container loading and unloading process of traditional large-scale energy storage equipment is highly dependent on manual operation, which is not only time-consuming and labor-intensive, but also prone to equipment damage or personal injury due to improper operation. In addition, the internal space of the container is limited, requiring the loading and unloading equipment to achieve high-precision alignment to ensure that the equipment can be placed smoothly and without damage. However, the existing loading and unloading equipment has deficiencies in automation and intelligence, especially in the alignment of energy storage equipment, which often relies on the experience and feel of the operator and is difficult to achieve precise control. Therefore, how to solve the deficiencies and shortcomings of existing technologies through effective alignment methods has become an important issue that researchers in this field need to solve urgently. Summary of the invention
[0004] The purpose of the present invention is to address the above-mentioned problems and to provide an alignment method, device, storage medium and electronic terminal for loading and unloading equipment.
[0005] The technical solution of the present invention is: an alignment method for loading and unloading equipment, wherein the loading and unloading equipment is provided with a camera and a six-axis robotic arm, the camera is used to collect images to be detected, and the six-axis robotic arm is used to load and unload energy storage equipment, and the alignment method comprises the following steps: constructing a coordinate system (X, Y, Z) where the six-axis robotic arm is located and a coordinate system (X′, Y′, Z′) of the camera; obtaining angle data and initial offset (x1, y1, z1) of the six-axis robotic arm in the coordinate system (X, Y, Z) when the plane to be detected is parallel to the camera plane; obtaining the angle data and initial offset (x1, y1, z1) of the six-axis robotic arm in the coordinate system (X, Y, Z) by a target detection algorithm; obtaining the ... Assume that the image has a first offset (Δx′, Δy′, 0) in the coordinate system (X′, Y′, Z′); the angle data includes a flip angle α, a pitch angle β and a yaw angle γ; based on the angle data of the six-axis robot arm, calculate a first transformation matrix T and a second transformation matrix T′ between the coordinate system (X, Y, Z) and the coordinate system (X′, Y′, Z′); based on the transformation matrices T and T′, the initial offset (x1, y1, z1) and the first offset (Δx′, Δy′, 0), obtain a second offset (x3, y3, z3), and control the loading and unloading equipment to align based on the second offset.
[0006] As an improvement of an embodiment of the present invention, the "obtaining the angle data of the six-axis robotic arm in the coordinate system (X, Y, Z) when the plane to be detected is parallel to the camera plane" specifically includes: when the plane to be detected is parallel to the camera plane, rotating the Z axis so that the angle formed by rotating the X axis in a clockwise direction to the X′ axis is the yaw angle γ, rotating the Y axis so that the angle formed by rotating the Z axis in a clockwise direction to the Z′ axis is the pitch angle β, and rotating the X axis so that the angle formed by rotating the Y axis in a clockwise direction to the Y′ axis is the flip angle α.
[0007] As an improvement of an embodiment of the present invention, the "obtaining a first offset (Δx′, Δy′, 0) between the image to be detected and the preset image in the coordinate system (X′, Y′, Z′) through a target detection algorithm" specifically includes: obtaining a preset image and an image to be detected, and using a trained yolov5 target detection model to detect the image to be detected and the preset image respectively, to obtain a first detection result of the preset image and a second detection result of the image to be detected, and based on the first detection result and the second detection result, obtaining a first offset (Δx′, Δy′, 0) between the image to be detected and the preset image in the coordinate system (X′, Y′, Z′).
[0008] As an improvement of the embodiment of the present invention, the first transformation matrix T is a transformation matrix for transforming the coordinate system (X′, Y′, Z′) to the coordinate system (X, Y, Z), T=T X *T Y *T Z ,in,
[0009] As an improvement of the embodiment of the present invention, the second transformation matrix T is a transformation matrix for transforming the coordinate system (X, Y, Z) to the coordinate system (X′, Y′, Z′), T′=T X ′*T Y ′*T Z ',in,
[0010] As an improvement of an embodiment of the present invention, the “obtaining the second offset (x3, y3, z3) based on the transformation matrix T and T′, the initial offset (x1, y1, z1) and the first offset (Δx′, Δy′, 0)” specifically includes: transforming the initial offset (x1, y1, z1) to the camera coordinate system to obtain (x′1, y′1, z′1); using (x′1, y′1, z′1) and the first offset (Δx′, Δy′, 0) to obtain (x′2, y′2, z′2); transforming (x′2, y′2, z′2) to the six-axis coordinate system to obtain (x2, y2, z2); wherein, x3=x1-x2, y3=y1-y2, z3=z1-z2; x′2=x′1+Δx′, y′2=y′1+Δy′, z′2=z′1.
[0011] As an improvement of the embodiment of the present invention, (x′1, y′1, z′1)=T′*(x′1, y′1, z′1), (x2, y2, z2)=T*
[0012] (x′2,y′2,z′2).
[0013] To achieve one of the above-mentioned purposes of the invention, an embodiment of the present invention provides an alignment device for loading and unloading equipment, wherein the loading and unloading equipment is provided with a camera and a six-axis robotic arm, wherein the camera is used to collect images to be detected, and the six-axis robotic arm is used to load and unload energy storage equipment, and the alignment device includes the following modules:
[0014] A coordinate system construction module, used to construct the coordinate system (X, Y, Z) of the six-axis robot and the coordinate system (X′, Y′, Z′) of the camera;
[0015] An information acquisition module is used to obtain the angle data and initial offset (x1, y1, z1) of the six-axis robot in the coordinate system (X, Y, Z) when the plane to be detected is parallel to the camera plane; obtain the first offset (Δx′, Δy′, 0) between the image to be detected and the preset image in the coordinate system (X′, Y′, Z′) through a target detection algorithm; the angle data includes a flip angle α, a pitch angle β and a yaw angle γ;
[0016] A processing module, used for calculating a first conversion matrix T and a second conversion matrix T′ between a coordinate system (X, Y, Z) and a coordinate system (X′, Y′, Z′) based on the angle data of the six-axis robot;
[0017] An alignment module is used to obtain a second offset of the first offset in a coordinate system (X, Y, Z) based on the transformation matrices T and T′, the initial offset (x1, y1, z1) and the first offset (Δx′, Δy′, 0), and control the loading and unloading equipment to align based on the second offset.
[0018] To achieve one of the above objects of the invention, an embodiment of the present invention provides a storage medium storing program instructions, wherein the program instructions implement the alignment method as described in any one of the above items when executed.
[0019] To achieve one of the above objects of the invention, an embodiment of the present invention provides an electronic terminal, including a processor and a memory, wherein the memory stores program instructions, and the processor executes the program instructions to implement the alignment method as described in any one of the above items.
[0020] The method, device, storage medium and electronic terminal for aligning loading and unloading equipment provided by the embodiments of the present invention have the following advantages:
[0021] The present invention constructs a coordinate system of a camera and a six-axis robotic arm, provides a coordinate conversion method between the coordinate systems, and applies a target detection algorithm. It can calculate the offset between the loading and unloading equipment and the container in real time, achieve high-precision alignment, reduce the risk of equipment damage, make the loading and unloading process more intelligent, reduce manual intervention, and improve work efficiency and safety. The present invention is not limited by external factors such as the on-site environment and light, and can operate stably under various complex conditions to ensure the smooth progress of loading and unloading operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 is a schematic flow chart of an alignment method for loading and unloading equipment according to the present invention;
[0023] Figure 2 It is a schematic diagram of the relationship between the coordinate system and the angle of the present invention;
[0024] Figure 3 It is a schematic diagram of the relationship between the flip angle α and the two-dimensional plane of the coordinate system of the present invention;
[0025] Figure 4 is a schematic diagram of the relationship between the pitch angle β and the two-dimensional plane of the coordinate system according to the present invention;
[0026] Figure 5 It is a schematic diagram of the relationship between the yaw angle γ and the two-dimensional plane of the coordinate system described in the present invention. DETAILED DESCRIPTION
[0027] The present invention will be described in detail below in conjunction with the specific embodiments shown in the accompanying drawings. However, these embodiments do not limit the present invention, and any structural, methodological, or functional changes made by a person skilled in the art based on these embodiments are all within the scope of protection of the present invention.
[0028] If the present invention involves directions (for example, up, down, left, right, front, back, outside, inside, etc.) when describing, it is necessary to define the directions involved.
[0029] The scope of the embodiments herein includes the entire scope of the claims, and all available equivalents of the claims.Herein, the terms "first", "second", etc. are only used to distinguish one element from another, without requiring or implying any actual relationship or order between these elements.In fact, the first element can also be called the second element, and vice versa.Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the structure, device or equipment including a series of elements not only include those elements, but also include other elements not clearly listed, or also include elements inherent to such structure, device or equipment.In the absence of more restrictions, the elements limited by the statement "include one..." do not exclude the existence of other identical elements in the structure, device or equipment including the elements.Each embodiment herein is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same similar parts between each embodiment can be referred to each other.
[0030] The terms "longitudinal", "lateral", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc. in this document indicate the orientation or position relationship based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing this document and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In the description of this document, unless otherwise specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a mechanical connection or an electrical connection, it can also be the internal communication of two elements, it can be a direct connection, or it can be indirectly connected through an intermediate medium. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.
[0031] Embodiment 1 of the present invention provides an alignment method for loading and unloading equipment, wherein the loading and unloading equipment is provided with a camera and a six-axis robotic arm, wherein the camera is used to collect images to be detected, and the six-axis robotic arm is used to load and unload energy storage equipment.
[0032] Here, the loading and unloading equipment is provided with two cameras on the same horizontal line for photographing the left target and the right target. Optionally, the HiSilicon industrial camera and the Hikvision light source controller can be combined to realize the acquisition of the image to be detected. The pixel of the HiSilicon industrial camera is 25 million, and the image size taken is 5120*5120. The Hikvision light source controller can fill in the light of the photographed object according to different light conditions. It can be understood that the combination of the two can make the image to be detected clearer. The six-axis robotic arm has six degrees of freedom, which are driven by six motors respectively, so that the robotic arm can move in three-dimensional space.
[0033] like Figure 1 As shown, the alignment method comprises the following steps:
[0034] Step 101: constructing the coordinate system (X, Y, Z) of the six-axis robot and the coordinate system (X′, Y′, Z′) of the camera;
[0035] In practice, we first need to determine the reference point and the direction of the coordinate system. We can choose the base of the robot or a fixed joint as the origin of the base coordinate system. According to the design and motion characteristics of the robot, determine the directions of the X-axis, Y-axis, and Z-axis. Optionally, the X-axis and Y-axis can point to the front and right of the workspace, respectively, and the Z-axis points upward, forming a three-dimensional coordinate system (X, Y, Z); the coordinate system of the camera (X′, Y′, Z′) takes the optical center of the camera as the origin, the optical axis as the Z′ axis, and the X′ and Y′ axes represent the horizontal and vertical directions of the image, respectively.
[0036] Step 102: Obtain the angle data and initial offset (x1, y1, z1) of the six-axis robot in the coordinate system (X, Y, Z) when the plane to be detected is parallel to the camera plane; obtain the first offset (Δx′, Δy′, 0) between the image to be detected and the preset image in the coordinate system (X′, Y′, Z′) through the target detection algorithm; the angle data includes the flip angle α, the pitch angle β and the yaw angle γ;
[0037] In practice, when the plane to be detected is parallel to the camera plane, the angle data of the robot arm in the coordinate system (X, Y, Z) and the initial offset (x1, y1, z1) between the robot arm and the plane to be detected can be obtained through the robot arm's built-in sensor or external measuring equipment such as a laser rangefinder. Afterwards, the image to be detected captured by the camera is processed using a trained target detection algorithm, such as YOLO, SSD and other models. In this way, the key features or preset markers in the image to be detected are identified, and the first offset (Δx′, Δy′, 0) between the image to be detected and the preset image in the coordinate system (X′, Y′, Z′) is calculated.
[0038] Step 103: Calculate a first conversion matrix T and a second conversion matrix T′ between a coordinate system (X, Y, Z) and a coordinate system (X′, Y′, Z′) based on the angle data of the six-axis robot arm;
[0039] Here, the first transformation matrix T can be a transformation matrix for transforming the coordinate system (X′, Y′, Z′) to the coordinate system (X, Y, Z), and the second transformation matrix T can be a transformation matrix for transforming the coordinate system (X, Y, Z) to the coordinate system (X′, Y′, Z′); in practice, the first transformation matrix T and the second transformation matrix T′ can be calculated by the following method. It can be understood that the method for calculating the first transformation matrix T and the second transformation matrix T′ provided in this embodiment and the related drawings are only an example. In actual applications, the calculation order of the transformation matrices can be adjusted according to the specific axis system definition, and is not limited to this specific transformation order and axis system definition.
[0040] When calculating the first transformation matrix T, rotate the X axis so that the Y axis rotates clockwise to the Y' axis and the Z axis rotates clockwise to the Z' axis. The angle formed is the flip angle α, which is given by Figure 3 It can be seen that The rotation matrix that rotates the point (x', y', z') in the coordinate system (X', Y', Z') to the point (x, y, z) in the coordinate system (X, Y, Z) Rotate the Y axis so that the X axis rotates clockwise to the X' axis and the Z axis rotates clockwise to the Z' axis. The angle formed is the pitch angle β, which is Figure 4 It can be seen that The rotation matrix that rotates the point (x', y', z') in the coordinate system (X', Y', Z') to the point (x, y, z) in the coordinate system (X, Y, Z) Rotate the Z axis so that the X axis rotates clockwise to the X' axis and the Y axis rotates clockwise to the Y' axis. The angle formed is the yaw angle γ, which is Figure 5 It can be seen that The rotation matrix that rotates the point (x', y', z') in the coordinate system (X', Y', Z') to the point (x, y, z) in the coordinate system (X, Y, Z) First transformation matrix
[0041] When calculating the second transformation matrix T', rotate the X' axis so that the Y' axis rotates counterclockwise to the Y axis, and the Z' axis rotates counterclockwise to the Z axis. The angle formed is -α, and the rotation matrix of the point (x, y, z) in the coordinate system (X, Y, Z) to the point (x', y', z') in the coordinate system (X', Y', Z') is obtained.
[0042]
[0043] Rotate the Y' axis so that the X' axis rotates counterclockwise to the X axis and the Z' axis rotates counterclockwise to the Z axis. The angle formed is -β. The rotation matrix of the point (x, y, z) in the coordinate system (X, Y, Z) to the point (x', y', z') in the coordinate system (X', Y', Z') is obtained.
[0044] Rotate the Z' axis so that the X' axis rotates counterclockwise to the X axis and the Y' axis rotates counterclockwise to the Y axis. The angle formed is -γ. The rotation matrix of the point (x, y, z) in the coordinate system (X, Y, Z) rotates to the point (x', y', z') in the coordinate system (X', Y', Z') is obtained.
[0045] Second transformation matrix
[0046] Step 104: Obtain a second offset (x3, y3, z3) based on the transformation matrices T and T′, the initial offset (x1, y1, z1) and the first offset (Δx′, Δy′, 0), and control the loading and unloading equipment to align based on the second offset.
[0047] In practice, first transform the initial offset (x1, y1, z1) to the camera coordinate system to obtain (x′1, y′1, z′1); use (x′1, y′1, z′1) and the first offset (Δx′, Δy′, 0) to obtain (x′2, y′2, z′2); transform (x′2, y′2, z′2) to the six-axis coordinate system to obtain (x2, y2, z2); among which, x3=x1-x2, y3=y1-y2, z3=z1-z2; x′2=x′1+Δx′, y′2=y′1+Δy′, z′2=z′1, (x′1, y′1, z′1)=T′*(x′1, y′1, z′1), (x2, y2, z2)=T*(x′2, y′2, z′2).
[0048] In this embodiment, the "obtaining the angle data of the six-axis robot arm in the coordinate system (X, Y, Z) when the plane to be detected is parallel to the camera plane" specifically includes: when the plane to be detected is parallel to the camera plane, rotating the Z axis so that the angle formed by rotating the X axis in a clockwise direction to the X' axis is the yaw angle γ, rotating the Y axis so that the angle formed by rotating the Z axis in a clockwise direction to the Z' axis is the pitch angle β, and rotating the X axis so that the angle formed by rotating the Y axis in a clockwise direction to the Y' axis is the flip angle α.
[0049] In practice, when the plane to be detected is parallel to the camera plane, the yaw angle γ formed by rotating the Z axis and the pitch angle β formed by rotating the Y axis can be directly read by an encoder or a control system of a six-axis robot, and the flip angle α formed by rotating the X axis can be obtained by: when the plane to be detected is parallel to the camera plane, the two cameras on the loading and unloading equipment are used to simultaneously capture the first image to be detected of the left target and the second image to be detected of the right target, and the center point coordinates (x left ,y left ), the center point coordinates of the second image to be detected (x right ,y right ), the center coordinates of the preset image of the left target object (x temp_left ,y temp_left ) and the center coordinates of the right target preset image (x temp_right ,y temp_right ), the preset image is used to describe the image of the loading and unloading equipment when picking up and placing the target object. The distance u between the camera and the energy storage device is obtained by the laser ranging device, and the relationship between the pixel ratio and the distance u is obtained based on the polynomial fitting method. 2 u+bu+c, and use the above relationship to calculate the pixel ratio P of the image to be detected temp The pixel ratio P of the preset image test After that, calculate the pixel ratio P of the image to be detected temp The pixel ratio P of the preset image test The pixel ratio P ratio =P test / P temp Next, calculate the center coordinates (x temp_left ,y temp_left ) and the center point coordinates (x left ,y keft ), x_off left =x left -x temp_left / P ratio , y_off left =y left -y temp_left / P ratio ; Calculate the center coordinates of the preset image of the right target object (x temp_right ,y temp_right ) and the center point coordinates (x right ,y right ), x_off right =x right -x temp_right / P ratio -x_offleft , y_off right =y right -y temp_right / P ratio -y_off left . Calculate the offset distance between the horizontal and vertical coordinates of the right target object Flip Angle If the offset of the right target's ordinate is y_off right ≥0, then the flip angle If the offset of the right target's ordinate is y_off right <0, then the flip angle
[0050] In this embodiment, the "obtaining a first offset (Δx′, Δy′, 0) between the image to be detected and the preset image in the coordinate system (X′, Y′, Z′) through a target detection algorithm" specifically includes: obtaining a preset image and an image to be detected, and using a trained yolov5 target detection model to detect the image to be detected and the preset image respectively, to obtain a first detection result of the preset image and a second detection result of the image to be detected, and obtaining a first offset (Δx′, Δy′, 0) between the image to be detected and the preset image in the coordinate system (X′, Y′, Z′) based on the first detection result and the second detection result.
[0051] Here, preferably, the present invention uses a trained yolov5 target detection model to detect the image to be detected and the preset image, and the yolov5 model can accurately identify the target in the image while maintaining a high speed. Due to the adoption of a single-stage detection architecture, yolov5 can achieve a fast detection speed to meet the needs of real-time applications. First, the pre-processed image to be detected and the preset image are input into the trained yolov5 model for forward propagation to obtain the detection results. The model outputs the bounding box coordinates, confidence scores, and predicted category labels of each detected target. Then, the detection results output by the model are post-processed, including steps such as non-maximum suppression (NMS) to remove overlapping bounding boxes and retain the most accurate detection results. The post-processed detection results are analyzed, and the first offset (Δx′, Δy′, 0) of the image to be detected and the preset image in the coordinate system (X′, Y′, Z′) is obtained based on the first detection result and the second detection result.
[0052] In this embodiment, the first transformation matrix T is a transformation matrix for transforming the coordinate system (X′, Y′, Z′) to the coordinate system (X, Y, Z), T=T X *T Y *T Z ,in,
[0053] In this embodiment, the second transformation matrix T is a transformation matrix for transforming the coordinate system (X, Y, Z) to the coordinate system (X′, Y′, Z′), T′=T X ′*T Y ′*T Z ',in,
[0054] In this embodiment, the “obtaining the second offset (x3, y3, z3) based on the transformation matrix T and T′, the initial offset (x1, y1, z1) and the first offset (Δx′, Δy′, 0)” specifically includes: transforming the initial offset (x1, y1, z1) to the camera coordinate system to obtain (x′1, y′1, z′1); using (x′1, y′1, z′1) and the first offset (Δx′, Δy′, 0) to obtain (xv2, y′2, z′2); transforming (x′2, y′2, z′2) to the six-axis coordinate system to obtain (x2, y2, z2); wherein, x3=x1-x2, y3=y1-y2, z3=z1-z2; x′2=x′1+Δx′, y′2=y′1+Δy′, z′2=z′1.
[0055] In this embodiment, (x′1, y′1, z′1)=T′*(x′1, y′1, z′1), (x2, y2, z2)=T*(x′2, y′2, z′2).
[0056] Embodiment 2 of the present invention provides an alignment device for loading and unloading equipment, wherein the loading and unloading equipment is provided with a camera and a six-axis robotic arm, wherein the camera is used to collect images to be detected, and the six-axis robotic arm is used to load and unload energy storage equipment, and the alignment device includes the following modules:
[0057] A coordinate system construction module, used to construct the coordinate system (X, Y, Z) of the six-axis robot and the coordinate system (X′, Y′, Z′) of the camera;
[0058] An information acquisition module is used to obtain the angle data and initial offset (x1, y1, z1) of the six-axis robot in the coordinate system (X, Y, Z) when the plane to be detected is parallel to the camera plane; obtain the first offset (Δx′, Δy′, 0) between the image to be detected and the preset image in the coordinate system (X′, Y′, Z′) through a target detection algorithm; the angle data includes a flip angle α, a pitch angle β and a yaw angle γ;
[0059] A processing module, used for calculating a first conversion matrix T and a second conversion matrix T′ between a coordinate system (X, Y, Z) and a coordinate system (X′, Y′, Z′) based on the angle data of the six-axis robot;
[0060] An alignment module is used to obtain a second offset of the first offset in a coordinate system (X, Y, Z) based on the transformation matrices T and T′, the initial offset (x1, y1, z1) and the first offset (Δx′, Δy′, 0), and control the loading and unloading equipment to align based on the second offset.
[0061] Embodiment 3 of the present invention provides a storage medium storing program instructions, wherein the program instructions, when executed, implement the alignment method as described in any one of the above items.
[0062] A fourth embodiment of the present invention provides an electronic terminal, including a processor and a memory, wherein the memory stores program instructions, and the processor executes the program instructions to implement any of the alignment methods described above.
[0063] The present invention may be a system, a method and / or a computer program product. The computer program product may include a readable storage medium carrying computer readable program instructions for causing a processor to implement various aspects of the present invention.
[0064] Storage medium can be a tangible device that keeps and stores the instructions used by the instruction execution device. Storage medium can include, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a protruding structure in a groove on which instructions are stored, and any suitable combination thereof.
[0065] It should be understood that although this specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each implementation mode may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.
[0066] The series of detailed descriptions listed above are only specific descriptions of feasible implementation methods of the present invention. They are not intended to limit the scope of protection of the present invention. Any equivalent implementation methods or changes that do not deviate from the technical spirit of the present invention should be included in the scope of protection of the present invention.
Claims
1. An alignment method for loading and unloading equipment, wherein the loading and unloading equipment is provided with a camera and a six-axis mechanical arm, wherein the camera is used to collect images to be detected, and the six-axis mechanical arm is used to load and unload energy storage equipment, characterized in that: The following steps are involved: Construct the coordinate system (X, Y, Z) of the six-axis robot and the coordinate system (X ′ ,Y ′ ,Z ′ ); Obtain the angle data and initial offset (x1, y1, z1) of the six-axis robot in the coordinate system (X, Y, Z) when the plane to be detected is parallel to the camera plane; obtain the angle data and initial offset (x1, y1, z1) of the six-axis robot in the coordinate system (X, Y, Z) of the image to be detected and the preset image through the target detection algorithm. ′ ,Y ′ ,Z ′ ) under the first offset (Δx ′ ,Δy ′ ,0); the angle data includes a flip angle α, a pitch angle β and a yaw angle γ; The coordinate system (X, Y, Z) and the coordinate system (X ′ ,Y ′ ,Z ′ ) between the first transformation matrix T and the second transformation matrix T ′ ; Based on the transformation matrices T and T ′ , initial offset (x1, y1, z1) and first offset (Δx ′ ,Δy ′ ,0) to get the second offset (x3,y3,z3): transform the initial offset (x1,y1,z1) to the camera coordinate system to get (x ′ 1,y ′ 1,z ′ 1); using (x ′ 1,y ′ 1,z ′ 1) and the first offset (Δx ′ ,Δy ′ ,0)get(x ′ 2,y ′ 2,z ′ 2); (x ′ 2,y ′ 2,z ′ 2) Transform to the six-axis coordinate system to obtain (x2, y2, z2); where x3 = x1-x2, y3 = y1-y2, z3 = z1-z2; x ′ 2 = x ′ 1+Δx ′ ,y ′ 2=y ′ 1+Δy ′ , z ′ 2=z ′ 1; said (x ′ 1,y ′ 1,z ′ 1) = T ′ *(x ′ 1,y ′ 1,z 1 1), (x2, y2, z2) = T*(x ′ 2,y ′ 2,z ′ 2); Controlling the loading and unloading equipment to align based on the second offset.
2. The alignment method according to claim 1, characterized in that: The step of obtaining the angle data of the six-axis robot arm in the coordinate system (X, Y, Z) when the plane to be detected is parallel to the camera plane specifically includes: when the plane to be detected is parallel to the camera plane, rotating the Z axis so that the X axis rotates clockwise to the X axis. ′ The angle formed by the axis is the yaw angle γ, and rotating the Y axis makes the Z axis rotate clockwise to Z ′ The angle formed by the axes is the pitch angle β. Rotating the X axis causes the Y axis to rotate clockwise to the Y ′ The angle formed by the axes is the flip angle α.
3. The alignment method according to claim 1, characterized in that: The target detection algorithm is used to obtain the coordinate system (X) of the image to be detected and the preset image. ′ ,Y ′ ,Z ′ ) under the first offset (Δx ′ ,Δy ′ ,0) specifically includes: obtaining a preset image and an image to be detected, using a trained yolov5 target detection model to detect the image to be detected and the preset image respectively, obtaining a first detection result of the preset image and a second detection result of the image to be detected, and obtaining the coordinate system (X) of the image to be detected and the preset image based on the first detection result and the second detection result. ′ ,Y ′ ,Z ′ ) under the first offset (Δx ′ ,Δy ′ ,0).
4. The alignment method according to claim 1, characterized in that: The first transformation matrix T is the coordinate system (X ′ ,Y ′ ,Z ′ ) to the coordinate system (X, Y, Z), T = T X *T Y *T z ,in, 5. The alignment method according to claim 1, characterized in that: The second transformation matrix T is the transformation of the coordinate system (X, Y, Z) to the coordinate system (X ′ ,Y ′ ,Z ′ )’s transformation matrix, T ′ =T x ′ *T Y ′ *T z ′ ,in, 6. An alignment device for loading and unloading equipment, wherein the loading and unloading equipment is provided with a camera and a six-axis robotic arm, wherein the camera is used to collect images to be detected, and the six-axis robotic arm is used to load and unload energy storage equipment, characterized in that: The following steps are involved: A coordinate system construction module is used to construct the coordinate system (X, Y, Z) of the six-axis robot and the coordinate system (X ′ ,Y ′ ,Z ′ ); The information acquisition module is used to obtain the angle data and initial offset (x1, y1, z1) of the six-axis robot in the coordinate system (X, Y, Z) when the plane to be detected is parallel to the camera plane; obtain the angle data and initial offset (x1, y1, z1) of the image to be detected and the preset image in the coordinate system (X, Y, Z) through the target detection algorithm; ′ ,Y ′ ,Z ′ ) under the first offset (Δx ′ ,Δy ′ ,0); the angle data includes a flip angle α, a pitch angle β and a yaw angle γ; A processing module is used to calculate the coordinate system (X, Y, Z) and the coordinate system (X ′ ,Y ′ ,Z ′ ) between the first transformation matrix T and the second transformation matrix T ′ ; Alignment module for the transformation matrix T and T ′ , initial offset (x1, y1, z1) and first offset (Δx ′ ,Δy ′ ,0) to get the second offset (x3,y3,z3): transform the initial offset (x1,y1,z1) to the camera coordinate system to get (x ′ 1,y ′ 1,z ′ 1); using (x ′ 1,y ′ 1,z ′ 1) and the first offset (Δx ′ ,Δy ′ ,0)get(x ′ 2,y ′ 2,z 1 2); (x 1 2,y 1 2,z 1 2) Transform to the six-axis coordinate system to obtain (x2, y2, z2); where x3 = x1-x2, y3 = y1-y2, z3 = z1-z2; x ′ 2 = x ′ 1+Δx ′ ,y ′ 2=y ′ 1+Δy ′ , z ′ 2=z ′ 1; said (x ′ 1,y ′ 1,z ′ 1) = T ′ *(x ′ 1,y ′ 1,z ′ 1), (x2, y2, z2) = T*(x ′ 2,y ′ 2,z ′ 2); Controlling the loading and unloading equipment to align based on the second offset.
7. A storage medium storing program instructions, characterized in that: When the program instructions are executed, the alignment method according to any one of claims 1 to 5 is implemented.
8. An electronic terminal, characterized in that: The method comprises a processor and a memory, wherein the memory stores program instructions, and the processor executes the program instructions to implement the alignment method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Article positioning method, grabbing system, storage medium and program product
CN114549655A
Mechanical arm multi-station accurate alignment method with far and near sight distance guiding function
CN114654457A