Method for grabbing workpiece by mechanical arm based on visual IMU (Inertial Measurement Unit)

By combining the visual IMU and the yolov5 algorithm in the intelligent robotic arm, the problem of the monocular vision system being unable to recover the measurement scale is solved, and high-precision robotic arm grabbing tasks in complex environments are achieved, ensuring that the robotic arm can operate under insufficient lighting and occlusions. Stable and accurate grabbing effect in many situations.

CN118528265APending Publication Date: 2024-08-23ZHONGBEI UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410739049.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The existing visual sensors of smart robotic arms have limited sensing space, are sensitive to reflection, and have too large sensing units. They are not suitable for robotic arm follow-up sensing systems. In particular, the monocular vision system cannot restore the metric scale, which limits its use in robotic arms. Application in crawling tasks.

Method used

The robot arm grabbing method based on vision IMU is used to identify and locate the target through the yolov5 algorithm. The camera and IMU data are combined for tightly coupled estimation. The five-point method and SVD decomposition are used to calculate the camera rotation matrix and translation vector, combined with IMU pre-integration. and calibration to achieve high-precision estimation of the end position of the robotic arm and restore the position of the workpiece through the hand-eye transformation matrix.

Benefits of technology

It can provide high-precision robot arm attitude, speed and direction estimation in complex environments. It can calibrate and correct IMU deviation online, restore metric scale, and ensure that the robot arm can grasp workpieces stably and accurately in situations with insufficient lighting and many obstructions. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118528265A
    Figure CN118528265A
Patent Text Reader

Abstract

The invention belongs to the technical field of robot vision, and particularly relates to a mechanical arm workpiece grabbing method based on a vision IMU. In order to realize accurate workpiece grabbing in various complex environments, an accurate result is obtained by using a minimum sensor combination of a monocular camera and an IMU so as to achieve the purpose of mechanical arm grabbing, the cost and the size of the sensor combination are far lower than those of a depth camera and a binocular camera, and the sensor combination is more beneficial to being integrated into the mechanical arm; the IMU can rapidly collect motion information of the mechanical arm and is not influenced by factors such as illumination, which is crucial to the mechanical arm needing to rapidly respond to environmental changes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of robot vision, and in particular relates to a method for a robot arm to grasp a workpiece based on a vision IMU. Background Art

[0002] In the current intelligent robotic arms, sensors are an important part of the intelligent robotic arms. Through different sensors, the robotic arms can sense changes in the external environment and respond accordingly, such as visual sensors, inertial sensors, photoelectric sensors, load sensors, force sensors, etc. Although the existing perception modules on the market, such as depth cameras, lidars, and binocular cameras, can effectively estimate the motion and depth of the carrier, they are not suitable for the robotic arm follow-up perception system due to their limited perception space, sensitive reflections, and large perception unit size.

[0003] Yolov5 is a real-time and high-precision object detection model, which means it can process video streams and detect artifacts in real time. This is crucial for robotic arms that need to respond quickly to environmental changes. Monocular camera methods have attracted much attention due to their small size, low cost, and easy hardware setup. However, monocular vision systems cannot recover metric scales, which limits their use in real-world robotic applications. In recent years, there has been an increasing trend in the development of low-cost inertial measurement units (IMUs) assisted monocular vision systems. The main advantage of such monocular visual-inertial systems is that they have metric scales and are observable. This supports robotic arm grasping tasks that require metric state estimation.

[0004] Based on the above background, the present invention develops a method for a robotic arm to grasp a workpiece based on visual IMU. Summary of the invention

[0005] The purpose of the present invention is to provide a method for a robot arm to grasp a workpiece based on a visual IMU to solve the problems raised in the above background technology.

[0006] To achieve the above object, the present invention adopts the following technical solutions:

[0007] The present invention provides a method for a mechanical arm to grasp a workpiece based on a visual IMU, comprising the following steps:

[0008] Step 1, initialize the environment and drive the sensor;

[0009] Step 2, obtaining camera and IMU data, as well as multiple images of the target workpiece to be captured taken by the camera;

