Joint and sensor data spikes

Create issue
Issue #2477 new
Jordan Lack created an issue

I've been having trouble with spikes in force/torque sensor data. There are spikes in the joint velocity data also, but I haven't bothered too much about them until now when i'm trying to wrap control loops around force/torque sensor data. See the attached and labeled screenshot of some plots of the x/y/z forces from a force/torque sensor as well as a joint velocity signal from one of the joints.

Below are a few notes about my physics config that may be helpful,

  • physics iterations: 100
  • sor: 1.0
  • don't believe there are any self collisions happening
  • have tried raising iterations arbitrarily high and it doesn't help
  • have tuned sor and it doesn't help
  • all joints have implicit spring damper at 1

I have tweaked link inertia/mass to see if it's a poorly conditioned system for the physics and nothing i've done has had much of an affect.

If I thought I was just dealing with noise I would just put a filter on it and move on, but these spikes don't look like noise to me and i'm afraid to just ignore them and bandaid it with a filter.

One more note that may be helpful, i'm doing velocity control via the joint->SetVelocity call from the joint API.

*edit: As a further test I remove my gazebo plugins call to joint->SetVelocity so the arms now just go slack and hang down and have attached that as a second plot. The large spikes are still there in the force/torque sensor data, but the joint velocity is now smooth with no spikes.

Comments (7)

  1. Joseph Coombe

    [+1] We've also been concerned by the extremely 'noisy' joint force-torque data while trying to implement effort feedback control for a custom joint-motor Gazebo Plugin.
    http://answers.gazebosim.org/question/19323/gazebo-70-recommended-way-to-get-torque-applied-to-a-joint-by-the-environment-joint-effort-feedback-via-gazebo-api/

    The only 'official' suggestion I found was from John Hsu in 2013 - he suggested using a low-pass filter, but as you've already noted, that isn't ideal if it's not noise.

  2. Jordan Lack reporter

    I believe we have figured out why this is happening, though we don't have a solution necessarily without subverting the gazebo API. Ultimately the cause of the spikes in the data is because we're doing velocity control via the joints SetVelocity API. This is kinda fighting physics since the physics really want force commands, and so whatever is happening under the hood with Gazebo/ODE when we make the SetVelocity call is causing the spikes in the joint velocities and force/torque sensors. If I comment out our calls to that function then the data is smooth and we don't have the spikes. Either this points to a bug in the gazebo code or to the fact that trying to set a joints velocity directly and subverting physics isn't good to do.

  3. Log in to comment