Drake
drake::examples::multibody::bouncing_ball Namespace Reference

Functions

std::unique_ptr< drake::multibody::multibody_plant::MultibodyPlant< double > > MakeBouncingBallPlant (double radius, double mass, const drake::multibody::multibody_plant::CoulombFriction< double > &surface_friction, const Vector3< double > &gravity_W, geometry::SceneGraph< double > *scene_graph=nullptr)
 This method makes a MultibodyPlant model of a ball falling into a plane. More...
 

Function Documentation

◆ MakeBouncingBallPlant()

std::unique_ptr< drake::multibody::multibody_plant::MultibodyPlant< double > > MakeBouncingBallPlant ( double  radius,
double  mass,
const drake::multibody::multibody_plant::CoulombFriction< double > &  surface_friction,
const Vector3< double > &  gravity_W,
geometry::SceneGraph< double > *  scene_graph = nullptr 
)

This method makes a MultibodyPlant model of a ball falling into a plane.

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 ball.
[in]massThe mass of the ball.
[in]surface_frictionThe Coulomb's law coefficients of friction.
[in]gravity_WThe acceleration of gravity vector, expressed in the world frame W.
scene_graphIf a SceneGraph is provided with this argument, this factory method will register the new multibody plant to be a source for that geometry system and it will also register geometry for collision. If this argument is omitted, no geometry will be registered.