Friction insufficient in grasping simulation

Following some advice below I changed the ROS controller from EffortJointInterface to PositionJointInterface and this seems to be a step in the right direction, the object moves vertically a little bit, but it still does not grasp properly. I've varied the joint effort limit and proportional gain but it seems like sometimes the force is too high, causing instability as shown in the animation, or else it is too low and the object just slips out of the gripper. Parameters I've varied are mu, mu2, kp, kd, min_depth, and max_vel, even restoring them to their default values; all to no good effect.

Original question

For an application where a manipulator picks up a cylinder I have created a primitive gripper with a ROS SimpleTransmission and EffortJointInterface. The Gazebo model for the cylinder comes from an STL file. This is using Gazebo 9 and ROS Kinetic. In Gazebo the gripper can push the cylinder around but it does not pick it up; the cylinder just slides through the gripper as shown in the animation.

I've changed the friction coefficients in both the gripper urdf and the cylinder sdf to 100.0 (this question used to say 99999.9 but following an answer below I made them 100.0 instead). I also reduced the mass of the cylinder. The effort limit on the joint I set to 999999.9, just to try to get it to grip really hard. The integral gain is 1.0 and the robot pauses after gripping to give time for the error integral to grow (the cylinder keeps the gripper from closing all the way).

Part of the gripper urdf and the entire cylinder sdf are pasted below the animation. Can you tell me what I need to do to get a gripper to pick up this object?

Update: Because I thought perhaps there was insufficient contact between the cylinder and flat gripper, I changed the object model to a block and made the gripper taller. Like the cylinder, the block has mass of 0.1 and friction coefficients of 100. This animation shows that the result is the same as before.

Thanks for your input. Yes, the gripper parts have inertial values. I cleared all the collision properties I'd set (mu1, mu2, kp, kd, min_depth, and max_vel). This made things a little better (the cone gets picked up at least) but the grasp is unstable as shown in the top animation.

2 Answers

The cause behind this unrealistic interaction (that is, this lack of friction) is the use of PositionJointInterface for the UR10 joints. Here's a decent explanation of the phenomenon:

... using 'set position' or 'set
velocity' in gazebo forces the physics
simulation to try and accomplish this,
which results in strange behavior.
It's actually preferable, according to
the Gazebo team members I'm working
with, to always use 'set force' in
Gazebo because that allows a more
normal interaction when the commanded
force of an arm joint puts the arm in
contact with the environment.

Following an example, I made local changes to the universal_robot package to use EffortJointInterface instead. Some gain values from ARIAC provide decent performance. Thanks to everyone who contributed suggestions!

Comments

Thanks for your response. I will update the friction coefficients and the other parameters tomorrow then let you know what takes place. If you tell me how, I will also check the clonig force. Is there somewhere for me to monitor this value?

To the cylinder sdf I added a contact sensor and printed the contact values while it was being gripped. The resulting file is quite long. It shows non-zero forces between the gripper and cylinder but is so large that I haven't been able to make any conclusions from the data.

@raequin Yeah I've never tested that, but after looking at the link you provided, I interpret section as stating that a gazebo tag without a reference only supports the `static` tag. Other tags will be directly inserted into the SDF but imo won't do anything.

It looks like you were right that without the "reference" attribute the gazebo tag was not doing anything: I converted from the xacro to the sdf with and without that attribute and without it the mu etc. parameters do not show up in the sdf of the robot (whereas with "reference" in the gazebo tag the values do make it into the sdf).