Friction insufficient in grasping simulation
Update 2
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.
Here is the result of View --> Contacts.
Part of gripper urdf
<!-- Prismatic joint -->
<joint name="gripper_joint" type="prismatic">
<origin xyz="${2 * gripper_side_block_width + gripper_thickness} 0 0" rpy="0 0 0" />
<parent link="gripper_wide_block_p" />
<child link="gripper_wide_block_d" />
<limit effort="999999.9" lower="-100" upper="100" velocity="0.5"/>
</joint>
<transmission name="gripper_joint_transmission">
<type>transmission_interface/SimpleTransmission</type>
<joint name="gripper_joint">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
<actuator name="gripper_joint_motor">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
<!-- High friction on gripper -->
<gazebo reference="gripper_wide_block_p">
<mu1>100.0</mu1>
<mu2>100.0</mu2>
<minDepth>0.003</minDepth>
<maxVel>0</maxVel>
</gazebo>
<gazebo reference="gripper_wide_block_d">
<mu1>100.0</mu1>
<mu2>100.0</mu2>
<minDepth>0.003</minDepth>
<maxVel>0</maxVel>
</gazebo>
</robot>
Cylinder sdf
<sdf version='1.6'>
<model name='Cone100'>
<link name='Cone100'>
<pose frame=''>0 0 0 0 -0 0</pose>
<inertial>
<pose ...
Have you set intertias for your gripper parts? Also if you look at this tutorial: http://gazebosim.org/tutorials?tut=simple_gripper - they have set no mu1 or mu2 at all. You could try that if everything else fails.
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.
What happens when you have the cylinder roll off the block for example? Does it roll off naturally or jump all over the place? Trying to see if it's the gripper causing the problems or the cylinder.
The problem with my system was that: even though i have high friction on everything related in the grasping, and the contacts were being made properly (shown by gazebo gui). The grippers were still slipping. The fix turned out to be that i had to use effort controllers for everything related to picking up and moving the cube, and not just the grippers.