[0010] Step 3: Based on multiple images of the target workpiece to be grasped taken by the camera, the yolov5 algorithm is used to perform target recognition and locate the target workpiece to be grasped;

[0011] Step 4: pre-process the camera and IMU data, and estimate the position of the end of the robotic arm through tight coupling between the camera and IMU;

[0012] Step 5, calculating the distance between the target workpiece to be grasped and the end of the robot arm, and estimating the position of the target workpiece to be grasped;

[0013] Step 6: Control the robot arm to grasp the target workpiece according to the estimated position of the workpiece to be grasped.

[0014] Further, the step 3 is specifically as follows:

[0015] Step 3.1, manually select the target workpieces to be grasped in the target workpiece image, and assign a corresponding category label to each target workpiece;

[0016] Step 3.2, cropping and data augmentation operations are performed on the target workpiece image to be grasped to expand the training data set;

[0017] Step 3.3, use the training set to train the yolov5 network model and iteratively optimize the model weight parameters;

[0018] Step 3.4, after determining the model weight parameters, use the yolov5 network model to perform target recognition and locate the target workpiece to be grasped.

[0019] Further, the step 4 is specifically as follows:

[0020] Step 4.1, fix the camera and IMU to the end of the robotic arm, preliminarily set a robotic arm motion trajectory, initialize the camera and IMU jointly during the motion, select two frames of images containing sufficient characteristic parallax, use the five-point method to calculate the essential matrix E, and then perform SVD decomposition on the essential matrix E to obtain the camera's rotation matrix R and translation vector t;

[0021] Step 4.2: Pre-integrate the acceleration a and angular velocity ω of the IMU data to obtain the pre-integrated quantity. The calculation formula is as follows:

[0022]

[0023] in, It means that IMU is in the time interval t∈[t k ,t k+1 ], the displacement, velocity and rotation in a t represents the acceleration measurement value at time t, From I k The incremental rotation to the current time t, Represents the antisymmetric matrix of ω, and the calculation formula is as follows:

[0024]

[0025] Among them, ω x ,ω y ,ω z Respectively represent the rotation rate of IMU around the x, y, and z axes;

[0026] Step 4.3, calibrate the camera and IMU based on the results of steps 4.1 and 4.2. The calculation formula is as follows:

[0027]

[0028] in, represents the relative rotation between the IMU and the camera, The rotation matrix of the camera obtained in step 4.1 and the IMU rotation obtained in step 4.2 respectively;

[0029] Step 4.4, calibrate the IMU pre-integrated quantity based on the relative rotation obtained in step 4.3, and then perform nonlinear optimization together with the camera measurement value in step 4.1 to solve p, v, q of all frames, so as to obtain the position information of the end of the robotic arm.

[0030] Further, the step 5 is specifically as follows:

[0031] Step 5.1, for the target workpiece to be grasped identified by the target, extract the feature points on the target workpiece and calculate the normalized coordinates of the feature points;

[0032] Step 5.2, during the movement of the camera, the same feature point is observed at different positions, and the camera observation point and the feature point form a triangle, then they satisfy:

[0033] l2x2=l1Rx1+t

[0034] Among them, x1 and x2 are the normalized coordinates of the two feature points, l1 and l2 are the depths of the feature points observed in two consecutive frames of images, that is, the depth information of the target workpiece is obtained;

[0035] Step 5.3, according to the hand-eye transformation matrix, the position information of the end of the robot arm and the depth information of the target workpiece are converted from the camera coordinate system to the end coordinate system of the robot arm, and then converted to the base coordinate system of the robot arm to estimate the position of the target workpiece to be grasped.

[0036] Furthermore, the hand-eye transformation matrix in step 5.3 is obtained by the following formula:

[0037]

[0038] in, is the transformation matrix from the robot base coordinate system to the calibration plate coordinate system, is the transformation matrix from the base coordinate system of the robot to the end coordinate system of the robot, which is obtained by solving the forward kinematics of the robot. is the hand-eye transformation matrix, is the transformation matrix from the camera coordinate system to the calibration plate coordinate system, obtained through camera calibration;

[0039] By recording the changing relationship between each posture, and Remains constant during the robot's movement:

