{"action":"created","issue":{"url":"https://api.github.com/repos/JenniferBuehler/gazebo-pkgs/issues/1","repository_url":"https://api.github.com/repos/JenniferBuehler/gazebo-pkgs","labels_url":"https://api.github.com/repos/JenniferBuehler/gazebo-pkgs/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/JenniferBuehler/gazebo-pkgs/issues/1/comments","events_url":"https://api.github.com/repos/JenniferBuehler/gazebo-pkgs/issues/1/events","html_url":"https://github.com/JenniferBuehler/gazebo-pkgs/issues/1","id":137735686,"number":1,"title":"Object attaches to palm_link, gripper keeps closing","user":{"login":"mexomagno","id":6372150,"avatar_url":"https://avatars.githubusercontent.com/u/6372150?v=3","gravatar_id":"","url":"https://api.github.com/users/mexomagno","html_url":"https://github.com/mexomagno","followers_url":"https://api.github.com/users/mexomagno/followers","following_url":"https://api.github.com/users/mexomagno/following{/other_user}","gists_url":"https://api.github.com/users/mexomagno/gists{/gist_id}","starred_url":"https://api.github.com/users/mexomagno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mexomagno/subscriptions","organizations_url":"https://api.github.com/users/mexomagno/orgs","repos_url":"https://api.github.com/users/mexomagno/repos","events_url":"https://api.github.com/users/mexomagno/events{/privacy}","received_events_url":"https://api.github.com/users/mexomagno/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-02T00:41:54Z","updated_at":"2016-03-03T02:31:45Z","closed_at":null,"body":"Sorry for the long question.\r\nFirst of all, thanks for the wonderful plugin.\r\nI'm currently using it with a _PR2 _on _ROS Hydro_, within _Gazebo 1.9_.\r\nIt compiles smoothly, runs with no problem, and when the gripper starts closing around the tested model (wooden cube), when it completely encloses it, the plugin successfully attaches it to the palm link specified on the model's urdf (technically, xacro).\r\nBut the gripper won't stop closing, trespassing the object's geometrical boundaries, and after a certain point, the plugin will detect a collision and proceed to detach it, making the cube jump. It  then enters on a detach-attach loop until the object jumps out of reach. The gripper then closes completely as there's nothing avoiding it.\r\nI'm aware that the following is ROS and MoveIt specific, but I hope someone can help anyway.\r\nThe way I'm closing the gripper is somehow forced: I'm not using Moveit to do it (I don't know how!), I'm directly publishing a `pr2_controllers_msgs/Pr2GripperCommandActionGoal` msg to the `/l_gripper_controller/gripper_action/goal` topic. Can this be the problem? It is of my understanding that the pr2 gripper will always keep trying to close when it encounters an object in between the fingers, applying a given effort specified on one of the msg fields, so this is an expected behaviour. \r\nI wasn't able to find the source files of the Jaco example shown on your (excellent) Wiki.\r\n\r\nThanks in advance, Jennifer. Cheers."},"comment":{"url":"https://api.github.com/repos/JenniferBuehler/gazebo-pkgs/issues/comments/191547907","html_url":"https://github.com/JenniferBuehler/gazebo-pkgs/issues/1#issuecomment-191547907","issue_url":"https://api.github.com/repos/JenniferBuehler/gazebo-pkgs/issues/1","id":191547907,"user":{"login":"mexomagno","id":6372150,"avatar_url":"https://avatars.githubusercontent.com/u/6372150?v=3","gravatar_id":"","url":"https://api.github.com/users/mexomagno","html_url":"https://github.com/mexomagno","followers_url":"https://api.github.com/users/mexomagno/followers","following_url":"https://api.github.com/users/mexomagno/following{/other_user}","gists_url":"https://api.github.com/users/mexomagno/gists{/gist_id}","starred_url":"https://api.github.com/users/mexomagno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mexomagno/subscriptions","organizations_url":"https://api.github.com/users/mexomagno/orgs","repos_url":"https://api.github.com/users/mexomagno/repos","events_url":"https://api.github.com/users/mexomagno/events{/privacy}","received_events_url":"https://api.github.com/users/mexomagno/received_events","type":"User","site_admin":false},"created_at":"2016-03-03T02:31:45Z","updated_at":"2016-03-03T02:31:45Z","body":"Thanks Jennifer for your fast response.\r\n[As you can see here](http://mexomagno.duckdns.org/otros/random/random/post_grasp_comp.webm), I meant exactly moving _through_ the object. I tested this with different objects available from the gazebo interface (\"insert\" tab), which is where I got the wooden cube you can see on the previous video (and not from the cube spawner). The collisions seem to work well on all objects until just before the plugin attaches the object to the palm link. \r\nI had gazebo physics settings set to values very similar to those on [your wiki page](https://github.com/JenniferBuehler/gazebo-pkgs/wiki/Gazebo-physics-settings), and just to be sure, I configured the world with the exact same values you propose. I can confirm that I'm loading the right world file by calling `/gazebo/get_physics_properties`, which yields the following:\r\n```\r\ntime_step: 0.001\r\npause: False\r\nmax_update_rate: 1000.0\r\ngravity: \r\n  x: 0.0\r\n  y: 0.0\r\n  z: -9.8\r\node_config: \r\n  auto_disable_bodies: False\r\n  sor_pgs_precon_iters: 0\r\n  sor_pgs_iters: 50\r\n  sor_pgs_w: 1.3\r\n  sor_pgs_rms_error_tol: 0.0\r\n  contact_surface_layer: 0.001\r\n  contact_max_correcting_vel: 100.0\r\n  cfm: 0.0\r\n  erp: 0.2\r\n  max_contacts: 20\r\n```\r\nI tried with `sor_pgs_iters: 100 (<iters>100</iters> on the .world file)` too, without success. Should I keep raising this number?\r\nI also tried with low values of `effort` with the same results. The only thing that changed with this is that the gripper closed much slower, but still inserts into the object.\r\n\r\nTomorrow I'll definitely try to run the Jaco files to see if I'm still having this problem there, and I'll let you know.\r\n\r\nAs for the new version of gazebo-pkgs, I just installed the dependencies and cloned  them. I'm having some trouble compiling it (on `SetGazeboPhhysicsClient.cpp` had to change all the `float` to `double` or else it would fail!) and will look into it tomorrow too. I'm using your old version of the plugin right now (which I think hasn't changed).\r\n\r\nI'll let you know!!"}}