Drake
Drake C++ Documentation
drake::examples::ball_plate Namespace Reference

Functions

void AddBallPlateBodies (double radius, double mass, double hydroelastic_modulus, double dissipation, const multibody::CoulombFriction< double > &surface_friction, double resolution_hint_factor, multibody::MultibodyPlant< double > *plant)
 This function modifies a MultibodyPlant by adding a ball falling on a dinner plate. More...
 

Function Documentation

◆ AddBallPlateBodies()

void drake::examples::ball_plate::AddBallPlateBodies ( double  radius,
double  mass,
double  hydroelastic_modulus,
double  dissipation,
const multibody::CoulombFriction< double > &  surface_friction,
double  resolution_hint_factor,
multibody::MultibodyPlant< double > *  plant 
)

This function modifies a MultibodyPlant by adding a ball falling on a dinner plate.

The plate and floor are read from sdf files but the ball is constructed programmatically.

Parameters
[in]radiusThe radius (meters) of the ball.
[in]massThe mass (kg) of the ball.
[in]hydroelastic_modulusThe hydroelastic modulus (Pa) of the ball.
[in]dissipationThe Hunt & Crossley dissipation constant (s/m) for the ball.
[in]surface_frictionThe Coulomb's law coefficients (unitless) of friction of the ball.
[in]resolution_hint_factorThis scaling factor (unitless) multiplied by the radius of the ball gives the target edge length of the mesh on the surface of the ball. The smaller number gives a finer mesh with more tetrahedral elements.
[in,out]plantThe bodies will be added here.
Precondition
plant is not null.

See also https://drake.mit.edu/doxygen_cxx/group__hydroelastic__user__guide.html