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.46 WorldInfo

WorldInfo {
  SFString   title            ""
  MFString   info             []
  SFVec3f    gravity          0 -9.81 0
  SFFloat    CFM              0.00001  # [0,inf)
  SFFloat    ERP              0.2      # [0,1]
  SFString   physics          ""
  SFString   fast2d           ""
  SFFloat    basicTimeStep    32       # in ms
  SFInt      displayRefresh   2        # multiplied by basicTimeStep
  SFBool     runRealTime      FALSE    # FALSE: run as fast as possible
  SFFloat    inkEvaporation   0        # make ground textures evaporate
}

The WorldInfo node provides general information on the simulated world:

  • The title field should briefly describe the purpose of the world.

  • The info field should give additional information, like the author who created the world, the date of creation and a description of the purpose of the world. Several character strings can be used.

  • The gravity field defines the gravitational acceleration to be used in physics simulation. The gravity is set by default to the gravity found on earth. You should change it if you want to simulate rover robots on Mars, for example.

  • The CFM and ERP fields correspond to the physics simulation world parameters used by ODE. See the ODE documentation for more details of these parameters.

  • The physics field refers to a plugin which allows the user to define custom physics properties using the ODE API. See chapter 5 for a description on how to set up a custom physics plugin. This is especially useful for modeling hydrodynamic forces, wind, non-uniform friction, etc.

  • The fast2d field allows the user to switch to Fast2d mode. If the fast2d field is not empty, Webots tries to load a Fast2d plugin with the given name. Subsequent kinematics, collision detection, and sensor measurements are computed using the plugin. The objective is to carry out these calculations using a simple 2D world model that can be computed faster than the 3D equivalent. The Webots distribution comes with a pre-programmed plugin called "enki." In addition, a Webots user can implement his own plugin. However, Fast2d mode is limited to simple world models containing only cylindrical and rectangular shapes. The Webots distribution contains an example of world using Fast2d: khepera_fast2d.wbt (located in the projects/robots/khepera/worlds directory of Webots). For more information on the Fast2d plugin, please refer to chapter 6 .

  • The basicTimeStep field defines the duration of the simulation step executed by Webots. It is a floating point value expressed in milliseconds. The minimum value for this parameter is 0.001, that is, one microsecond. Setting this field to a high value will accelerate the simulation, but will decrease the accuracy, especially for physics simulation and collision detection.

  • The displayRefresh field is multiplied by the basicTimeStep value to define how frequently the 3D display of the main window is refreshed in normal Run mode.

  • If the runRealTime field is set to TRUE, it will slow down the simulation as necessary, such that it runs in approximately real time. Webots will sleep for a number of milliseconds at each time step, waiting for real time synchronization. In cases where the simulation cannot run faster than real time, this field will have no effect on the simulation speed. Setting the runRealTime field to FALSE will make Webots run as fast as possible in both Run and Fast simulation modes.

  • If the inkEvaporation field is set to a non-null value, the colors of the ground textures will slowly turn to white. This is useful on a white-textured ground in conjunction with a Pen device, in order to have the track drawn by the Pen device disappear progressively. The inkEvaporation field should be a positive floating point value defining the speed of evaporation. This evaporation process is a computationally expensive task, hence the ground textures are updated only every WorldInfo.basicTimeStep * WorldInfo.displayRefresh milliseconds (even in fast mode). Also, it is recommended to use ground textures with low resolution to speed up this process. As with the pen device, the modified ground textures can be seen only through infra-red distance sensors, and not through cameras (as the ground textures are not updated on the controller side).

previous page go up next page
^ page top ^

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