Model.dtd

Go to the documentation of this file.
00001   <!-- 
00002   The world defines everything that is in the physics model along with the
00003   parameters that are needed.
00004   -->
00005   <!ELEMENT world (gravity?, space*, object*, joint*)>
00006     <!-- The gravity element defines the constant force of gravity in this
00007     world. The gravity can have any direction and magnitude. The standard earth
00008     gravity would be x=0, y=0, z=-9.81 (assuming mks units)
00009     -->
00010     <!ELEMENT gravity EMPTY> 
00011       <!ATTLIST gravity x CDATA "0">
00012       <!ATTLIST gravity y CDATA "0">
00013       <!ATTLIST gravity z CDATA "0">
00014     <!-- The space is used for collisions, you can define multiple spaces in
00015     which the objects in each space will only collide with each other. If an
00016     object isn't in a space, then it won't collide with anything 
00017     -->
00018     <!ELEMENT space (object*)>
00019       <!ATTLIST space name CDATA #REQUIRED>
00020       <!-- An object is anything that is either simulated by the physics
00021       model or used for collisions. Every object has an ID attribute so that
00022       it is unique If an object has a transform, that transform is considered
00023       the center of the object relative to the world.
00024       -->
00025       <!ELEMENT object (body?, geom*, transform?)>
00026         <!ATTLIST object name CDATA #REQUIRED>
00027         <!-- A geom is added to an object for collision detection. When two
00028         geometries collide, they are pushed away from each other. The geom of
00029         an object determines what it looks like on the screen. A geom can be
00030         one of several types, (plane, ray, box, sphere, capped cylinder or a
00031         triangle mesh). A geom may optionally have a texture for use when
00032         drawing the object. If defined outside of a space, collision
00033         detection will not be performed. An object can have multiple
00034         geometries. They don't nessecarily have to be connected. A geometry
00035         can have a its own transform. This transform is relative to the
00036         transform of the object
00037         -->
00038         <!ELEMENT geom (texture?, (plane|box|sphere|cylender|trimesh), 
00039                         transform?)>
00040           <!-- A geometry can hava a name specified. If not specified, a name
00041           will be created for the geometry -->
00042           <!ATTLIST geom name CDATA #IMPLIED>
00043           <!-- A texture file containing an image that should be drawn on
00044           this geometry 
00045           -->
00046           <!ELEMENT texture EMPTY>
00047             <!ATTLIST texture filename CDATA #REQUIRED>
00048           <!-- A plane is defined with the equation a*x+b*y+c*z=d -->
00049           <!ELEMENT plane EMPTY>
00050             <!ATTLIST plane a CDATA #REQUIRED>
00051             <!ATTLIST plane b CDATA #REQUIRED>
00052             <!ATTLIST plane c CDATA #REQUIRED>
00053             <!ATTLIST plane d CDATA #REQUIRED>
00054           <!-- A box is defined as a set of three lenghts. The position of
00055           the box is the center of mass (posx + lengthx/2, ...) -->
00056           <!ELEMENT box EMPTY>
00057             <!ATTLIST box x CDATA #REQUIRED>
00058             <!ATTLIST box y CDATA #REQUIRED>
00059             <!ATTLIST box z CDATA #REQUIRED>
00060           <!-- A sphere is defined by its radius. The position of a sphere
00061           gives the location of the center -->
00062           <!ELEMENT sphere EMPTY>
00063             <!ATTLIST sphere radius CDATA #REQUIRED>
00064           <!-- A cylinder is defined as a radius and length. The position of
00065           the cylinder gives the location of the center of mass. -->
00066           <!ELEMENT cylinder EMPTY>
00067             <!ATTLIST cylinder radius CDATA #REQUIRED>
00068             <!ATTLIST cylinder height CDATA #REQUIRED>
00069           <!-- A trimesh is defined as two lists. One of verticies which are
00070           specified by x/y/z position and a second list of triangles. The
00071           triangles are defined by three vertex numbers. The vertex index is
00072           the order that the vertexes are defined in the vertices list
00073           -->
00074           <!ELEMENT trimesh (vertices, triangles)>
00075             <!ELEMENT vertices (vertex+)>
00076               <!ELEMENT vertex EMPTY>
00077                 <!ATTLIST vertex x CDATA #REQUIRED>
00078                 <!ATTLIST vertex y CDATA #REQUIRED>
00079                 <!ATTLIST vertex z CDATA #REQUIRED>
00080             <!ELEMENT triangles (triangle+)>
00081               <!ELEMENT triangle EMPTY>
00082                 <!ATTLIST triangle v1 CDATA #REQUIRED>
00083                 <!ATTLIST triangle v2 CDATA #REQUIRED>
00084                 <!ATTLIST triangle v3 CDATA #REQUIRED>
00085           <!-- A transform is a generic manipulation of the position and
00086           rotation of an item. The transform is applied to the object only
00087           and is relative to the transform of the parent object. So an
00088           object could have a transfrom that sets the position relative to
00089           the world and a geometry could have an additional transform that
00090           sets its position relative to the object.
00091           Sub-Elements:
00092           <position> <rotation>
00093           -->
00094           <!ELEMENT transform (position?, (rotation|quaternion)?)>
00095             <!ELEMENT position EMPTY>
00096               <!ATTLIST position x CDATA "0">
00097               <!ATTLIST position y CDATA "0">
00098               <!ATTLIST position z CDATA "0">
00099             <!ELEMENT rotation EMPTY>
00100               <!ATTLIST rotation x CDATA #REQUIRED>
00101               <!ATTLIST rotation y CDATA #REQUIRED>
00102               <!ATTLIST rotation z CDATA #REQUIRED>
00103             <!ELEMENT quaternion EMPTY>
00104               <!ATTLIST quaternion x CDATA #REQUIRED>
00105               <!ATTLIST quaternion y CDATA #REQUIRED>
00106               <!ATTLIST quaternion z CDATA #REQUIRED>
00107               <!ATTLIST quaternion angle CDATA #REQUIRED>
00108         <!-- A body is added to an object for physics modeling. If an object
00109         doesn't have a body, then it is completely stationary as though it
00110         were un-effected by gravity and other objects. If an object is meant
00111         to be stationary (like a wall or the floor) then it shouldn't have a
00112         body. -->
00113         <!ELEMENT body (mass)>
00114           <!-- A body must have one mass. The mass can be made up of other
00115           masses, be one of the pre-defined types (box, sphere,
00116           cylinder, and capped cylinder), or a generic center of mass and
00117           moment of inertia matrix. All of the masses are added to the body
00118           recursively. At each level, the total mass can be set, this will
00119           set the mass of all the items include in that mass to the given
00120           value
00121           -->
00122           <!ELEMENT mass ((mass*|mass_shape|mass_struct), transform?)>
00123             <!ATTLIST mass total CDATA #IMPLIED>
00124             <!-- A mass shape is a pre-defined mass distribution. By default,
00125             we assume that a mass distribution has a density of 1.0 unless
00126             the density or total mass is defined. The mass shapes are defined
00127             exactly like the geometries with the same name -->
00128             <!ELEMENT mass_shape (box|sphere)>
00129               <!ATTLIST mass_shape density CDATA "1.0">
00130               <!ATTLIST mass_shape total CDATA #IMPLIED>
00131             <!-- A mass struct allows you to set the exact center and moment
00132             of inertia matrix of the mass. Use this if your mass doesn't look
00133             like one of the pre-defined types. The center of mass and inertia
00134             maxtix must be given. The inertia matrix is defined as
00135             ( m00, m01, m02 )
00136             ( m10, m11, m12 )
00137             ( m20, m21, m22 )
00138             However, you only specify the upper right and diagonal portion of
00139             the matrix since it is symetric
00140             -->
00141             <!ELEMENT mass_struct (center, inertia)>
00142               <!ATTLIST mass_struct total CDATA #REQUIRED>
00143               <!ELEMENT center EMPTY>
00144                 <!ATTLIST center x CDATA #REQUIRED>
00145                 <!ATTLIST center y CDATA #REQUIRED>
00146                 <!ATTLIST center z CDATA #REQUIRED>
00147               <!ELEMENT inertia EMPTY>
00148                 <!ATTLIST inertia m00 CDATA #REQUIRED>
00149                 <!ATTLIST inertia m01 CDATA #REQUIRED>
00150                 <!ATTLIST inertia m02 CDATA #REQUIRED>
00151                 <!ATTLIST inertia m11 CDATA #REQUIRED>
00152                 <!ATTLIST inertia m12 CDATA #REQUIRED>
00153                 <!ATTLIST inertia m22 CDATA #REQUIRED>
00154     <!-- Joints are connections between bodies. Geometries without a body are
00155     immobile so there is no point connecting them with a joint. However, a
00156     single body can be connected with a joint. The other body is considered to
00157     be a fixed point. Joints must be defined after the objects they are
00158     connecting -->
00159     <!ELEMENT joint (hinge|ball|slider)>
00160       <!ATTLIST joint name CDATA #REQUIRED>
00161       <!ATTLIST joint body1 CDATA #REQUIRED>
00162       <!ATTLIST joint body2 CDATA #IMPLIED>
00163       <!-- The range of a joint can be set, along with the maximum amount of
00164       force that this moter can apply. Note that this only applies to a moter,
00165       and even for them, the maximum can be exceded if needed to maintain the
00166       low and high stop points. -->
00167       <!ELEMENT hinge (position, axis)>
00168         <!ATTLIST hinge lowstop CDATA #IMPLIED>
00169         <!ATTLIST hinge highstop CDATA #IMPLIED>
00170         <!ATTLIST hinge force CDATA #IMPLIED>
00171         <!ATTLIST hinge velocity CDATA #IMPLIED>
00172         <!ELEMENT axis EMPTY>
00173           <!ATTLIST axis x CDATA #REQUIRED>
00174           <!ATTLIST axis y CDATA #REQUIRED>
00175           <!ATTLIST axis z CDATA #REQUIRED>
00176       <!ELEMENT ball (position)>
00177       <!ELEMENT slider (position, axis)>

Generated on Sat Dec 3 10:47:41 2005 for Robotics by  doxygen 1.4.5