neka-nat / ur_ws

Universal robot with robotiq hand workspace
26 stars 10 forks source link

How to achieve grasping an object in simulation? #2

Open LuserBen opened 5 years ago

LuserBen commented 5 years ago

Hi, I see that robotiq grasps the object well in gazebo in your models. Do you use gazebo_grasp_plugin? I use gazebo_grasp_plugin to help robotiq pick an object in gazebo, but it usually has no effect. So can you tell me how you solved it. Thank you.

neka-nat commented 5 years ago

Hi, Yes. I also use gazebo_grasp_plugin and I set the plugin parameters so that the robot can grasp. In this repository, it is set as follows.

https://github.com/neka-nat/robotiq_85_gripper/commit/8a41bd15664929a42a71a9dba90fa420a2f15098

LuserBen commented 5 years ago

Hi, @neka-nat. Thanks for your sharing. I find the reason that the issue is not on the parameters, maybe on the plugin. If the object is in the middle of the gripper(x = y, because I get the object state by gazebo service /get_model_state, there is no position error of the object), left finger and right finger will arrive target pose at the same time but without counting contact points in 'close' process. So I add a position offset (x != y), one finger will contact the object first, then another finger. It works. qq 20190227154118

neka-nat commented 5 years ago

Did you actually try to experiment with varying the parameters?

I don't remember such a bug happened. However, grasping with the plug-in is very unstable and it often happened that the robot could or couldn't grasp at the same position.

LuserBen commented 5 years ago

@neka-nat At the begining, the robot get the object state by gazebo service /get_model_state, gripper can not grasp the object. So I tried different parameters, but it still did not work. Then I get the object position by kinect v1, position errors lead to x != y, this time it works. So I add a position offset (x != y), one finger will contact the object first, then another finger. It works. You can have a try, object (for me object is cube, so problem is obvious) in the middle of two fingers or not. I send a comment in https://github.com/JenniferBuehler/gazebo-pkgs/issues/9. floor 51.