1. OpenSourceRoboticsFoundation
  2. Simulation
  3. gazebo
Issue #622 open

Joint velocities are high when the joint link is in contact and the joint is not rotating

Jesper Smith
created an issue

When a torque is applied on a joint and the joint link is in contact with an object such that the joint is stationary, the joint velocity is non-zero and can be quite large depending on the force.

I did a simple test using the sandia hands grabbing a cylinder. I've attached a screenshot of the state of the robot. On the joints left_f0_j1 and left_f0_j2 I applied an open loop force of 1.0 Nm using joint->setForce(0, 1.0) in a model plugin.

For this test I set the damping of the fingers to 0.1 and disabled the velocity limits. The physics are done using the standard parameters.

When the finger contacts the cyclinder and is in a steady state, the angle is constant and the corresponding joint velocity should also be zero. However, the joint angles and velocities in steady state are

left_f0_j1
  - Angle: 0.9 rad
  - Velocity: 5 rad/s
left_f0_j2
  - Angle: 1 rad
  - Velocity: 8 rad/s

I've attached the graphs of the test over 6 seconds to this bug report as well.

If P(I)D control is used to control the finger angle, it can easily become unstable when the finger hits an object. Depending how the velocity limits are implemented this could also lead to instabilities.

All tests are done using the gazebo_1.5 branch.

Comments (21)

  1. Jesper Smith reporter

    John, I use a Gazebo model plugin with JointPtr->GetAngle(0).Radian() and JointPtr->GetVelocity(0). I did not apply any filtering on the angular velocities.

    I've differentiated the angle for testing purposes and when the joint is in contact the joint velocity is zero.

  2. John Hsu

    This is largely due to the non-convergence of contact solution. One way to mitigate this problem was by having very large joint viscous damping values (stabilizing solution with cfm damping) for example, in qual 2, if one were to grasp the cordless drill:

    qual 2 grasp cordles drill

    Increasing joint damping from 1 to 30 Nms/rad:

    rosservice call /sandia_hands/set_joint_damping "damping_coefficients: [30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0,
      30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0, 30.0]" 
    

    results in the residual joint velocity drops as shown in plot below:

    joint velocity during grasp

    simulation is more stable in this case, but you're familiar with the down side :)

  3. Jesper Smith reporter
    • changed status to open

    Now the VRC is over, I'm re-opening this bug. During the competition we found that this bug also affected us when sitting in the vehicle (or just touching the mud layer). The joint velocities of stationary joints where not reported as zero, making it necessary to avoid the seat altogether (see picture).

  4. Steven Peters

    Jesper Smith Can you advise us on constructing a simple model / world file that illustrates this bug? I'd like to build a regression test for it, but we need a test case. We can start with the Sandia Hand test case, but it would be instructive to see if we can reproduce it with simpler models, ie. sandia-hand with only two fingers, then one finger, then a double pendulum or single pendulum.

  5. Jesper Smith reporter

    It is probably reproducible with a 2 link, 1 rotational joint model. First link is fixed, second link resting on a stop. I added a simple schematic, probably if you put a torque on J1 you can see this behaviour. If not, I'll try to make a test case coming Thursday.

  6. Log in to comment