Gazebo | Ignition | Community
Ask Your Question

Friction insufficient in grasping simulation

asked 2018-05-09 14:05:50 -0600

raequin gravatar image

updated 2018-05-14 10:19:20 -0600

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.

image description

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.

image description

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.

image description

Here is the result of View --> Contacts.

image description

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"/>

  <transmission name="gripper_joint_transmission">
    <joint name="gripper_joint">
    <actuator name="gripper_joint_motor">

  <!-- High friction on gripper -->
  <gazebo reference="gripper_wide_block_p">

  <gazebo reference="gripper_wide_block_d">

Cylinder sdf

<sdf version='1.6'>
  <model name='Cone100'>
    <link name='Cone100'>
      <pose frame=''>0 0 0 0 -0 0</pose>
        <pose ...
edit retag flag offensive close merge delete


Have you set intertias for your gripper parts? Also if you look at this tutorial: - they have set no mu1 or mu2 at all. You could try that if everything else fails.

Raskkii gravatar imageRaskkii ( 2018-05-11 01:40:03 -0600 )edit

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.

raequin gravatar imageraequin ( 2018-05-14 10:11:58 -0600 )edit

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.

Raskkii gravatar imageRaskkii ( 2018-05-15 01:51:43 -0600 )edit

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.

RobotBoy gravatar imageRobotBoy ( 2020-04-09 08:42:05 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2018-09-17 14:02:41 -0600

raequin gravatar image

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!

edit flag offensive delete link more


Hi, i was having the same problem, with Franka Panda in gazebo. Is it necessary to use effort joint in the whole arm? I tried using effortjointInterface only in the hand link (only for finger joints), because panda-hand-controller is a separate controller by-default in the franka_ros package, so i kept positionInterface for the arm-controller and effortinterface for the handController.

Saad Ahmad gravatar imageSaad Ahmad ( 2020-03-27 06:10:45 -0600 )edit

The effort controller works as expected i.e; the gripper seems better locked on to the target object and overshoots as it looses contact while trying to lift the object. but still the problem persists, their seems to be no friction at all to give the object even a slight jerk off of the ground for a while. I have tried everything else explained here as well regarding <mu> values and other gazebo params

Saad Ahmad gravatar imageSaad Ahmad ( 2020-03-27 06:13:25 -0600 )edit

Yes, you have to use effort controllers on the entire arm. I was having the same issue, the fix was to just create a trajectory controller for the arm i was using (ur5), instead of using a gazebo service to give joint positions.

RobotBoy gravatar imageRobotBoy ( 2020-04-09 08:43:55 -0600 )edit

answered 2018-05-09 15:01:41 -0600

updated 2018-05-09 15:05:40 -0600

Setting mu1 and mu2 that high will probably result in weird behavior.

What I'd recommend trying:

  • Reduce gripper and cylinder mu1 and mu2 to 1.0-100.0

  • Give your gripper a small minDepth value of say 0.002-0.003 and a maxVel value of 0

  • Visualize contacts (View -> Contacts) [Diagnosis]

How much force are you closing the gripper with?

edit flag offensive delete link more


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?

raequin gravatar imageraequin ( 2018-05-09 21:22:04 -0600 )edit

Sorry I've only used ros_control once... You'd have to look into that yourself to see what kind of force is being applied based off the PID-gains and joint_motor input.

josephcoombe gravatar imagejosephcoombe ( 2018-05-10 07:55:05 -0600 )edit

Also, side note, I presume you modified your example code for simplicity, but as it's written the gazebo tag doesn't do anything (missing reference=LINK_NAME attribute).

josephcoombe gravatar imagejosephcoombe ( 2018-05-10 07:56:11 -0600 )edit

On my list of things to do today was add a reference attribute to the gazebo tag but it's my understanding that without that the tag applies to the entire robot.

raequin gravatar imageraequin ( 2018-05-10 08:22:33 -0600 )edit

The question is updated to reflect your suggestions. The simulation behavior is unchanged, as far as I can tell.

raequin gravatar imageraequin ( 2018-05-10 08:45:56 -0600 )edit

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 gravatar imageraequin ( 2018-05-10 09:12:42 -0600 )edit

@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.

josephcoombe gravatar imagejosephcoombe ( 2018-05-10 09:20:43 -0600 )edit

I don't know if that will make much of a difference since I think default SDF mu1 and mu2 are 1 anyway. Can you post an gif with the contacts visualized?

josephcoombe gravatar imagejosephcoombe ( 2018-05-10 09:23:08 -0600 )edit

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).

raequin gravatar imageraequin ( 2018-05-10 09:28:03 -0600 )edit

Regarding a visualization of the contacts, they are identical to the visuals. By the way, where did your 1--100 range come from?

raequin gravatar imageraequin ( 2018-05-10 09:52:20 -0600 )edit

Question Tools



Asked: 2018-05-09 14:05:50 -0600

Seen: 10,275 times

Last updated: Sep 17 '18