Wiki

New in C Turtle

(!) Please ask about problems and questions regarding this tutorial on answers.gazebosim.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Simulate a Spinning Top

Description: Simulate a Spinning Top

Tutorial Level: BEGINNER

Users are highly discouraged from using the documentation and tutorials for Gazebo on this page. Gazebo is now a stand alone project at gazebosim.org. See documentation there, thanks!

Create a Spinning Top

dreidel.png

Suppose we wanted to simulate dynamics of a top inside of Gazebo simulation, first we need to create a simple top model. To use a custom STL mesh as visual and collision geometry of the top, download this STL mesh and copy it into gazebo_worlds by:

Next, create an simple urdf model for the top and save it as top.urdf:

To see the top model we've just created in action, start up simulator with an empty world:

Next, spawn the top 0.5m above the ground:

Spin up the top by applying a rotational torque:

Simulate gravity by applying a downward force on the top:

The top falls and makes contact with the ground, it stays upright and precesses as it spins.

However, when you apply an opposite wrench and stop the top from spinning the top falls over:

For reference, to clear all forces acting on the top, call the corresponding service to clear wrenches:

Lastly, clean up the world by deleting the top:

Wiki: simulator_gazebo/Tutorials/CreatingASpinningTopInGazebo (last edited 2013-06-19 00:05:52 by davetcoleman)