scpeters-test / sdformat

Simulation Description Format (SDF) parser and description files.
http://sdformat.org
Other
1 stars 0 forks source link

make implicit_spring_damper default to true #127

Open scpeters-test opened 8 years ago

scpeters-test commented 8 years ago

Original report (archived issue) by John Hsu (Bitbucket: hsu, GitHub: hsu).


There are too many simulation problems that are caused by explicit damping. I find myself telling people repeatedly to do:

add following blocks to your urdf for every joint:

      <gazebo reference="[joint name]">
        <implicitSpringDamper>1</implicitSpringDamper>
      </gazebo>

or

add following block to your joint sdf:

    <physics>
        <ode>
            <implicit_spring_damper>1</implicit_spring_damper>
        </ode>
    </physics>

I can't remember a time when explicit damping is preferred.

scpeters-test commented 8 years ago

Original comment by Steve Peters (Bitbucket: Steven Peters).


I think explicit forms are more accurate than implicit for very small time-steps, but are unstable when the time-step is too large. Also, the implicit form adds a constraint row.

Those are pretty minor compared to simulation instability, but I wanted to mention them.

scpeters-test commented 8 years ago

Original comment by John Hsu (Bitbucket: hsu, GitHub: hsu).


I think both explicit and implicit dampings are currently first order, so I am not sure if one is "more accurate" than the other? Is there a test that compares the accuracy of the two?

[oops! repeating info from your previous comment] The failure mode of explicit damping is numerical instability, while the failure mode of implicit damping is an under damped system, so it's much more preferable. The downside is added constraint row, so non-insignificant impact on performance.