Webots Reference Manual

previous page go up next page

Thanks

1. Introduction

2. Node Chart

3. Nodes and API Functions

4. Prototypes

5. Physics Plugin

6. Fast2D Plugin

7. MTN Functions

8. Webots World Files

     

3.38 Solid

Derived from Transform.

Solid {
  SFString   name             ""
  SFString   model            ""
  SFString   author           ""
  SFString   constructor      ""
  SFString   description      ""
  SFNode     boundingObject   NULL
  SFNode     physics          NULL
  SFBool     locked           FALSE
}

Direct derived nodes: Accelerometer, Charger, HyperGate, Emitter, Gripper, LED, Pen, Robot, Camera, DistanceSensor, GPS, LightSensor, Servo, TouchSensor

3.38.1 Description

A Solid node is a group of shapes that you can drag and drop in the world, using the mouse. Sensors on robots and the collision detector of the simulator operate on the boundingObject of Solid nodes.

3.38.2 Solid Fields

Note that in the Solid node, the scale field inherited from the Transform node should always remain 1 1 1 in order to avoid problems with collision detection.

  • name: name of the solid (e.g.: "my blue chair"). Corresponds to the argument used by robot_get_device().

  • model: generic name of the solid (e.g.: "chair").

  • author: name of the author of the simulation model of the solid.

  • constructor: name of the company or individual who made the real solid.

  • description: short description (1 line) of the solid.

  • boundingObject: The bounding object defines the shape used for collision detection. The boundingObject of a Solid should contain either: (1) a Box node, (2) a Cylinder node (a flat end cylinder, not a capped cylinder), (3) a Sphere node, (4) an IndexedFaceSet node, (5) a Shape node containing one of the above nodes as a geometry, (6) a Transform node with a single children node being one of the above nodes and the scale field set to 1 1 1, or (7) a Group node with several children, each being one of the above mentioned nodes.

    In case the physics field is not NULL, and the boundingObject is a Transform node, this Transform defines the position of the center of mass of the Solid node. Moreover, if the Physics node defines an inertiaMatrix, then the orientation of this inertia matrix is also affected by the orientation field of the Transform node.

    In the case of an IndexedFaceSet, two different options are possible: The first option is an indexed face set with a single quadrilateral face which defines a plane. This plane is considered as infinite by the collision detection engine. This option should be used to model a flat floor, as in boebot.wbt (located in the projects/robots/boebot/worlds directory of Webots). The second option is an indexed face set of triangles defining a triangle mesh (or trimesh). Such indexed face sets can be easily exported from most 3D modeling software after performing a conversion to a triangle mesh. This option should be used to model rough terrain, as in aibo_ers210_rough.wbt (located in the projects/robots/aibo/worlds directory of Webots) or to model complex 3D objects.

    The bounding object is also used to automatically compute the inertia matrix of a Solid from its physics field. Please note however that the center of mass of the Solid node always remains the same as the origin of the node (defined by the translation and rotation fields) regardless of what is defined in the bounding object. If this field is left to NULL, no collision detection and no physics computation is performed.

  • physics: this field can be set in order to model the physical properties of a Solid object. In this case, it contains a Physics node. This can be used, for example, when implementing a robot pushing an object like a ball. In this case, both the robot and the ball should have a Physics node in their physics field.

  • locked: if TRUE, the solid object cannot be moved using the mouse. This is useful to prevent moving an object by mistake.

previous page go up next page
^ page top ^

  E-mail to webmaster Last updated: Copyright © 2008 Cyberbotics Ltd.