JenniferBuehler / gazebo-pkgs

A collection of tools and plugins for Gazebo
BSD 3-Clause "New" or "Revised" License
206 stars 104 forks source link

Different position of a cube affect graspping performance #18

Closed LuserBen closed 6 years ago

LuserBen commented 6 years ago

Hello Jennifer @JenniferBuehler Thanks for your gazebo_grasp_plugin. I use UR5 and robotiq in gazebo and try to grasp a 6cm cube, but I find that different cube position affect graspping result. Assuming the coordinate range of cube is x: 0.4m—9m, y: 0.4m—0.9m. I find the gripper will grasp well when the cube is in the middle area, such as (x, y) = (0.6, 0.5), but if the cube is far away from middle area, such as (x, y) = (0.8, 0.7), the cube will gradually slip out and slipping direction is -y. This is a video link (see here) . You can see it is silpping slowly and finally slipping out in 24s. So can you give me some advice? I don't know whether the different position affect the physical detection. Thanks very much.

JenniferBuehler commented 6 years ago

Hello, glad you found the plugin useful. If it slips out, it means that the grasp plugin has not taken effect. This is the case if there is not enough opposing forces applied to the object, and with any robot hand this can be the case if the cube is grasped from a different pose.

You could try to adjust the parameters for the behaviour you want. Did you read this section in the wiki, and the following sections? This explains how it works and what you can adjust. I hope it helps!

LuserBen commented 6 years ago

Thanks for your reply. @JenniferBuehler Yes, I have read the wiki, but I have not adjust the parameters, I will try later. And the joint value for gripper to grasp a cube is fixed (for example every time is 0.266) in my code, without real-time physical detection from the plugin. Does it affect the result?

JenniferBuehler commented 6 years ago

It potentially could affect the result, if the gripper is not properly touching the object. When you closely look at the gripper and object in Gazebo at the point of grasping, does it look like it is touching it properly from both sides? It helps to switch on the "Collision" shapes (in the gazebo "View" menu), this is the shapes that are actually used for the grasp plugin (the ones you see are only the visual shapes which aren't used in Gazebo for anything else but displaying the world).

LuserBen commented 6 years ago

@JenniferBuehler I check the points of grasping, I think the gripper is not properly touching the object. The collision shapes of touching area is not symmetrical, it means the force's direction is not perpendicular to the surface of the cube, so it caused the cube slipping out? grasp_collision

JenniferBuehler commented 6 years ago

I can't see if there is contact point on the other side, is there one? If there is a contact point, the object should be touched from opposing sites...

JenniferBuehler commented 6 years ago

You could try play with the forces_angle_tolerance and increase it (so the forces have to be "less opposing" for the grasp plugin to take effect)

LuserBen commented 6 years ago

Yes there is contact point on the other side, and just as same as this side. I have spent whole day to adjust the parameters and check any thing which would affect the grasp result, and I aslo refer to this issue https://github.com/JenniferBuehler/gazebo-pkgs/issues/9, but it's still bad. In fact, the grasp plugin worked well a few days ago, but suddenly it didn't take effect these days. Maybe I changed something that will have an effect on it. I will keep looking for the solution. Thanks a lot. @JenniferBuehler

JenniferBuehler commented 6 years ago

Hmmm ok, good luck finding what it was that you changed ;) have a git commit, or any backup from a few days ago that you could compare the state to? Generally if there are contact points that you can see on opposing sites it should be OK....

LuserBen commented 6 years ago

Hi @JenniferBuehler I think I have found something. I use 2 ways to control the gripper grasp the cube. One is C++ client and C++ server (moveit move_group C++ interface), another is matlab as a client and C++ server (The two server are the same). When I use C++ cilent to send action message to server, the cube would slip out gradually. But If I use matlab as a client, the gripper could grasp the cube. I have checked it for several times. So the grasp_plugin can be used for robotiq. Maybe the main issue is caused by my C++ code. Also different position of a cube won't affect graspping performance.

JenniferBuehler commented 6 years ago

Glad to hear you are on to this! Good luck with tracking it down. I will close this for now, feel free to re-open it if you have any more questions.

Cheers!

LuserBen commented 6 years ago

Ok. Thanks @JenniferBuehler