[0040]

[0041] Solve the simultaneous equations to obtain the hand-eye transformation matrix

[0042] Compared with the prior art, the present invention has the following advantages:

[0043] 1. The present invention is based on the target recognition of the yolov5 network: the algorithm can realize single-stage target detection, select the identified workpieces and classify each workpiece. Yolov5 is a real-time and high-precision target detection model, which means it can process video streams and detect workpieces in real time. This is crucial for robotic arms that need to respond quickly to environmental changes.

[0044] 2. By fusing IMU measurements and feature observations, a high-precision visual inertial odometer is obtained, which not only provides accurate attitude, speed and direction estimation for the robotic arm, but also allows online camera-IMU external calibration and IMU bias correction. It can work in various complex environments, including insufficient lighting, many obstructions, etc.

[0045] 3. The monocular vision system cannot restore the metric scale, and a low-cost IMU is used to assist the monocular vision system to restore the metric scale to obtain stable and accurate results. In this way, a small sensor kit is used to achieve the goal of visual grasping of the robotic arm. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 It is a flow chart of the method for grasping workpieces by a robotic arm based on visual IMU of the present invention;

[0047] Figure 2 This is the effect diagram of yolov5 target detection;

[0048] Figure 3 This is an assembly diagram of the IMU and robotic arm of the present invention. DETAILED DESCRIPTION

[0049] In order to further illustrate the technical solution of the present invention, the present invention is further described below through embodiments.

[0050] like Figure 1 As shown, a method for grasping workpieces by a robot arm based on visual IMU in this embodiment uses the Yolov5 target detection algorithm based on deep learning to realize the recognition and detection of workpieces. Given a scene containing workpieces and a robot arm model, the camera image and IMU data are used as input to calculate the posture of the end of the robot arm and the workpiece to be grasped, so that the robot arm can grasp the workpiece stably in this posture. This method includes the following steps:

[0051] Step 1: Initialize the environment and drive the sensor. Use the ROS open source function package usb_cam to drive the camera, use the Witt Intelligent official driver to drive the JY901S model IMU, and then initialize the sensor.

[0052] Step 2, obtaining camera and IMU data, as well as multiple images of the target workpiece to be captured taken by the camera;

[0053] Step 3: Based on multiple images of the target workpiece to be grasped taken by the camera, the yolov5 algorithm is used to perform target recognition and locate the target workpiece to be grasped;

[0054] Specifically: Step 3.1, use the labellmg tool to manually select the target workpieces to be grasped in the target workpiece image, and assign corresponding category labels to each target workpiece, such as "workpiece 1", "workpiece 2", etc.;

[0055] Step 3.2, crop and data augment the images of the target workpieces to be grasped to expand the training data set and increase the robustness and generalization ability of the model. Randomly shuffle the order of all samples in the data set to eliminate any order correlation in the data set. Divide the shuffled data set into a training set and a validation set according to a division ratio of 8:2;

[0056] Step 3.3, use the training set to train the yolov5 network model, iteratively optimize the model weight parameters so that it can accurately detect and identify the target artifacts. Use the validation set to evaluate the trained model, calculate the model's accuracy, recall rate and other indicators to evaluate the model's performance;

[0057] Step 3.4, after determining the model weight parameters, use the yolov5 network model to perform target recognition and locate the target workpiece to be grasped. The detection effect is as follows: Figure 2 shown.

[0058] Step 4: pre-process the camera and IMU data, and estimate the position of the end of the robotic arm through tight coupling between the camera and IMU;

