Drake
Drake C++ Documentation
drake::examples::multibody::cylinder_with_multicontact Namespace Reference

Functions

void PopulateCylinderPlant (double radius, double length, double mass, const drake::multibody::CoulombFriction< double > &surface_friction, const Vector3< double > &gravity_W, drake::multibody::MultibodyPlant< double > *plant)
 This function populates the given MultibodyPlant with a model of a cylinder free to fall onto the ground. More...
 

Function Documentation

◆ PopulateCylinderPlant()

void drake::examples::multibody::cylinder_with_multicontact::PopulateCylinderPlant ( double  radius,
double  length,
double  mass,
const drake::multibody::CoulombFriction< double > &  surface_friction,
const Vector3< double > &  gravity_W,
drake::multibody::MultibodyPlant< double > *  plant 
)

This function populates the given MultibodyPlant with a model of a cylinder free to fall onto the ground.

The model adds a fixed number of spheres (10) around each rim of the cylinder as a way of emulating multicontact so that we can evaluate MultibodyPlant's contact solver. MultibodyPlant models the contact of the ball with the ground as a perfectly inelastic collision (zero coefficient of restitution), i.e. energy is lost due to the collision.

Parameters
[in]radiusThe radius of the cylinder.
[in]lengthThe length of the cylinder.
[in]massThe mass of the cylinder.
[in]surface_frictionThe Coulomb's law coefficients of friction.
[in]gravity_WThe acceleration of gravity vector, expressed in the world frame W.
plantA valid pointer to a MultibodyPlant. This function will register geometry for contact modeling.
Precondition
plant is not null, finalized, and is registered with a SceneGraph.
Note
The given plant is not finalized. You must call Finalize() on the new model once you are done populating it.