Building the Rocket¶
Abstract
This section walks through the first step in building our kinematically unconstrained (free falling) rocket body. It will setup the body on which we will be connecting a set of identical landing gear.
Making the Body¶
The rocket is composed of a body and a set of landing_gear and is created with the Rocket.new() class method to keep form with the other constructors.
mojo.BodyName: A simple name to render in the viewer.mojo.GeomCylinder: The body tube geometry defined with a radius and length- Its mass is declared to something reasonable.
mojo.PoseEuler: This type sets the initial position and orientation (when combined this is called a pose).- We also define a slight initial tip off angle of a few degrees.
- There are many other ways to define an orientation such as quaternions, axis angles, etc.
mojo.FreeJoint(): This allows the body to move freely. Without this it would just be stuck in place.- Try commenting this line out to see for yourself! You will see the body just levitates.
- Finally, the body is appended to the list of
worldbodybodies.
Success
We have defined the main free kinematic body we are studying. After defining the main body, we enter a for loop to define each side of the landing gear system. We will cover the building the landing gear next.