[0059] Specifically: Step 4.1, fix the camera and IMU to the end of the robotic arm (such as Figure 3 As shown in the figure, use the Dazu robot arm joystick to control the robot arm to drive the monocular camera and IMU to move, and preliminarily set a robot arm motion trajectory. During the motion, the camera and IMU are jointly initialized. You can select two frames of images containing sufficient feature parallax by subscribing to the camera image topic ( / image_raw) and the IMU data topic (such as / imu), and use the five-point method to calculate the essential matrix E. Then, perform SVD decomposition on the essential matrix E to obtain the camera's rotation matrix R and translation vector t;

[0060] Step 4.2: Pre-integrate the acceleration a and angular velocity ω of the IMU data to obtain the pre-integrated quantity. The calculation formula is as follows:

[0061]

[0062] in, It means that IMU is in the time interval t∈[t k ,t k+1 ], the displacement, velocity and rotation in a t represents the acceleration measurement value at time t, From I k The incremental rotation to the current time t, Represents the antisymmetric matrix of ω, and the calculation formula is as follows:

[0063]

[0064] Among them, ω x ,ω y ,ω z Respectively represent the rotation rate of IMU around the x, y, and z axes;

[0065] Step 4.3, calibrate the camera and IMU based on the results of steps 4.1 and 4.2. The calculation formula is as follows:

[0066]

[0067] in, represents the relative rotation between the IMU and the camera, The rotation matrix of the camera obtained in step 4.1 and the IMU rotation obtained in step 4.2 respectively;

[0068] Step 4.4, calibrate the IMU pre-integrated quantity based on the relative rotation obtained in step 4.3, and then perform nonlinear optimization together with the camera measurement value in step 4.1 to solve p, v, q of all frames, so as to obtain the position information of the end of the robotic arm.

[0069] Step 5, calculating the distance between the target workpiece to be grasped and the end of the robot arm, and estimating the position of the target workpiece to be grasped;

[0070] Specifically: Step 5.1, for the target workpiece to be grasped identified by the target, extract the feature points on the target workpiece and calculate the normalized coordinates of the feature points;

[0071] Step 5.2, during the movement of the camera, the same feature point is observed at different positions, and the camera observation point and the feature point form a triangle, then they satisfy:

[0072] l2x2=l1Rx1+t

[0073] Among them, x1 and x2 are the normalized coordinates of the two feature points, l1 and l2 are the depths of the feature points observed in two consecutive frames of images, that is, the depth information of the target workpiece is obtained;

[0074] When solving for l1, multiply both sides

[0075]

[0076] Note: Left multiplication This is equivalent to taking the outer product of x2 on both sides at the same time. The left side of the equation is 0, and the right side can be seen as an equation for l1. l1 can be directly calculated based on it, and l2 can be obtained in the same way.

[0077] Step 5.3, according to the hand-eye transformation matrix, the position information of the end of the robot arm and the depth information of the target workpiece are converted from the camera coordinate system to the end coordinate system of the robot arm, and then converted to the base coordinate system of the robot arm to estimate the position of the target workpiece to be grasped.

[0078] The hand-eye transformation matrix in step 5.3 is obtained by the following formula:

[0079]

[0080] in, is the transformation matrix from the robot base coordinate system to the calibration plate coordinate system, is the transformation matrix from the base coordinate system of the robot to the end coordinate system of the robot, which is obtained by solving the forward kinematics of the robot. is the hand-eye transformation matrix, is the transformation matrix from the camera coordinate system to the calibration plate coordinate system, obtained through camera calibration;

[0081] By recording the changing relationship between each posture, and Remains constant during the robot's movement:

[0082]

[0083] Solve the simultaneous equations to obtain the hand-eye transformation matrix

[0084] Step 6: Control the robot arm to grab the target workpiece according to the estimated position. Before grabbing, set the position of the robot arm to be just above the grab point. When grabbing the workpiece, the robot arm moves downward to grab it. After the grabbing is completed, delete the information of the grabbed workpiece, return to the initial position, and prepare to grab the next workpiece.

Claims

1. A method for grasping a workpiece by a robotic arm based on visual IMU, characterized in that: The following steps are involved: Step 1, initialize the environment and drive the sensor; Step 2, obtaining camera and IMU data, as well as multiple images of the target workpiece to be captured taken by the camera; Step 3: Based on multiple images of the target workpiece to be grasped taken by the camera, the yolov5 algorithm is used to perform target recognition and locate the target workpiece to be grasped; Step 4: pre-process the camera and IMU data, and estimate the position of the end of the robotic arm through tight coupling between the camera and IMU; Step 5, calculating the distance between the target workpiece to be grasped and the end of the robot arm, and estimating the position of the target workpiece to be grasped; Step 6: Control the robot arm to grasp the target workpiece according to the estimated position of the workpiece to be grasped.

2. A method for grasping a workpiece by a robot arm based on visual IMU according to claim 1, characterized in that: The step 3 is specifically: Step 3.1, manually select the target workpieces to be grasped in the target workpiece image, and assign a corresponding category label to each target workpiece; Step 3.2, cropping and data augmentation operations are performed on the target workpiece image to be grasped to expand the training data set; Step 3.3, use the training set to train the yolov5 network model and iteratively optimize the model weight parameters; Step 3.4, after determining the model weight parameters, use the yolov5 network model to perform target recognition and locate the target workpiece to be grasped.

3. A method for grasping a workpiece by a robot arm based on visual IMU according to claim 1, characterized in that: The step 4 is specifically as follows: Step 4.1, fix the camera and IMU to the end of the robotic arm, preliminarily set a robotic arm motion trajectory, initialize the camera and IMU jointly during the motion, select two frames of images containing sufficient characteristic parallax, use the five-point method to calculate the essential matrix E, and then perform SVD decomposition on the essential matrix E to obtain the camera's rotation matrix R and translation vector t; Step 4.2: Pre-integrate the acceleration a and angular velocity ω of the IMU data to obtain the pre-integrated quantity. The calculation formula is as follows: in, It means that IMU is in the time interval t∈[t k ,t k+1 ], the displacement, velocity and rotation in a t represents the acceleration measurement value at time t, From I k The incremental rotation to the current time t, Represents the antisymmetric matrix of ω, and the calculation formula is as follows: Among them, ω x ,ω y ,ω z Respectively represent the rotation rate of IMU around the x, y, and z axes; Step 4.3, calibrate the camera and IMU based on the results of steps 4.1 and 4.

2. The calculation formula is as follows: in, represents the relative rotation between the IMU and the camera, The rotation matrix of the camera obtained in step 4.1 and the IMU rotation obtained in step 4.2 respectively; Step 4.4, calibrate the IMU pre-integrated quantity based on the relative rotation obtained in step 4.3, and then perform nonlinear optimization together with the camera measurement value in step 4.1 to solve p, v, q of all frames, so as to obtain the position information of the end of the robotic arm.

4. A method for grasping a workpiece by a robot arm based on visual IMU according to claim 3, characterized in that: The step 5 is specifically as follows: Step 5.1, for the target workpiece to be grasped identified by the target, extract the feature points on the target workpiece and calculate the normalized coordinates of the feature points; Step 5.2, during the movement of the camera, the same feature point is observed at different positions, and the camera observation point and the feature point form a triangle, then they satisfy: l2x2=l1Rx1+t Among them, x1 and x2 are the normalized coordinates of the two feature points, l1 and l2 are the depths of the feature points observed in two consecutive frames of images, that is, the depth information of the target workpiece is obtained; Step 5.3, according to the hand-eye transformation matrix, the position information of the end of the robot arm and the depth information of the target workpiece are converted from the camera coordinate system to the end coordinate system of the robot arm, and then converted to the base coordinate system of the robot arm to estimate the position of the target workpiece to be grasped.

5. A method for grasping a workpiece by a robot arm based on visual IMU according to claim 4, characterized in that: The hand-eye transformation matrix in step 5.3 is obtained by the following formula: in, is the transformation matrix from the robot base coordinate system to the calibration plate coordinate system, is the transformation matrix from the base coordinate system of the robot to the end coordinate system of the robot, which is obtained by solving the forward kinematics of the robot. is the hand-eye transformation matrix, is the transformation matrix from the camera coordinate system to the calibration plate coordinate system, obtained through camera calibration; By recording the changing relationship between each posture, and Remains constant during the robot's movement: Solve the simultaneous equations to obtain the hand-eye transformation matrix

Citation Information

Patent Citations

  • Binocular inertial navigation SLAM system carrying out feature matching based on front and rear frames

    CN110125928A

  • Workpiece grabbing method based on visual mechanical arm

    CN115319739A

  • Intelligent robotic system for autonomous airport trolley collection

    US20210283770A1