Coulomb friction parameters not handled properly in dart

Create issue
Issue #1000 new
Steve Peters created an issue

There are a bunch of sliding boxes with difference coefficients of friction in test_friction.world. In ODE and bullet, two of the boxes remain still while the other boxes start to slide at different rates (according to their friction coefficient). In dart, however, all the boxes slide at the same rate. This could be a simple matter of parameters not being passed on correctly.

(Similar to #989 for simbody)

@jlee02 @karenliu

Comments (9)

  1. Steve Peters reporter

    Cool, I'm testing it now. I'll submit a quick pull request with the ABI changes to gazebo5 since code freeze is very soon.

  2. Steve Peters reporter

    It looks like it's working; I'm modifying the test to use dart now.

    It looks like there's just a single friction coefficient, not a friction pyramid. Are there plans to implement a friction pyramid? If not, I would use a different data structure.

  3. Steve Peters reporter
    diff -r a718876fc0f5 test/integration/physics_friction.cc
    --- a/test/integration/physics_friction.cc  Fri Jan 16 10:52:48 2015 -0800
    +++ b/test/integration/physics_friction.cc  Fri Jan 16 11:24:54 2015 -0800
    @@ -26,6 +26,11 @@
     #include "gazebo/physics/bullet/BulletTypes.hh"
     #endif
    
    +#ifdef HAVE_DART
    +#include "gazebo/physics/dart/DARTSurfaceParams.hh"
    +#include "gazebo/physics/dart/DARTTypes.hh"
    +#endif
    +
     #include "gazebo/transport/transport.hh"
     #include "ServerFixture.hh"
     #include "helper_physics_generator.hh"
    @@ -80,6 +85,18 @@
                                       / 2.0;
                     }
     #endif
    +#ifdef HAVE_DART
    +                else if (physics->GetType() == "dart")
    +                {
    +                  physics::DARTSurfaceParamsPtr surface =
    +                    boost::dynamic_pointer_cast<physics::DARTSurfaceParams>(
    +                    (*iter)->GetSurface());
    +                  // Average the mu1 and mu2 values
    +                  this->friction = (surface->frictionPyramid.GetMuPrimary()
    +                                  + surface->frictionPyramid.GetMuSecondary())
    +                                  / 2.0;
    +                }
    +#endif
                   }
                 }
         public: ~FrictionDemoBox() {}
    @@ -255,13 +272,6 @@
               << std::endl;
         return;
       }
    -  if (_physicsEngine == "dart")
    -  {
    -    gzerr << "Aborting test since there's an issue with dart's friction"
    -          << " parameters (#1000)"
    -          << std::endl;
    -    return;
    -  }
    
       Load("worlds/friction_demo.world", true, _physicsEngine);
       physics::WorldPtr world = physics::get_world("default");
    
  4. Log in to comment