Drake
CompliantMaterial Class Reference

The set of per-object compliant material parameters with one material applied to each collision object. More...

#include <multibody/rigid_body_plant/compliant_material.h>

Collaboration diagram for CompliantMaterial:
[legend]

Public Member Functions

 CompliantMaterial ()=default
 
 CompliantMaterial (double youngs_modulus, double dissipation, double static_friction, double dynamic_friction)
 Constructs fully specified material. More...
 
CompliantMaterialset_youngs_modulus (double value)
 Set the value for Young's modulus. More...
 
double youngs_modulus (double default_value=kDefaultYoungsModulus) const
 Extract the value for Young's modulus with an optional default value. More...
 
bool youngs_modulus_is_default () const
 Reports if the elasticity value is configured to use a default. More...
 
void set_youngs_modulus_to_default ()
 Reset the elasticity value to report the default value. More...
 
CompliantMaterialset_dissipation (double value)
 Set the dissipation value. More...
 
double dissipation (double default_value=kDefaultDissipation) const
 Extract the dissipation value with an optional default value. More...
 
bool dissipation_is_default () const
 Reports if the dissipation value is configured to use a default. More...
 
void set_dissipation_to_default ()
 Reset the dissipation value to report the default value. More...
 
CompliantMaterialset_friction (double value)
 Sets both coefficients of friction to the same value. More...
 
CompliantMaterialset_friction (double static_friction, double dynamic_friction)
 Sets the two coefficients of friction. More...
 
double static_friction (double default_value=kDefaultStaticFriction) const
 Extract the static friction coefficient with an optional default value. More...
 
double dynamic_friction (double default_value=kDefaultDynamicFriction) const
 Extract the dynamic friction coefficient with an optional default value. More...
 
bool friction_is_default () const
 Reports if the friction values are configured to use a default. More...
 
void set_friction_to_default ()
 Reset both friction coefficient values to report the default value. More...
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 CompliantMaterial (const CompliantMaterial &)=default
 
CompliantMaterialoperator= (const CompliantMaterial &)=default
 
 CompliantMaterial (CompliantMaterial &&)=default
 
CompliantMaterialoperator= (CompliantMaterial &&)=default
 

Static Public Attributes

static const double kDefaultYoungsModulus = 1e8
 
static const double kDefaultDissipation = 0.32
 
static const double kDefaultStaticFriction = 0.9
 
static const double kDefaultDynamicFriction = 0.5
 

Detailed Description

The set of per-object compliant material parameters with one material applied to each collision object.

The material parameters include:

  • Young's modulus with units of pascals (i.e.,N/m²). This is a measure of the tensile elasticity of the material and, as such, may also be referred to as "elasticity" or, occasionally, "stiffness". The default value is that of a hard rubber: 1e8 pascals.
  • dissipation with units of s/m (i.e., 1/velocity). Its default value is 0.32, drawn from the Hunt-Crossly 1975 paper representing the dissipation for ivory.
  • coefficients of friction (static and dynamic). Unitless values with default values of 0.9 for the static coefficient of friction and 0.5 for the dynamic coefficient.

Each collision geometry is associated with compliant contact material properties. The value of properties can be explicit or default.

Explicit values are those values that are explicitly set (via the API or in a source specification file – e.g., URDF or SDF). When queried, the property set with explicit values will always report the explicit value.

Default values are left "open". For default values the context in which the property value is queried matters. Material properties set to be "default" will return the hard-coded default value or a user-provided default value. Thus, two different invocations on the same instance can provide different values iff the property is configured to be default, and the different invocations provide different default values.

Using the dissipation property to provide a concrete example:

// Constructor sets all properties to be default configured.
material.dissipation(); // Reports the hard-coded default value.
material.dissipation(1.2); // Reports the provided default value, 1.2.
material.set_dissipation(10); // dissipation is no longer default.
material.dissipation(); // Reports the explicit value, 10.
material.dissipation(1.2); // Reports the explicit value, 10.

See Compliant Contact in Drake for semantics of these properties for dynamics.

Constructor & Destructor Documentation

CompliantMaterial ( const CompliantMaterial )
default
CompliantMaterial ( )
default
CompliantMaterial ( double  youngs_modulus,
double  dissipation,
double  static_friction,
double  dynamic_friction 
)

