bowling_ball.cc File Reference

A simple example showing a bowling ball knocking over pins. More...

Include dependency graph for bowling_ball.cc:




 DEFINE_double (v, 12,"The ball's initial linear speed down the lane (m/s)")
 DEFINE_double (timestep, 2e-4,"The simulator time step (s)")
 DEFINE_double (w, 25,"The ball's initial angular speed (around [-1, 0 ,0] (rad/s).")
 DEFINE_double (youngs_modulus, 1e8,"The contact model's Young's modulus (Pa)")
 DEFINE_double (us, 0.4,"The static coefficient of friction")
 DEFINE_double (ud, 0.2,"The dynamic coefficient of friction")
 DEFINE_double (v_tol, 0.01,"The maximum slipping speed allowed during stiction (m/s)")
 DEFINE_double (dissipation, 2,"The contact model's dissipation (s/m)")
 DEFINE_double (contact_radius, 1e-3,"The characteristic scale of radius (m) of the contact area")
 DEFINE_double (sim_duration, 3,"The simulation duration (s)")
 DEFINE_int32 (pin_count, 10,"The number of pins -- in the range [0, 10]")
 DEFINE_string (system_type,"continuous","The type of system to use: ""'continuous' or 'discretized'")
 DEFINE_double (dt, 1e-3,"The step size to use for ""'system_type=discretized' (ignored for ""'system_type=continuous'")
int main ()
int main (int argc, char *argv[])

Detailed Description

A simple example showing a bowling ball knocking over pins.

The ball has an initial linear velocity parallel with the axis of the lane, and an angular velocity around that same vector (i.e., spinning perpendicular to its direction of motion).

In this case, it illustrates the change from dynamic to static friction as the ball slides along the lane. The slide becomes a roll as the relative velocity at the point of contact between ball and lane slows to zero.

This scenario (the definitions in the URDF and default values here) are inspired by this discussion of bowling physics: http://www.real-world-physics-problems.com/physics-of-bowling.html

There are physical artifacts that are not captured in this simulation. This doesn't model the change in the coefficient of friction due to position; a real bowling lane is oiled in for the first 2/3 of its length. As such, the parameters have to be tweaked to get the desired outcome. Rotational velocity has been modified (pointing straight back with a lower magnitude) and higher initial linear velocity. The lane is oriented along the x-axis (on the x-y plane).

Function Documentation

int main ( int  argc,
char *  argv[] 

Here is the call graph for this function: