Method and device for placing steering knuckle, storage medium, and electronic device
Precise grabbing and placement of the robotic arm through data collected by 3D and 2D cameras solves the problem of deflection and extrusion of the steering knuckle in the pallet, improves production efficiency and the service life of the pallet, and achieves consistency in steering knuckle detection and accuracy.
Patent Information
- Application Number
- CN202410553968.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-07
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-05-07
AI Technical Summary
In the production process of automobile parts, during the detection of internal defects of the steering knuckle, due to the poor consistency of the blank steering knuckle, the pallet is easily deflected and squeezed when the robot arm grabs it, causing damage to the pallet and increasing production costs.
By obtaining the 3D point cloud of the steering knuckle collected by the 3D camera and the 2D image of the pallet collected by the 2D camera, the robotic arm can accurately grab and place, and use point cloud and image calibration technology to determine the target placement point to ensure that the steering knuckle is on the pallet. in the correct position to avoid damage to the pallet.
It improves the overall efficiency of the steering knuckle production line, reduces production losses, ensures the consistency of X-ray image collection, and extends the service life of the pallet.
Smart Images

Figure CN118135020B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial control technology, and in particular to a method and device for placing a steering knuckle, a storage medium, and an electronic device. Background Art
[0002] During the production process of automotive parts, parts may have internal defects, and parts need to be inspected for internal defects through X-rays. Among them, the steering knuckles are of various models and complex structures. However, in defect detection, in order to ensure the consistency of X-ray image acquisition, it is necessary to ensure that the same model of steering knuckles have the same posture inside the X-ray machine and cannot produce obvious deflection. For this reason, a corresponding tray structure is generally customized for each model of steering knuckle to place the steering knuckle to prevent the steering knuckle from deflecting in the conveyor belt and X-ray machine. At present, the steering knuckle is generally automatically grasped and placed on the pallet by a robotic arm. However, during defect detection, the steering knuckle is a blank steering knuckle, and the blank steering knuckle has poor self-consistency. When the robotic arm grasps the steering knuckle with the center hole as the grasping position, the center hole itself may have a tolerance of 1-5mm, resulting in the steering knuckle posture after the robotic arm grasps the steering knuckle and the expected difference. When the steering knuckle is placed on the pallet through a fixed unloading point, it is easy to squeeze the pallet support structure, which may cause the pallet to deform and damage in severe cases. The cost of the pallet is high, and frequent damage will lead to increased production costs.
[0003] In the related art, the permissible knuckle tolerance range is enlarged when designing the pallet, that is, the knuckle has a larger movable space in the pallet. However, this easily affects the support and limit effect of the knuckle, increases the deviation range of the knuckle in the pallet, and causes the consistency of X-ray images to deteriorate, which directly affects the effect of defect detection.
[0004] With respect to the above-mentioned problems existing in the related technologies, no efficient and accurate solutions have been found yet. Summary of the invention
[0005] The present invention provides a method and device for placing a steering knuckle, a storage medium, and an electronic device to solve the above-mentioned technical problems existing in the related art.
[0006] According to one embodiment of the present invention, a method for placing a steering knuckle is provided, comprising: obtaining a first 3D point cloud of the steering knuckle acquired by a 3D camera, and obtaining a 2D image of a pallet on which the steering knuckle is to be placed acquired by a 2D camera; controlling a robotic arm to grab the steering knuckle and move it to a positioning point within the field of view of the 3D camera according to the first 3D point cloud, and obtaining a second 3D point cloud of the steering knuckle acquired again by the 3D camera; calibrating a teaching release point of the steering knuckle according to the second 3D point cloud and the 2D image to obtain a target placement point; and controlling the robotic arm to carry the steering knuckle to the target placement point and place the steering knuckle in the pallet.
[0007] Optionally, before obtaining a first 3D point cloud of the steering knuckle captured by a 3D camera and obtaining a 2D image of the pallet on which the steering knuckle is to be placed captured by a 2D camera, the method further includes: taking the coordinate system of the robotic arm as a unified coordinate system, performing hand-eye calibration on the 3D camera, the 2D camera and the robotic arm; obtaining a first teaching point cloud of the steering knuckle at an initial teaching point captured by the 3D camera, and using the first teaching point cloud to establish a first 3D point cloud template of the steering knuckle; controlling the robotic arm to move the steering knuckle to the positioning point, obtaining a second teaching point cloud captured by the 3D camera at the positioning point, and obtaining a teaching image of the pallet captured by the 2D camera; using the second teaching point cloud to establish a second 3D point cloud template of the steering knuckle, and using the teaching image to construct a standard image template of the pallet; controlling the robotic arm to carry the steering knuckle to move above the pallet, and controlling the robotic arm to release the steering knuckle to the pallet, and recording the release point of the robotic arm as the teaching release point.
[0008] Optionally, controlling the robotic arm to grasp the steering knuckle and move it to a positioning point within the field of view of the 3D camera according to the first 3D point cloud includes: obtaining a first 3D point cloud template obtained by the steering knuckle during the teaching stage and an initial teaching point corresponding to the first 3D point cloud template; calculating a first deflection matrix between the first 3D point cloud and the first 3D point cloud template; using the deflection matrix to deflect the initial teaching point to obtain a target grasping point; controlling the robotic arm to move to the target grasping point to grasp the steering knuckle and move it to a positioning point within the field of view of the 3D camera.
[0009] Optionally, the taught release point of the steering knuckle is calibrated according to the second 3D point cloud and the 2D image to obtain a target placement point, including: calculating a second deflection matrix according to the 2D image; calibrating the taught release point of the steering knuckle based on the second deflection matrix to obtain an intermediate placement point; calculating a third deflection matrix of the intermediate placement point according to the second 3D point cloud; and calibrating the intermediate placement point based on the third deflection matrix to obtain a target placement point.
[0010] Optionally, calculating the second deflection matrix according to the 2D image includes: acquiring a standard image template of the tray at the teaching release point; calculating a horizontal offset of the tray according to the 2D image and the standard image template; and determining the horizontal offset as the second deflection matrix.
[0011] Optionally, calculating the third deflection matrix of the intermediate placement point based on the second 3D point cloud includes: obtaining the second 3D point cloud template obtained by the steering knuckle during the teaching stage; calculating the offset matrix from the positioning point to the intermediate placement point; and calculating the third deflection matrix of the intermediate placement point based on the second 3D point cloud, the second 3D point cloud template and the offset matrix.
[0012] Optionally, calculating the third deflection matrix of the intermediate placement point according to the second 3D point cloud, the second 3D point cloud template and the offset matrix includes: calculating the third deflection matrix of the intermediate placement point using the following formula: :
[0013] ;
[0014] in, is the offset matrix, is the third deflection matrix, M1 is the second 3D point cloud template, S2 is the second 3D point cloud, R1 is the middle placement point, Rx is the target placement point, and D0 is the positioning point.
[0015] According to another embodiment of the present invention, a device for placing a steering knuckle is provided, comprising: a first acquisition module, used to acquire a first 3D point cloud of the steering knuckle acquired by a 3D camera, and acquire a 2D image of a pallet on which the steering knuckle is to be placed acquired by a 2D camera; a second acquisition module, used to control a robotic arm to grab the steering knuckle and move it to a positioning point within the field of view of the 3D camera according to the first 3D point cloud, and acquire a second 3D point cloud of the steering knuckle acquired again by the 3D camera; a calibration module, used to calibrate the teaching release point of the steering knuckle according to the second 3D point cloud and the 2D image to obtain a target placement point; and a placement module, used to control the robotic arm to carry the steering knuckle to the target placement point, and place the steering knuckle in the pallet.
[0016] Optionally, the device also includes: a calibration module, used to perform hand-eye calibration on the 3D camera, the 2D camera and the robotic arm with the coordinate system of the robotic arm as a unified coordinate system; a first acquisition module, used to acquire a first teaching point cloud of the steering knuckle at an initial teaching point acquired by the 3D camera, and use the first teaching point cloud to establish a first 3D point cloud template of the steering knuckle; a second acquisition module, used to control the robotic arm to move the steering knuckle to the positioning point, acquire a second teaching point cloud acquired by the 3D camera at the positioning point, and acquire a teaching image of the pallet acquired by the 2D camera; a construction module, used to use the second teaching point cloud to establish a second 3D point cloud template of the steering knuckle, and use the teaching image to construct a standard image template of the pallet; a control module, used to control the robotic arm to carry the steering knuckle to move above the pallet, and control the robotic arm to release the steering knuckle to the pallet, and record the release point of the robotic arm as the teaching release point.
[0017] Optionally, the second acquisition module includes: an acquisition unit, used to acquire a first 3D point cloud template acquired by the steering knuckle during the teaching stage and an initial teaching point corresponding to the first 3D point cloud template; a calculation unit, used to calculate a first deflection matrix between the first 3D point cloud and the first 3D point cloud template; a deflection unit, used to use the deflection matrix to deflect the initial teaching point to obtain a target grasping point; and a grasping unit, used to control the robotic arm to move to the target grasping point to grasp the steering knuckle and move it to a positioning point within the field of view of the 3D camera.
[0018] Optionally, the calibration module includes: a first calculation unit, used to calculate a second deflection matrix according to the 2D image; a first calibration unit, used to calibrate the taught release point of the steering knuckle based on the second deflection matrix to obtain an intermediate placement point; a second calculation unit, used to calculate a third deflection matrix of the intermediate placement point according to the second 3D point cloud; and a second calibration unit, used to calibrate the intermediate placement point based on the third deflection matrix to obtain a target placement point.
[0019] Optionally, the first calculation unit includes: an acquisition subunit, used to acquire a standard image template of the pallet at the taught release point; a calculation subunit, used to calculate a horizontal offset of the pallet based on the 2D image and the standard image template; and a determination subunit, used to determine the horizontal offset as a second deflection matrix.
[0020] Optionally, the second calculation unit includes: an acquisition subunit, used to acquire a second 3D point cloud template acquired by the steering knuckle during the teaching stage; a first calculation subunit, used to calculate the offset matrix from the positioning point to the intermediate placement point; and a second calculation subunit, used to calculate the third deflection matrix of the intermediate placement point based on the second 3D point cloud, the second 3D point cloud template and the offset matrix.
[0021] Optionally, the second calculation subunit is further used to calculate the third deflection matrix of the middle placement point using the following formula: :
[0022] ;
[0023] in, is the offset matrix, is the third deflection matrix, M1 is the second 3D point cloud template, S2 is the second 3D point cloud, R1 is the middle placement point, Rx is the target placement point, and D0 is the positioning point.
[0024] According to yet another embodiment of the present invention, a storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above-mentioned device embodiments when running.
[0025] According to another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above device embodiments.
[0026] Through the embodiment of the present invention, a first 3D point cloud of a steering knuckle acquired by a 3D camera is obtained, and a 2D image of a pallet on which the steering knuckle is to be placed is obtained by a 2D camera; a mechanical arm is controlled to grab the steering knuckle and move it to a positioning point within the field of view of the 3D camera according to the first 3D point cloud, and a second 3D point cloud of the steering knuckle acquired again by the 3D camera is obtained; the teaching release point of the steering knuckle is calibrated according to the second 3D point cloud and the 2D image to obtain a target placement point; the mechanical arm is controlled to carry the steering knuckle to the target placement point, and the steering knuckle is placed in the pallet. By adopting a technical means of obtaining the teaching release point of the steering knuckle in the teaching stage, and then calibrating the teaching release point of the steering knuckle according to the second 3D point cloud and the 2D image to obtain the target placement point, and finally placing the steering knuckle in the pallet, the technical problem of easily damaging the pallet due to errors when the mechanical arm places the steering knuckle in the pallet is solved, thereby improving the overall efficiency of the steering knuckle production line and reducing production losses. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0028] Figure 1 is a hardware structure block diagram of a mechanical arm according to an embodiment of the present invention;
[0029] Figure 2 is a flow chart of a method for placing a steering knuckle according to an embodiment of the present invention;
[0030] Figure 3 is a schematic diagram of a 2D camera field of view according to an embodiment of the present invention;
[0031] Figure 4 is a flow chart of a teaching method for placing a steering knuckle according to an embodiment of the present invention;
[0032] Figure 5 is a schematic diagram of placing a steering knuckle according to an embodiment of the present invention;
[0033] Figure 6 is an overall flow chart of placing a steering knuckle according to an embodiment of the present invention;
[0034] Figure 7 The present invention is a structural block diagram of a device for placing a steering knuckle according to an embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0036] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0037] Example 1
[0038] The method embodiment provided in the first embodiment of the present application can be executed in a server, a computer, a robotic arm or a similar computing device. Taking running on a robotic arm as an example, Figure 1 FIG. 1 is a hardware structure diagram of a mechanical arm according to an embodiment of the present invention. Figure 1 As shown, the robotic arm may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the above-mentioned mechanical arm may also include a transmission device 106 for communication functions and an input and output device 108. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned robot arm. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0039] The memory 104 can be used to store the robot arm program, for example, the software program and module of the application software, such as the robot arm program corresponding to the method for placing the steering knuckle in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the robot arm program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the robot arm via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0040] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by the communication provider of the robot arm. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0041] In this embodiment, a method for placing a steering knuckle is provided. Figure 2 is a flow chart of a method for placing a steering knuckle according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0042] Step S202, obtaining a first 3D point cloud of the steering knuckle acquired by a 3D camera, and obtaining a 2D image of the tray on which the steering knuckle is to be placed acquired by a 2D camera;
[0043] Optionally, the 3D camera is fixed above the conveyor belt, and the steering knuckle is placed on the conveyor belt, and the steering knuckle is a steering knuckle component of a car, and each car requires several steering knuckles; Figure 3 is a schematic diagram of a 2D camera field of view according to an embodiment of the present invention, such as Figure 3 As shown, the 2D camera is also fixed above the conveyor belt, and a pallet is placed on the conveyor belt. The pallet is a unique pallet structure designed and customized for each model of steering knuckle. The pallet has multiple fulcrums, which can effectively support the steering knuckle of the corresponding model and prevent the steering knuckle from deflecting on the conveyor belt and in the x-ray machine.
[0044] Step S204, controlling the mechanical arm to grab the steering knuckle and move it to a positioning point within the field of view of the 3D camera according to the first 3D point cloud, and obtaining a second 3D point cloud of the steering knuckle collected again by the 3D camera;
[0045] Optionally, obtaining a second 3D point cloud of the steering knuckle collected again by the 3D camera can reduce the posture calculation error of the algorithm, the steering knuckle offset caused when the robot arm gripper is opened, and the influence of the steering knuckle tolerance on the final grasping accuracy.
[0046] Step S206, calibrating the teaching release point of the steering knuckle according to the second 3D point cloud and the 2D image to obtain a target placement point;
[0047] Step S208, controlling the robot arm to carry the steering knuckle to move to the target placement point, and placing the steering knuckle into the tray.
[0048] Through the above steps, a first 3D point cloud of the steering knuckle acquired by a 3D camera is obtained, and a 2D image of the pallet on which the steering knuckle is to be placed is obtained by a 2D camera; according to the first 3D point cloud, a mechanical arm is controlled to grab the steering knuckle and move it to a positioning point within the field of view of the 3D camera, and a second 3D point cloud of the steering knuckle acquired again by the 3D camera is obtained; according to the second 3D point cloud and the 2D image, the teaching release point of the steering knuckle is calibrated to obtain a target placement point; the mechanical arm is controlled to carry the steering knuckle to move to the target placement point, and the steering knuckle is placed in the pallet. By adopting the technical means of obtaining the teaching release point of the steering knuckle in the teaching stage, then calibrating the teaching release point of the steering knuckle according to the second 3D point cloud and the 2D image, obtaining the target placement point, and finally placing the steering knuckle in the pallet, the accuracy of the mechanical arm grabbing and placing the steering knuckle is improved, and the problem of the pallet being easily damaged due to errors when the mechanical arm puts the steering knuckle into the pallet is solved, and the collision and impact between the steering knuckle and the pallet are avoided, the overall efficiency of the steering knuckle production line is improved, and the production loss is reduced.
[0049] In this embodiment, before obtaining the first 3D point cloud of the steering knuckle captured by the 3D camera and obtaining the 2D image of the pallet on which the steering knuckle is to be placed captured by the 2D camera, it also includes: taking the coordinate system of the robotic arm as a unified coordinate system, performing hand-eye calibration on the 3D camera, the 2D camera and the robotic arm; obtaining the first teaching point cloud of the steering knuckle at the initial teaching point captured by the 3D camera, and using the first teaching point cloud to establish a first 3D point cloud template of the steering knuckle; controlling the robotic arm to move the steering knuckle to the positioning point, obtaining the second teaching point cloud captured by the 3D camera at the positioning point, and obtaining the teaching image of the pallet captured by the 2D camera; using the second teaching point cloud to establish a second 3D point cloud template of the steering knuckle, and using the teaching image to construct a standard image template of the pallet; controlling the robotic arm to carry the steering knuckle to move above the pallet, and controlling the robotic arm to release the steering knuckle to the pallet, and recording the release point of the robotic arm as the teaching release point.
[0050] Optionally, hand-eye calibration is performed between the default 3D camera, 2D camera and robot arm, the coordinate system is unified to the robot arm coordinate system, and the first 3D point cloud template M0 of the steering knuckle of this model and the grasping 6D point G0 (x, y, z, Rx, Ry, Rz) (initial teaching point) of the teaching robot arm corresponding to the template are established; after the robot arm grasps the steering knuckle at G0, the robot arm tilts to expose the steering knuckle below the 3D camera field of view, and the robot arm posture at this time is recorded as D0 (second teaching point cloud), and the 3D camera collects the steering node cloud again as the second 3D point cloud template M1; the 2D camera collects the 2D image of the current pallet as the standard pallet position image template P0 (standard image template), and the pallet remains motionless during the entire preparation period; after the teaching robot arm grasps the steering knuckle, the robot arm 6D release point R0 (teaching release point) for the current pallet, that is, the robot arm can place the steering knuckle better on the pallet at point R0, and the gap between the steering knuckle and the pallet bracket is moderate and will not be bumped or squeezed.
[0051] Figure 4 is a flow chart of a teaching method for placing a steering knuckle according to an embodiment of the present invention, the flow chart comprising the following steps:
[0052] S41, 3D camera collects scene point cloud including steering knuckle, and 2D camera collects pallet point cloud;
[0053] Optionally, the 3D camera collects the scene point cloud including the steering knuckle. By default, the 3D camera has performed point cloud preprocessing to remove irrelevant point clouds after collecting the point cloud, and only retains the steering knuckle point cloud itself, that is, the collected point cloud is already a pure steering node cloud, without background and noise information.
[0054] S42, creating a steering node cloud template file 1, and saving the pallet image as a standard pallet image template;
[0055] Optionally, the point cloud template file 1 corresponds to the first 3D point cloud template of the present application.
[0056] S43 teaches the robot to record the grasping posture point of the steering knuckle of the robot at the current position;
[0057] Optionally, the robot corresponds to the robotic arm of the present application, and the current position corresponds to the initial teaching point of the present application, and the initial teaching point is the 6D point G0 (x, y, z, Rx, Ry, Rz).
[0058] S44, control the robot to grab the steering knuckle, and then adjust the robot posture so that the steering knuckle can still be photographed by the 3D camera;
[0059] S45, the 3D camera collects the scene point cloud including the steering knuckle again, records the position of the robot arm, and creates a steering node cloud template file 2;
[0060] S46, controlling the robot to carry the steering knuckle and move it into the pallet, using it as a standard point for placing the steering knuckle without collision, and recording the coordinates of the point.
[0061] Optionally, the point coordinates correspond to the release point taught in this application.
[0062] In this embodiment, controlling the robotic arm to grab the steering knuckle and move it to a positioning point within the field of view of the 3D camera according to the first 3D point cloud includes: obtaining a first 3D point cloud template obtained by the steering knuckle during the teaching stage and an initial teaching point corresponding to the first 3D point cloud template; calculating a first deflection matrix between the first 3D point cloud and the first 3D point cloud template; using the deflection matrix to deflect the initial teaching point to obtain a target grabbing point; controlling the robotic arm to move to the target grabbing point to grab the steering knuckle and move it to a positioning point within the field of view of the 3D camera.
[0063] Optionally, by performing point cloud registration between the first 3D point cloud S1 and the first 3D point cloud template M0, a first 4x4 deflection matrix T is obtained, that is, the first 3D point cloud template M0 can basically coincide with the first 3D point cloud S1 after deflection by the first deflection matrix T, and the robot arm is deflected from the initial teaching point G0 by T to obtain the target grasping point G1 of the current steering knuckle, and the robot arm moves to the target grasping point G1 to grasp the steering knuckle (T is only used to guide the grasping of the steering knuckle); after the robot arm moves to the target grasping point to grasp the steering knuckle, it moves to the positioning point within the field of view of the 3D camera.
[0064] In this embodiment, calibrating the teaching release point of the steering knuckle according to the second 3D point cloud and the 2D image to obtain the target placement point includes:
[0065] S11, calculating a second deflection matrix according to the 2D image;
[0066] In this embodiment, calculating the second deflection matrix according to the 2D image includes: acquiring a standard image template of the tray at the teaching release point; calculating a horizontal offset of the tray according to the 2D image and the standard image template; and determining the horizontal offset as a second deflection matrix.
[0067] Optionally, the standard image template is obtained by photographing the tray with a 2D camera during the teaching stage. The 2D camera has been pre-calibrated with internal parameters, and the distance between the bottom of the tray and the 2D camera is basically fixed. The pixel offset can be directly converted into the xy offset of the actual physical distance through the internal parameters, and the xy offset is determined as the horizontal offset of the tray.
[0068] S12, calibrating the teaching release point of the steering knuckle based on the second deflection matrix to obtain an intermediate placement point;
[0069] Apply the xy offset (second deflection matrix) to the placement point R0 (teaching release point) during teaching, and obtain the placement point R1 (middle placement point) at this time. The ideal point cloud of the steering knuckle when released at point R1 under the current grasping can be calculated as follows: , Represents the 4x4 offset matrix from point D0 to point R1. Since the relative relationship between the steering knuckle and the gripper is fixed after the steering knuckle is grasped, the offset matrix of the gripper is consistent with the offset matrix of the steering knuckle.
[0070] S13, calculating a third deflection matrix of the middle placement point according to the second 3D point cloud;
[0071] In this embodiment, calculating the third deflection matrix of the intermediate placement point based on the second 3D point cloud includes: obtaining the second 3D point cloud template obtained by the steering knuckle during the teaching stage; calculating the offset matrix from the positioning point to the intermediate placement point; calculating the third deflection matrix of the intermediate placement point based on the second 3D point cloud, the second 3D point cloud template and the offset matrix.
[0072] Optionally, calculate the offset matrix from the positioning point to the intermediate placement point , where R1 is the middle placement point and D0 is the positioning point.
[0073] In this embodiment, calculating the third deflection matrix of the intermediate placement point according to the second 3D point cloud, the second 3D point cloud template and the offset matrix includes: calculating the third deflection matrix of the intermediate placement point using the following formula: :
[0074] ;
[0075] in, is the offset matrix, is the third deflection matrix, M1 is the second 3D point cloud template, S2 is the second 3D point cloud, R1 is the middle placement point, Rx is the target placement point, and D0 is the positioning point.
[0076] Optionally, since the relative relationship between the steering knuckle and the gripper of the robot arm during this grasping is different from that in the teaching stage, the release point of the robot arm is not the intermediate placement point R1 determined in the middle. Let the current appropriate release point of the robot arm be the target placement point Rx. Then when The point cloud obtained is The obtained point clouds are basically coincident, and it can be considered that the release point calibration of the robot arm is completed. The obtained point cloud is registered to obtain the third deflection matrix T', that is, .
[0077] S14, calibrating the intermediate placement point based on the third deflection matrix to obtain a target placement point.
[0078] Figure 5 is a schematic diagram of placing a steering knuckle according to an embodiment of the present invention, such as Figure 5 As shown, the steering knuckle is placed within the field of view of the 3D camera, the 3D camera collects the first 3D point cloud of the steering knuckle, the robotic arm grabs the steering knuckle and moves it to a positioning point within the field of view of the 3D camera, the 3D camera collects the second 3D point cloud of the steering knuckle again, the robotic arm carries the steering knuckle to the target placement point, and places the steering knuckle into the tray.
[0079] Figure 6 is an overall flow chart of placing a steering knuckle according to an embodiment of the present invention, such as Figure 6 As shown, the process includes the following steps: the 3D camera collects the scene point cloud including the steering knuckle, and the 2D camera collects the pallet point cloud; the point cloud template 1 is loaded to calculate the current steering knuckle posture; the robot is guided to grab the steering knuckle and flip it to the same posture during teaching; the 3D camera collects the scene point cloud including the steering knuckle; the point cloud template 2 is loaded to calculate the steering knuckle posture located on the assistant; the XY deviation between the pallet image and the standard pallet image is calculated; the XY deviation of the pallet is transmitted to the robot, and the robot adds the deviation to the coordinate value of the placement coordinate, so as to place the steering knuckle in the pallet without collision.
[0080] In this embodiment, preparation work (teaching stage): by default, the hand-eye calibration has been done between the 3D camera, the 2D camera and the robot arm, and the coordinate system is unified to the robot arm coordinate system; a three-dimensional point cloud template M0 of the steering knuckle of this model and a 6D point position G0 (x, y, z, Rx, Ry, Rz) of the teaching robot arm corresponding to the template are established; after the robot arm grabs the steering knuckle at G0, the robot arm tilts to expose the steering knuckle below the 3D camera field of view, and the robot arm posture at this time is recorded as D0, and the 3D camera collects the steering node cloud again as the point cloud template M1; the 2D camera collects the 2D image of the current pallet as the standard pallet position image template P0 (during the entire preparation period, the pallet remains stationary); after the teaching robot arm grabs the steering knuckle, the robot arm 6D release point R0 for the current pallet, that is, the robot arm can place the steering knuckle better on the pallet at point R0, and the gap between the steering knuckle and the pallet bracket is moderate and will not collide or squeeze;
[0081] Working stage (production stage): the steering knuckle arrives within the field of view of the 3D camera, and the 3D camera collects point cloud S1; point cloud registration is performed between point cloud S1 (steering knuckle) and template M0 to obtain a 4x4 deflection matrix T, that is, M0 can basically coincide with point cloud S1 after deflection by T; the robot arm point G0 is deflected by T to obtain the grasping point G1 of the current steering knuckle, and the robot arm moves to point G1 to grasp the steering knuckle (T is only used to guide the grasping of the steering knuckle); in order to reduce the posture calculation error of the algorithm, the steering knuckle offset caused by the opening of the gripper, and the influence of the steering knuckle tolerance on the final grasping accuracy, it is necessary to perform secondary positioning on the steering knuckle after grasping, and the robot arm moves to point D0 (different from G0, this point does not need to be offset by T); 3D The camera collects point cloud again to obtain point cloud S2, and performs point cloud registration on point cloud S2 and template M0 to obtain 4x4 offset matrix T2, that is, M0 can basically coincide with point cloud S2 after deflection by T2; at the same time as steps 1-5, the 2D camera above the pallet collects the pallet image, performs template matching with the template image P0, and obtains the XY offset of the pallet relative to the template at this time (the 2D camera has been pre-calibrated with internal parameters, and the distance between the bottom of the pallet and the 2D camera is basically fixed. The pixel offset can be directly converted into the xy offset of the actual physical distance through the internal parameters); the xy offset is applied to the placement point R0 during teaching to obtain the placement point R1 at this time. The ideal point cloud of the steering knuckle under the current grasping when the R1 point is released can be calculated as follows: , Represents the 4x4 offset matrix from D0 to R1 (since the relative relationship between the knuckle and the gripper is fixed after the knuckle is grasped, the offset matrix of the gripper is consistent with the offset matrix of the knuckle); but since the relative relationship between the knuckle and the gripper during this grasping is definitely different from that during the teaching, the release point of the robot arm is definitely not R1. Assuming that the current appropriate robot arm point is Rx, it must satisfy The point cloud obtained is The obtained point cloud basically coincides with point cloud S2. The obtained point cloud is registered to obtain the offset matrix T', that is, ; Apply a change T' to point D0 to obtain point Rx; the robot arm moves to point Rx, at which time the steering knuckle is released to the pallet, and the steering knuckle can be placed better in the pallet without bumping or squeezing the pallet.
[0082] By adopting the solution of this embodiment, the teaching release point of the steering knuckle is obtained in the teaching stage, and then 3D point clouds are collected for the steering knuckle twice to obtain a first 3D point cloud and a second 3D point cloud, and then the teaching release point of the steering knuckle is calibrated according to the second 3D point cloud and the 2D image to obtain the target placement point, and finally the steering knuckle is placed in the pallet. This solves the technical problem of the pallet being easily damaged due to errors when the robotic arm places the steering knuckle into the pallet, thereby improving the overall efficiency of the steering knuckle production line and reducing production losses.
[0083] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0084] Example 2
[0085] In the present embodiment, a device for placing a steering knuckle is also provided, and the device is used to implement the above-mentioned embodiment and preferred implementation mode, and the description has been made no further. As used below, the term "module" can implement a combination of software and hardware of the reservation function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, can also be conceived.
[0086] Figure 7 is a structural block diagram of a device for placing a steering knuckle according to an embodiment of the present invention, such as Figure 7 As shown, the device comprises:
[0087] A first acquisition module 70 is used to acquire a first 3D point cloud of the steering knuckle acquired by a 3D camera, and acquire a 2D image of a tray on which the steering knuckle is to be placed acquired by a 2D camera;
[0088] A second acquisition module 72 is used to control the mechanical arm to grab the steering knuckle and move it to a positioning point within the field of view of the 3D camera according to the first 3D point cloud, and obtain a second 3D point cloud of the steering knuckle collected again by the 3D camera;
[0089] A calibration module 74, configured to calibrate the teaching release point of the steering knuckle according to the second 3D point cloud and the 2D image to obtain a target placement point;
[0090] The placement module 76 is used to control the robot arm to carry the steering knuckle to the target placement point and place the steering knuckle into the tray.
[0091] Optionally, the device also includes: a calibration module, used to perform hand-eye calibration on the 3D camera, the 2D camera and the robotic arm with the coordinate system of the robotic arm as a unified coordinate system; a first acquisition module, used to acquire a first teaching point cloud of the steering knuckle at an initial teaching point acquired by the 3D camera, and use the first teaching point cloud to establish a first 3D point cloud template of the steering knuckle; a second acquisition module, used to control the robotic arm to move the steering knuckle to the positioning point, acquire a second teaching point cloud acquired by the 3D camera at the positioning point, and acquire a teaching image of the pallet acquired by the 2D camera; a construction module, used to use the second teaching point cloud to establish a second 3D point cloud template of the steering knuckle, and use the teaching image to construct a standard image template of the pallet; a control module, used to control the robotic arm to carry the steering knuckle to move above the pallet, and control the robotic arm to release the steering knuckle to the pallet, and record the release point of the robotic arm as the teaching release point.
[0092] Optionally, the second acquisition module includes: an acquisition unit, used to acquire a first 3D point cloud template acquired by the steering knuckle during the teaching stage and an initial teaching point corresponding to the first 3D point cloud template; a calculation unit, used to calculate a first deflection matrix between the first 3D point cloud and the first 3D point cloud template; a deflection unit, used to use the deflection matrix to deflect the initial teaching point to obtain a target grasping point; and a grasping unit, used to control the robotic arm to move to the target grasping point to grasp the steering knuckle and move it to a positioning point within the field of view of the 3D camera.
[0093] Optionally, the calibration module includes: a first calculation unit, used to calculate a second deflection matrix according to the 2D image; a first calibration unit, used to calibrate the taught release point of the steering knuckle based on the second deflection matrix to obtain an intermediate placement point; a second calculation unit, used to calculate a third deflection matrix of the intermediate placement point according to the second 3D point cloud; and a second calibration unit, used to calibrate the intermediate placement point based on the third deflection matrix to obtain a target placement point.
[0094] Optionally, the first calculation unit includes: an acquisition subunit, used to acquire a standard image template of the pallet at the taught release point; a calculation subunit, used to calculate a horizontal offset of the pallet based on the 2D image and the standard image template; and a determination subunit, used to determine the horizontal offset as a second deflection matrix.
[0095] Optionally, the second calculation unit includes: an acquisition subunit, used to acquire a second 3D point cloud template acquired by the steering knuckle during the teaching stage; a first calculation subunit, used to calculate the offset matrix from the positioning point to the intermediate placement point; and a second calculation subunit, used to calculate the third deflection matrix of the intermediate placement point based on the second 3D point cloud, the second 3D point cloud template and the offset matrix.
[0096] Optionally, the second calculation subunit is further used to calculate the third deflection matrix of the middle placement point using the following formula: :
[0097] ;
[0098] in, is the offset matrix, is the third deflection matrix, M1 is the second 3D point cloud template, S2 is the second 3D point cloud, R1 is the middle placement point, Rx is the target placement point, and D0 is the positioning point.
[0099] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0100] Example 3
[0101] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0102] Optionally, in this embodiment, the above storage medium may be configured to store a computer program for executing:
[0103] S1, obtaining a first 3D point cloud of a steering knuckle acquired by a 3D camera, and obtaining a 2D image of a pallet on which the steering knuckle is to be placed acquired by a 2D camera;
[0104] S2, controlling the mechanical arm to grab the steering knuckle and move it to a positioning point within the field of view of the 3D camera according to the first 3D point cloud, and obtaining a second 3D point cloud of the steering knuckle collected again by the 3D camera;
[0105] S3, calibrating the teaching release point of the steering knuckle according to the second 3D point cloud and the 2D image to obtain a target placement point;
[0106] S4, controlling the robot arm to carry the steering knuckle to the target placement point, and placing the steering knuckle into the pallet.
[0107] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0108] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0109] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0110] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0111] S1, obtaining a first 3D point cloud of a steering knuckle acquired by a 3D camera, and obtaining a 2D image of a pallet on which the steering knuckle is to be placed acquired by a 2D camera;
[0112] S2, controlling the mechanical arm to grab the steering knuckle and move it to a positioning point within the field of view of the 3D camera according to the first 3D point cloud, and obtaining a second 3D point cloud of the steering knuckle collected again by the 3D camera;
[0113] S3, calibrating the teaching release point of the steering knuckle according to the second 3D point cloud and the 2D image to obtain a target placement point;
[0114] S4, controlling the robot arm to carry the steering knuckle to the target placement point, and placing the steering knuckle into the pallet.
[0115] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0116] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0117] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0118] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0119] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0120] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0121] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0122] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for placing a steering knuckle, characterized in that: include: Acquire a first 3D point cloud of the steering knuckle acquired by a 3D camera, and acquire a 2D image of a pallet on which the steering knuckle is to be placed acquired by a 2D camera; According to the first 3D point cloud, the robot arm is controlled to grab the steering knuckle and move it to a positioning point within the field of view of the 3D camera, and a second 3D point cloud of the steering knuckle collected again by the 3D camera is obtained; Calibrate the teaching release point of the steering knuckle according to the second 3D point cloud and the 2D image to obtain a target placement point; Control the mechanical arm to carry the steering knuckle to the target placement point, and place the steering knuckle into the tray; Among them, the teaching release point of the steering knuckle is calibrated according to the second 3D point cloud and the 2D image to obtain the target placement point, including: calculating the second deflection matrix according to the 2D image; calibrating the teaching release point of the steering knuckle based on the second deflection matrix to obtain the intermediate placement point; calculating the third deflection matrix of the intermediate placement point according to the second 3D point cloud; calibrating the intermediate placement point based on the third deflection matrix to obtain the target placement point.
2. The method according to claim 1, characterized in that Before acquiring a first 3D point cloud of the steering knuckle acquired by a 3D camera and acquiring a 2D image of a pallet on which the steering knuckle is to be placed acquired by a 2D camera, the method further includes: Taking the coordinate system of the robotic arm as a unified coordinate system, the 3D camera, the 2D camera and the robotic arm are calibrated by hand and eye; Acquire a first teaching point cloud of the steering knuckle at an initial teaching point position acquired by the 3D camera, and use the first teaching point cloud to establish a first 3D point cloud template of the steering knuckle; Controlling the robotic arm to move the steering knuckle to the positioning point, acquiring a second teaching point cloud acquired by the 3D camera at the positioning point, and acquiring a teaching image of the pallet acquired by the 2D camera; Using the second teaching point cloud to establish a second 3D point cloud template of the steering knuckle, and using the teaching image to construct a standard image template of the pallet; The robot arm is controlled to carry the steering knuckle and move to above the pallet, and the robot arm is controlled to release the steering knuckle to the pallet, and the release point of the robot arm is recorded as the teaching release point.
3. The method according to claim 1, characterized in that Controlling the mechanical arm to grab the steering knuckle and move it to a positioning point within the field of view of the 3D camera according to the first 3D point cloud includes: Acquire a first 3D point cloud template acquired by the steering knuckle during the teaching phase and an initial teaching point corresponding to the first 3D point cloud template; Calculating a first deflection matrix between the first 3D point cloud and the first 3D point cloud template; Deflect the initial teaching point using the deflection matrix to obtain a target grasping point; The robot arm is controlled to move to the target grasping point, grasp the steering knuckle and move it to a positioning point within the field of view of the 3D camera.
4. The method according to claim 1, characterized in that: Calculating a second deflection matrix according to the 2D image includes: Acquire a standard image template of the tray at the teaching release point; Calculating a horizontal offset of the tray according to the 2D image and the standard image template; The horizontal offset is determined as a second deflection matrix.
5. The method according to claim 1, characterized in that: The third deflection matrix of the intermediate placement point calculated according to the second 3D point cloud comprises: Obtaining a second 3D point cloud template obtained by the steering knuckle during the teaching phase; Calculate the offset matrix from the positioning point to the intermediate placement point; A third deflection matrix of the intermediate placement point is calculated based on the second 3D point cloud, the second 3D point cloud template and the offset matrix.
6. The method according to claim 5, characterized in that Calculating the third deflection matrix of the intermediate placement point according to the second 3D point cloud, the second 3D point cloud template and the offset matrix includes: The third deflection matrix of the intermediate placement point is calculated using the following formula: : ; in, is the offset matrix, is the third deflection matrix, M1 is the second 3D point cloud template, S2 is the second 3D point cloud, R1 is the middle placement point, Rx is the target placement point, and D0 is the positioning point.
7. A device for placing a steering knuckle, characterized in that: include: A first acquisition module is used to acquire a first 3D point cloud of the steering knuckle acquired by a 3D camera, and acquire a 2D image of a tray on which the steering knuckle is to be placed acquired by a 2D camera; A second acquisition module is used to control the mechanical arm to grab the steering knuckle and move it to a positioning point within the field of view of the 3D camera according to the first 3D point cloud, and acquire a second 3D point cloud of the steering knuckle collected again by the 3D camera; a calibration module, used for calibrating the teaching release point of the steering knuckle according to the second 3D point cloud and the 2D image to obtain a target placement point; A placement module, used for controlling the robot arm to carry the steering knuckle to move to the target placement point, and placing the steering knuckle into the tray; Among them, the calibration module includes: a first calculation unit, used to calculate the second deflection matrix according to the 2D image; a first calibration unit, used to calibrate the teaching release point of the steering knuckle based on the second deflection matrix to obtain the intermediate placement point; a second calculation unit, used to calculate the third deflection matrix of the intermediate placement point according to the second 3D point cloud; a second calibration unit, used to calibrate the intermediate placement point based on the third deflection matrix to obtain the target placement point.
8. A storage medium, characterized in that: A computer program is stored in the storage medium, wherein the computer program is configured to execute the method according to any one of claims 1 to 6 when executed.
9. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 6.