Constructs fully specified material.

Will throw an exception in any of the following circumstances:

  • youngs_modulus <= 0
  • dissipation < 0
  • static_friction < 0
  • dynamic_friction < 0
  • static_friction < dynamic_friction

No value will be configured to use default values.

Here is the call graph for this function:

Member Function Documentation

double dissipation ( double  default_value = kDefaultDissipation) const
inline

Extract the dissipation value with an optional default value.

The default value is checked in Debug build.

Parameters
valueThe dissipation value with units of 1/velocity, i.e., s/m.

Here is the caller graph for this function:

bool dissipation_is_default ( ) const
inline

Reports if the dissipation value is configured to use a default.

A newly constructed instance will report true. Furthermore, it must return true if set_dissipation_to_default() has been called and false if set_dissipation() has been called.

double dynamic_friction ( double  default_value = kDefaultDynamicFriction) const
inline

Extract the dynamic friction coefficient with an optional default value.

The default value is checked for non-negativity in Debug build.

If the caller provides a default value for accessing static and dynamic friction, it is the callers responsibility to confirm that the dynamic friction default is less than or equal to the static friction default.

Here is the caller graph for this function:

bool friction_is_default ( ) const
inline

Reports if the friction values are configured to use a default.

A newly constructed instance will report true. Furthermore, it must return true if set_friction_to_default() has been called and false if set_friction() has been called.

CompliantMaterial& operator= ( const CompliantMaterial )
default
CompliantMaterial& operator= ( CompliantMaterial &&  )
default
CompliantMaterial & set_dissipation ( double  value)

Set the dissipation value.

Attempting to set a negative value will throw an exception. Returns a reference to *this so that multiple invocations of set can be chained together.

Here is the call graph for this function:

Here is the caller graph for this function:

void set_dissipation_to_default ( )
inline

Reset the dissipation value to report the default value.

Here is the call graph for this function:

CompliantMaterial & set_friction ( double  value)

Sets both coefficients of friction to the same value.

Throws an exception if the value is negative. Returns a reference to *this so that multiple invocations of set can be chained together.

Here is the caller graph for this function:

CompliantMaterial & set_friction ( double  static_friction,
double  dynamic_friction 
)

Sets the two coefficients of friction.

The dynamic_friction values must be less than or equal to the static_friction. An exception will be thrown if dynamic_friction > static_friction or if either value is negative. Returns a reference to *this so that multiple invocations of set can be chained together.

Here is the call graph for this function:

void set_friction_to_default ( )
inline

Reset both friction coefficient values to report the default value.

CompliantMaterial & set_youngs_modulus ( double  value)

Set the value for Young's modulus.

Attempting to set a negative value will throw an exception. Returns a reference to *this so that multiple invocations of set can be chained together.

Parameters
valueThe Young's modulus value with units of pascals.

Here is the call graph for this function:

Here is the caller graph for this function:

void set_youngs_modulus_to_default ( )
inline

Reset the elasticity value to report the default value.

Here is the call graph for this function:

double static_friction ( double  default_value = kDefaultStaticFriction) const
inline

Extract the static friction coefficient with an optional default value.

The default value is checked for non-negativity in Debug build.

If the caller provides a default value for accessing static and dynamic friction, it is the callers responsibility to confirm that the dynamic friction default is less than or equal to the static friction default.

Here is the caller graph for this function:

double youngs_modulus ( double  default_value = kDefaultYoungsModulus) const
inline

Extract the value for Young's modulus with an optional default value.

The default value is checked in Debug build.

Here is the caller graph for this function:

bool youngs_modulus_is_default ( ) const
inline

Reports if the elasticity value is configured to use a default.

A newly constructed instance will report true. Furthermore, it must return true if set_youngs_modulus_to_default() has been called and false if set_youngs_modulus() has been called.

Member Data Documentation

const double kDefaultDissipation = 0.32
static
const double kDefaultDynamicFriction = 0.5
static
const double kDefaultStaticFriction = 0.9
static
const double kDefaultYoungsModulus = 1e8
static

The documentation for this class was generated from the following files: