Rapid positioning and grabbing method for mechanical arm
The marker point cloud is obtained and processed by the depth camera, and the rotation and translation matrix is calculated using the principal component analysis method, which solves the problem of inaccurate positioning of the robotic arm in the grasping task, and realizes the rapid and accurate positioning and grasping of the robotic arm, improving the grasping efficiency and accuracy.
Patent Information
- Application Number
- CN202311129430.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-04
- Publication Date
- 2025-03-04
AI Technical Summary
It is difficult for the robotic arm to quickly and accurately locate the target object during the grab task, resulting in low gripping efficiency and accuracy.
The marker point cloud was obtained through a depth camera, and the point cloud was preprocessed, segmented and screened. The main component analysis method was used to calculate the marker's main axis direction, and matched with the template point cloud, and the rotation and translation matrix was calculated to guide the robotic arm rotation and translation.
The robotic arm quickly and accurately locates and grabs the target object, improves the grasping efficiency and accuracy, and can quickly establish a conversion matrix with other workpieces, realizing the grasping task of fixed workpieces.
Smart Images

Figure CN119550329A_ABST
Abstract
Description
Technical Field
[0001] The present invention mainly relates to the field of robot arm positioning, and in particular to a robot arm rapid positioning and grasping method. Background Art
[0002] Robotic gripping technology is an important part of modern industrial automation and robotic applications. Its importance is reflected in many aspects, including improving production efficiency, ensuring work safety, and achieving precise operation. Compared with manual operation, robotic arms can complete gripping tasks with higher speed and accuracy. Robotic arms can operate according to pre-set paths and parameters, such as grabbing objects and moving to specified locations, so they are highly programmable and repeatable. Whether in material handling on assembly lines, warehousing and logistics, or food processing, robotic gripping technology can achieve efficient production processes. In hazardous environments or scenarios where hazardous materials need to be handled, the application of robotic arms can reduce potential risks to human workers. Robotic arms can handle objects that are heavy, large, and hot, which have potential risks of harm to the human body, thereby reducing the risk of personal injury in the working environment. In addition, robotic arms can also achieve collision detection and avoidance through sensors and intelligent algorithms to ensure safety when working with humans. The robotic arm consists of multiple joints and actuators, which can simulate human arm movements and achieve high-precision positioning and flexible operation. The robot arm can obtain information about the target object through visual perception, force sensors and other devices, and select the appropriate grasping strategy according to its properties and shape. Accurate visual positioning of the workpiece is an indispensable step for the robot arm to grasp. It involves the robot arm accurately obtaining the position and posture information of the target object. Only through accurate workpiece positioning can the robot arm perform precise grasping and operation, thereby achieving efficient production and automation processes. Accurate visual positioning helps to improve processing accuracy, ensure safety, realize automated operation, and improve processing stability and consistency. In the visual positioning of the workpiece, the edge and feature points of the workpiece become the key to our identification of the workpiece. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a method for quickly positioning and grasping a robotic arm in order to guide the robotic arm to a desired position for work, which can quickly calculate a transformation matrix for the rotation and translation of the robotic arm.
[0004] The method for rapid positioning and grasping of a mechanical arm according to the present invention comprises:
[0005] Step 1: Obtain the point cloud of the marker, place the marker in the field of view of the depth camera, and photograph the marker with the depth camera to obtain the point cloud of the marker.
[0006] Step 2: point cloud preprocessing: sampling filtering and Gaussian filtering preprocessing are performed on the marker point cloud. Sampling filtering is performed by creating a three-dimensional voxel grid in the point cloud and using the centroid point to represent the points in the voxel. Gaussian filtering is performed by performing statistical analysis on the neighborhood of each point and calculating the average distance of all neighboring points.
[0007] Step three, perform point cloud segmentation and point cloud screening on the marker point cloud to extract the marker point cloud, search for adjacent points of the initial point within a set radius in the point cloud, repeat the search operation in the search results until no new points are added, and classify the searched point clouds according to the average height, and select the point cloud with the highest average height as the marker point cloud.
[0008] Step 4: Calculate the main axis direction of the marker by principal component analysis on the marker point cloud, match the main axis with the template point cloud and calculate the transformation matrix. The main axis direction of the marker needs to calculate the center of the point cloud:
[0009]
[0010] In formula (1), P center is the point cloud center, P i is the point cloud, N is the number of point clouds, The covariance matrix is calculated as:
[0011]
[0012] In formula (2), C p is the point cloud covariance matrix, and the main characteristic components, i.e. the main axis direction of the point cloud, are obtained by performing singular value decomposition on the covariance matrix:
[0013] C P =U P D P V P T (3)
[0014] In formula (3), U p is the feature vector. After matching the main axis direction of the marker point cloud with the template point cloud, calculate the rotation matrix and translation matrix:
[0015]
[0016] In formula (4), R0 is the rotation matrix, T0 is the translation matrix, X center and U x are the point cloud center and eigenvector of the template point cloud respectively. The marker point cloud is transformed according to the rotation matrix and the translation matrix:
[0017] P new=P*R0+T0(5)
[0018] In formula (5), P new is the converted landmark point cloud.
[0019] 7. Step 5: Calculate the pose of the converted marker point cloud according to the geometric information. Calculate the outer contour of the marker point cloud, find the intersection of the outer contour by fitting straight lines to obtain the corner points of the marker point cloud, and calculate the coordinates of the center point of the marker point cloud through the corner points to obtain the translation matrix T1. After calculating the normal vector of the marker point cloud, calculate the angle between the normal vector and the X-axis, Y-axis, and Z-axis:
[0020]
[0021] In formula (6), (x1, y1, z1) is the normal vector of the marker point cloud, (x2, y2, z2) represent the X-axis, Y-axis and Z-axis respectively, θ is the angle between the vectors, and the rotation matrix R1 is calculated by the angle. After conversion according to formula (5), the rotation and translation of the robot arm are completed, and actions such as grasping can be performed.
[0022] Compared with the prior art, the present invention has the following beneficial effects:
[0023] 1) The present invention matches the marker point cloud with the template point cloud according to the principal axis direction of the principal component analysis method, extracts rectangular features and straight line features according to the marker point cloud contour, and obtains a transformation matrix by calculating the geometric features to guide the rotation and translation of the robot arm. Compared with the prior art, the present invention uses the principal component analysis method to quickly achieve point cloud matching, and can quickly and accurately calculate the marker point cloud pose through geometric features.
[0024] 2) The present invention obtains the point cloud of the marker and identifies the position and posture of the point cloud of the marker, and can quickly calculate the transformation matrix from the end of the robot arm to the marker. Through the transformation matrix, it can quickly establish a relationship with other workpieces to achieve the task of grasping fixed workpieces. Compared with the prior art, the present invention first identifies the position and posture of the marker and establishes a transformation matrix with other fixed workpieces. After pre-calibration, it can quickly guide the robot arm to the working position. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 A schematic flow chart of a method for rapid positioning and grasping of a robotic arm provided in one embodiment of the present invention.
[0026] Figure 2 A landmark point cloud provided by an embodiment of the present invention.
[0027] Figure 3 A processed point cloud provided by an embodiment of the present invention.
[0028] Figure 4 The main axis direction of the marker point cloud provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0030] Reference Figure 1 The flowchart is a method for rapid positioning and grasping of a robotic arm according to the present invention, and the steps are as follows:
[0031] Step 1: Get the point cloud of the marker. Place the marker in the field of view of the depth camera and use the depth camera to shoot the marker to get the point cloud of the marker. Figure 2 It is the point cloud of the landmark.
[0032] Step 2: Point cloud preprocessing:
[0033] In the acquired landmark point cloud, there are many scattered noises and background point clouds that we don’t need, so we need to remove these points. Sampling and filtering are performed on the landmark point cloud, and a three-dimensional voxel grid is created in the point cloud and the points in the voxel are represented by the centroid point. Gaussian filtering is performed on the landmark point cloud, and the neighborhood of each point is statistically analyzed and the average distance of all neighboring points is calculated. Sampling filtering and Gaussian filtering can remove scattered points and discrete points in the point cloud, making the point cloud more integrated.
[0034] Step 3: Perform point cloud segmentation and point cloud screening on the marker point cloud to extract the marker point cloud. We only need part of the marker point cloud in the point cloud and need to remove the part of the point cloud we don’t need. In the point cloud, search for adjacent points of the initial point within the set radius, and repeat the search operation in the search results until no new points are added. This is used to segment the point cloud into block point clouds according to distance. Then classify the searched point clouds according to average height, and select the point cloud with the highest average height as the marker point cloud. Figure 3 The processed point cloud.
[0035] Step 4: Calculate the main axis direction of the marker by principal component analysis on the marker point cloud, match the main axis with the template point cloud and calculate the transformation matrix. The main axis direction of the marker needs to calculate the center of the point cloud:
[0036]
[0037] In formula (1), P center is the point cloud center, P i is the point cloud, N is the number of point clouds, The covariance matrix is calculated as:
[0038]
[0039] In formula (2), C p is the point cloud covariance matrix, and the main characteristic components, i.e. the main axis direction of the point cloud, are obtained by performing singular value decomposition on the covariance matrix:
[0040] C P =U P D P V P T (3)
[0041] In formula (3), U p is the feature vector. After matching the main axis direction of the marker point cloud with the template point cloud, calculate the rotation matrix and translation matrix:
[0042]
[0043] In formula (4), R0 is the rotation matrix, T0 is the translation matrix, X center and U x are the point cloud center and eigenvector of the template point cloud respectively. The marker point cloud is transformed according to the rotation matrix and the translation matrix:
[0044] P new =P*R0+T0(5)
[0045] In formula (5), P new is the converted landmark point cloud, Figure 4 is the main axis direction of the landmark point cloud.
[0046] Step 6: Calculate the pose of the converted marker point cloud based on the geometric information. Calculate the outer contour of the marker point cloud, find the intersection of the outer contour by fitting straight lines to obtain the corner points of the marker point cloud, and calculate the coordinates of the center point of the marker point cloud through the corner points to obtain the translation matrix T1. After calculating the normal vector of the marker point cloud, calculate the angle between the normal vector and the X-axis, Y-axis, and Z-axis:
[0047]
[0048] In formula (6), (x1, y1, z1) is the normal vector of the marker point cloud, (x2, y2, z2) represent the X-axis, Y-axis and Z-axis respectively, θ is the angle between the vectors, and the rotation matrix R1 is calculated by the angle. After conversion according to formula (5), the rotation and translation of the robot arm are completed. By guiding the movement of the robot arm, actions such as grasping can be performed.
Claims
1. A method for rapid positioning and grasping of a robotic arm, the method comprising: S1: Obtain a marker point cloud, where the marker point cloud is point cloud information obtained by photographing the marker with a depth camera mounted on a robotic arm. S2: Point cloud preprocessing, sampling filtering, Gaussian filtering, etc. are performed on the marker point cloud to remove excess noise. S3: Extract the landmark point cloud by segmenting and filtering the point cloud. S4: Point cloud matching. After calculating the main axis direction of the marker through principal component analysis, the main axis is matched with the template point cloud and the transformation matrix is calculated. S5: Pose estimation: calculate the pose of the converted landmark point cloud based on the geometric information. S6: Calculate the rotation and translation matrix of the robot arm, and calculate the rotation and translation matrix of the robot arm according to the posture and the transformation matrix.
2. The method for rapid positioning and grasping of a robotic arm according to claim 1, characterized in that: In step S1, the marker is placed in the field of view of the depth camera, and the depth camera is used to photograph the marker to obtain a point cloud of the marker.
3. The method for rapid positioning and grasping of a robotic arm according to claim 1, characterized in that: In step S2, the marker point cloud is preprocessed by sampling filtering and Gaussian filtering. The sampling filtering is to create a three-dimensional voxel grid in the point cloud and represent the points in the voxel with the centroid point. The Gaussian filtering is to perform statistical analysis on the neighborhood of each point and calculate the average distance of all neighboring points.
4. The method for rapid positioning and grasping of a robot arm according to claim 1, characterized in that: In step S3, the marker point cloud is segmented and screened to extract the marker point cloud. The point cloud segmentation is to search for adjacent points of the initial point within a set radius, and repeat the search operation in the search results until no new points are added. The point cloud screening is to classify the searched point clouds according to the average height, and select the point cloud with the highest average height as the marker point cloud.
5. The method for rapid positioning and grasping of a robot arm according to claim 1, characterized in that: In step S4, after the principal component analysis method is used to calculate the main axis direction of the marker point cloud, the main axis is matched with the template point cloud and the transformation matrix is calculated. The main axis direction of the marker requires the calculation of the point cloud center: In formula (1), P center is the point cloud center, P i is the point cloud, N is the number of point clouds, The covariance matrix is calculated as: In formula (2), C p is the point cloud covariance matrix, and the main characteristic components, i.e. the main axis direction of the point cloud, are obtained by performing singular value decomposition on the covariance matrix: C P =U P D P V P T (3) In formula (3), U p is the feature vector. After matching the main axis direction of the marker point cloud with the template point cloud, calculate the rotation matrix and translation matrix: In formula (4), R0 is the rotation matrix, T0 is the translation matrix, X center and U x are the point cloud center and eigenvector of the template point cloud respectively. The marker point cloud is transformed according to the rotation matrix and the translation matrix: P new =P*R0+T0 (5) In formula (5), P new is the converted landmark point cloud.
6. The method for rapid positioning and grasping of a robot arm according to claim 1, characterized in that: In step S5, the pose of the converted marker point cloud is calculated based on the geometric information. The outer contour of the marker point cloud is calculated, and the corner points of the marker point cloud are obtained by fitting straight lines to find the intersection points of the outer contour. The coordinates of the center point of the marker point cloud are calculated by the corner points to obtain the translation matrix T1. After the normal vector of the marker point cloud is calculated, the angle between the normal vector and the X-axis, Y-axis, and Z-axis is calculated: In formula (6), (x1, y1, z1) is the normal vector of the marker point cloud, (x2, y2, z2) represent the X-axis, Y-axis and Z-axis respectively, θ is the angle between the vectors, and the rotation matrix R1 is calculated by the angle. After conversion according to formula (5), the rotation and translation of the robot arm are completed, and actions such as grasping can be performed.