Friction in the gripper not working, objects slipping
Hi everyone,
I am sorry I have to post a new "gripper slipping objects" kind of issue, but I can't manage to solve this problem. The issue I have is that objects are slipping from the gripper, meaning the friction is not applied correctly.
The code of the plugin is available in here.
The urdf I'm using is not the one available in that package, but the one of the full MARA robot with the gripper, this one.
I can push the code I'm using to test this somewhere is someone is willing to test it using my same approach.
The plugin uses a custom interpolation and updates grippers position in gazebo via SetPositionTarget(..) from a JointController. We also use pid values and update them using the SetPositionPID(..) whenever a service call is received (with the goal pose of the gripper). I tried to update on every gazebo connection update event without any improvement.
The goal is that the 2 (left and right) inner fingers grab things, so the following changes are mostly related to those 2 links. Things I tried without any improvement.
- Add
dynamics
tag to the urdf in grippers joints. Adding friction and damping, also trying to tune values. - Add
mu1
andmu2
contact coefficients via gazebo tag in the urdf, and directly under the link element (surface not recognized if done this way.) - Increase the force applied by the 2 joints, which is calculated automatically using the position pid controller. Objects still slipping.
- Improved inertias in both fingers so that using the gzclient's inertia visualization tool I see a pink box slightly covering the finger (link).
- Added friction or increased it to the element I want to grab, setting
mu
s to even super high values like 100000. - ODE and Bullet, none working.
- Tried tuning physics parameters, won't go into much details here, basically I tried everything I could think of.
My last bet is that there is a problem with the contacts, which are not enough. Could this be the big issue? Maybe we need to replace our contact mesh for the fingers with a simple box? In the image above you can see how only the upper part of the box is being highlighted as a contact.
If nothing works I could try to attach the finger link to the contacting object via plugin, and break the parent-child relation when the object is released. Obviously this is a complete mess and should not be done this way..
Any kind of advice is much appreciated.
Nestor