A grasping simulation method based on Gazebo
By performing crawling simulation on the Gazebo platform, the problems of low efficiency and poor stability of the crawling link in industrial visual sorting are solved, and efficient and low-cost crawling posture evaluation and optimization are achieved.
Patent Information
- Application Number
- CN202111589833.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-23
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2041-12-23
AI Technical Summary
In the prior art, in industrial visual sorting, the grab link is low efficiency and poor reproducibility, and the position of the target workpiece cannot be accurately obtained, resulting in insufficient grasping stability.
Gazebo-based grab simulation method is adopted, and the claw and target object model is established in the three-dimensional modeling software, physical parameters are set, and multiple grab poses are generated and evaluated to detect grab stability.
It improves the efficiency and stability of the grab, reduces the cost, and realizes multiple repeatability tests of the same grab pose in the software, avoiding collision damage in actual scenarios.
Smart Images

Figure CN116330265B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of industrial vision sorting, and particularly relates to a grasping simulation method based on Gazebo. Background Art
[0002] In the task of sorting randomly stacked workpieces through industrial vision, in the grasping link, it is necessary to ensure that the workpiece does not fall from the gripper during the process of the robot grasping and moving the workpiece. In order to select a grasping pose with higher stability, it is necessary to test and evaluate some feasible grasping poses in advance. The traditional method needs to manipulate the robot to grasp the workpiece in the actual scene during the test and evaluation. This method has low efficiency. At the same time, because the pose of the target workpiece cannot be accurately obtained in the actual scene, the repeatability of grasping is poor, and the same grasping pose cannot be tested multiple times. Another method is to calculate the grasping reliability according to the geometric features of the gripper and the object. However, due to the existence of physical parameters such as friction and mass of the object in the actual scene, there will be certain deviations in the calculation relying solely on geometric features.
[0003] In recent years, with the continuous development of the simulation software platform, physical simulation has been applied in many industrial fields. In the simulation platform, by importing the models of the target workpiece and the gripper and setting the physical parameters of the gripper and the workpiece, simulation results close to the real scene can be obtained. At the same time, the grasping pose parameters can be set in the simulation, and multiple sets of gripper models can be used to perform grasping simulation simultaneously, so as to obtain better repeatability and higher simulation efficiency. At the same time, there is no need to worry about the damage of the robot or the workpiece caused by collisions during the grasping process. Summary of the Invention
[0004] To solve the problems of the prior art, the present invention patent provides a grasping simulation method based on Gazebo, which can obtain information on grasping stability and can directly set the pose of the object in the software.
[0005] A grasping simulation method based on Gazebo includes the following steps:
[0006] S1. Modeling: Model the three-dimensional models of the gripper and the target grasping object in a three-dimensional modeling and simulation platform, and generate the object surface point cloud and the gripper point cloud respectively;
[0007] S2. Setting physical parameters during the simulation: Set the relevant physical parameters in the three-dimensional modeling and simulation platform for the grasping simulation;
[0008] S3. Importing the model: Import the point cloud models of the gripper and the target object to be grasped in the three-dimensional modeling and simulation platform;
[0009] S4, simulated grasping: set the points to be grasped on the target object and the grasping trajectory to be simulated in the 3D modeling simulation platform; control the gripper to approach and grasp the target object, verify whether the grasping is effective and obtain the effective grasping trajectory and posture.
[0010] The three-dimensional modeling of the gripper and the target grasped object includes: basic shape modeling and model mesh reconstruction;
[0011] The basic shape modeling is to construct a simulation model with the same geometric shape as the target object;
[0012] The model mesh reconstruction is to reconstruct the mesh of the model to convert the discontinuous edges and corners of the intersection surface of the target object into a continuous curved surface and make the distribution of the model surface points uniform.
[0013] The physical parameters in the simulation process are set, including setting the surface friction, the clamp closing force, the mass and the moment of inertia of the object according to the actual size of the target object.
[0014] The S4 simulation crawl includes:
[0015] S41, sampling the point cloud on the surface of the object, and selecting the points to be grasped on the target object;
[0016] S42, determining the direction in which the gripper approaches the target object and the direction in which the gripper closes, as a grasping trajectory;
[0017] S43, controlling the gripper to approach the object to be grasped until it collides with the point cloud of the target object to be grasped, and then controlling the gripper to close;
[0018] S44, detecting whether there is an object point cloud in the area where the gripper is closed, if so, it is determined as a valid grasping sampling, otherwise it is an invalid grasping sampling;
[0019] S45, recording the relative posture between the target object to be grasped and the gripper of the effective grasping sample as the currently generated grasping posture.
[0020] The sampling interval of the point cloud on the surface of the target object is 1 mm to select a point to be grasped.
[0021] Determining the direction in which the gripper approaches the target object and the direction in which the gripper closes includes:
[0022] The normal direction of the position of the point to be grasped and the tangent direction corresponding to the minimum curvature radius are calculated according to the surface in the neighborhood of the point to be grasped; the normal direction is used as the direction in which the gripper approaches the object, and the tangent direction is used as the direction in which the gripper closes.
[0023] The present invention has the following beneficial effects and advantages:
[0024] Using a grasping simulation software to conduct simulated grasping can obtain information on grasping stability. Compared with the method of using a robot for actual grasping, it has a faster speed and lower cost. At the same time, the pose of the object can be directly set in the software, which has better repeatability compared to manually repeatedly placing the object and can conduct multiple simulation tests on the same grasping pose. Description of the Drawings
[0025] Figure 1 This is the flowchart of the grasping simulation in the present invention;
[0026] Figure 2 This is the flowchart of the grasping pose generation algorithm in the present invention. Detailed Description of the Invention
[0027] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following will describe in detail the specific implementation methods of the present invention with reference to the drawings. Many specific details are set forth in the following description to fully understand the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without departing from the connotation of the invention. Therefore, the present invention is not limited by the specific implementations disclosed below.
[0028] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs. The terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0029] The specific method of the present invention is as follows:
[0030] As shown in the attached Figure 1 figure, by modeling the gripper and the object to be grasped in a modeling software and setting physical parameters such as the mass and friction of the target object, the models of the gripper and the object to be grasped can be imported into the simulation platform, and then the pose in the grasping pose generation algorithm can be simulated and grasped to obtain the grasping stability of the current grasping pose, thereby providing guidance for actual grasping.
[0031] First, through a three-dimensional modeling software, a model is established according to the geometric dimension parameters of the gripper and the object to be grasped. At the same time, according to the actual parameters of the gripper and the object, the physical parameters that will affect the final grasping result are set. Among them, the object to be grasped needs to set parameters such as surface friction, mass, and moment of inertia, and the gripper needs to set parameters such as surface friction and closing force. Subsequently, the models of the gripper and the object to be grasped are imported into the simulation platform. The initial position of the gripper will be at a certain height from the ground to ensure that the object is at a certain height from the ground during grasping.
[0032] When performing grasping simulation, first turn off the gravity effect on the object in the simulation platform. Open the gripper and input the grasping pose obtained by the grasping pose generation algorithm or other methods into the simulation platform as the pose for this simulation grasping. After waiting for the gripper to close and contact the object, turn on the gravity effect on the object in the simulation platform. At this time, the object will stay in mid-air relying on the friction generated when the gripper closes tightly. Then the gripper will perform translational, rotational and other motions according to the given motion path to simulate the state of the actual robot grasping the object. If the current grasping state is unstable, the object will separate from the gripper during the motion of the gripper and fall to the ground. After waiting for the gripper motion to end, the simulation platform will detect whether there is still an object model within the closed area of the gripper. If the model separates from the gripper at this time, the current simulated grasping pose is an unreliable grasping pose. On the contrary, if the model is still between the fingers of the gripper at this time, the current simulated grasping pose is a stable grasping pose. By performing multiple simulations on the same grasping pose, the grasping success rate of this grasping pose can be obtained. In actual grasping, according to the characteristics of the grasped object, the grasping pose with the highest grasping success rate can be selected from the current feasible grasping poses for grasping, so as to improve the stability of grasping.
[0033] This simulation platform can perform grasping simulations on various grippers including two-finger grippers.
[0034] This method proposes to import the gripper and the target object with known 3D models into Gazebo for simulated grasping simulation experiments to obtain the optimal grasping pose of the target object. The specific implementation process is as follows:
[0035] First, perform necessary processing on the 3D models of the gripper and the target grasping object in a 3D modeling software, including basic shape modeling and model mesh reconstruction. The purpose of basic shape modeling is to construct a simulation model with the same geometric shape as the target object. The model obtained by basic shape modeling usually has relatively obvious edges and corners at the positions where the surfaces meet. Because these edges and corners are discontinuous on the surface, there are large abnormalities in their normal directions, which will cause more uncertainty interference during simulated grasping. Through model mesh reconstruction, on the one hand, the discontinuous edges and corners at the joints are converted into continuous curved surfaces, reducing the uncertainty of grasping. On the other hand, model reconstruction makes the distribution of surface points of the model more uniform, which can reduce the situation of penetration during model collision.
[0036] Then, set the relevant physical parameters in Gazebo for the grasping simulation experiment, including surface friction, gripper closing force, mass of the object, and moment of inertia. The setting of these parameters needs to be based on the parameters of the actual object. Since it is difficult to measure the moment of inertia, the moment of inertia of the object can be calculated according to the model shape and density of the object during simulation.
[0037] Next, write a program in Gazebo to generate the grasping poses to be simulated. As shown in the appendix Figure 2 Figure 2 shows the algorithm flowchart of a grasping pose generation algorithm. First, sample the point cloud on the object surface, select the points to be grasped (one point to be grasped can be selected every 1 mm according to the simulation requirements), and then calculate the normal direction of the position of the point to be grasped and the tangent direction corresponding to the minimum curvature radius based on the surface within the neighborhood range of the point to be grasped. Among them, the normal direction is the direction for the gripper to approach the object, and the tangent direction is the direction for the gripper to close. The gripper approaches the object to be grasped from the normal direction until it collides with the point cloud of the object to be grasped. Then, detect whether there is object point cloud within the area where the gripper closes. If there is object point cloud, it is considered an effective grasping sample, otherwise it is considered an ineffective grasping sample. Record the relative pose of the object to be grasped and the gripper in the effective grasping sample as the currently generated grasping pose. The number of grasping poses is related to the interval parameter for selecting the points to be grasped.
[0038] Next, conduct grasping simulations for a large number of effective grasping poses in Gazebo. To improve the simulation efficiency, multiple grippers can be imported into the simulation scene simultaneously to perform grasping simulations on multiple objects to be grasped. In this case, an isolation wall model needs to be set between the grippers to prevent the objects separated from the grippers from colliding with other grippers or objects, which may interfere with the grasping simulation. Before the simulation process starts, first import the models of the grippers and the objects to be grasped into the simulation platform. Among them, the gripper needs to maintain a certain distance from the ground in the simulation platform so that the object can maintain a certain height after being grasped.
[0039] The simulation grasping process is as follows:
[0040] 1) Turn off the gravity effect on the object;
[0041] 2) Open the gripper and set the effective grasping pose;
[0042] 3) Close the gripper and turn on the gravity effect on the object;
[0043] 4) The gripper moves along the given trajectory while performing grasping state detection.
[0044] When performing grasping state detection, detect whether the object is in the grasped state by detecting the distance between the fingers of the current gripper. If the finger distance is 0, it means the fingers are completely closed and the object has separated from the gripper. Otherwise, it means the object is still in the grasped state.
[0045] The grasping simulation needs to repeat the grasping simulation more than 3 times for the same valid to-be-grasped pose to exclude some random interferences. The grasping poses in which the object does not detach from the gripper during multiple simulations are considered stable grasping poses. In this way, a limited number of stable grasping poses are preferably selected from multiple valid to-be-grasped poses, and these poses can be used for setting the registration pose during object grasping.
[0046] The innovation points are as follows: 1) The grasping simulation platform developed based on Gazebo can obtain data such as grasping success rate and stability under specific scenarios by setting the grasping pose and the physical parameters of the grasping system. 2) Using multiple grippers to simulate the grasping of different poses simultaneously is faster and less costly compared to using multiple robots for grasping verification in practice.
[0047] The above is the preferred implementation manner of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present invention, several improvements and refinements can be made, and these improvements and refinements should be regarded as the protection scope of the present invention.
Claims
1. A grasping simulation method based on Gazebo, characterized in that The following steps are involved: S1. Modeling: Modeling the gripper and the target object in a three-dimensional modeling simulation platform, and generating a surface point cloud of the target object and a gripper point cloud respectively; S2. Setting physical parameters in the simulation process: setting relevant physical parameters in the grabbing simulation in the 3D modeling simulation platform; S3, import model: import the gripper point cloud and the target object surface point cloud in the 3D modeling simulation platform; S4, simulated grasping: setting the points to be grasped on the target object and the grasping trajectory to be simulated in the 3D modeling simulation platform; controlling the gripper to approach and grasp the target object, verifying whether the grasping is effective and obtaining the effective grasping trajectory and grasping posture; including: S41, sampling the surface point cloud of the target object and selecting the points to be grasped on the target object; S42, determining the direction in which the gripper approaches the target object and the direction in which the gripper closes, as a grasping trajectory; S43, controlling the gripper to approach the target object until it collides with the point cloud on the surface of the target object, and then controlling the gripper to close; S44, detecting whether there is a point cloud on the surface of the target object in the area where the gripper is closed, and if so, determining that it is a valid grasping sampling, otherwise it is an invalid grasping sampling; S45. Record the relative position of the target object and the gripper for effective grasping and sampling as the currently generated grasping position.
2. The grasping simulation method based on Gazebo according to claim 1, wherein, The three-dimensional modeling of the gripper and the target object includes: basic shape modeling and model mesh reconstruction; The basic shape modeling is to construct a simulation model with the same geometric shape as the target object; The model mesh reconstruction is to reconstruct the mesh of the simulation model, so as to convert the discontinuous edges and corners of the intersection surface of the target object into a continuous curved surface, and make the surface point distribution of the simulation model uniform.
3. The grasping simulation method based on Gazebo according to claim 1, wherein, The physical parameters in the simulation process are set, including setting the surface friction, the clamp closing force, the mass and the moment of inertia of the object according to the actual size of the target object.
4. A grasping simulation method based on Gazebo according to claim 1, characterized in that The method of selecting the points to be grasped on the target object is to select the surface point cloud of the target object according to the sampling interval of 1mm.
5. A grasping simulation method based on Gazebo according to claim 1, characterized in that, Determining the direction in which the gripper approaches the target object and the direction in which the gripper closes includes: The normal direction of the position of the point to be grasped and the tangent direction corresponding to the minimum curvature radius are calculated according to the surface in the neighborhood of the point to be grasped; the normal direction is used as the direction in which the gripper approaches the object, and the tangent direction is used as the direction in which the gripper closes.
Citation Information
Patent Citations
Robot grabbing pose detection method based on domain migration under single-view-angle point cloud
CN112489117A
Gripping method and device based on double-arm robot and double-arm robot
CN113538576A