Webots User Guide - chapter 2 - section 3

Webots User Guide


2.3 The User Interface

Webots GUI is composed of four principal windows: the 3D window that displays and allows to interact with the 3D simulation, the Scene tree which is a hierarchical representation of the current world, the Text editor that allows to edit source code, and finally, the Console that displays both compilation and controller outputs.

main-window

Figure 2.1: Webots GUI

The GUI has nine menus: File, Edit, View, Simulation, Build, Robot, Tools, Wizards and Help.

2.3.1 File Menu

The File menu allows you to perform usual file operations: loading, saving, etc.

The New World menu item (and button) opens a new world in the simulation window containing only an ElevationGrid, displayed as a chessboard of 10 x 10 squares on a surface of 1 m x 1 m.

The Open World... menu item (and button) opens a file selection dialog that allows you to choose a .wbt file to load.

The Save World menu item (and button) saves the current world using the current filename (the filename that appears at the top of the main window). On each Save the content of the .wbt file is overwritten and no backup copies are created by Webots, therefore you should use this button carefully and eventually do safety copies manually.

The Save World As... menu item (and button) saves the current world with a new filename entered by the user. Note that a .wbt file should always be saved in a Webots project directory, and in the worlds subdirectory, otherwise it will not be possible to reopen the file.

The Revert World menu item (and button) reloads the current world from the saved version and restarts the simulation from the beginning.

The New Text File menu item (and button) opens an empty text file in the text editor.

The Open Text File... menu item (and button) opens a file selection dialog that allows you to choose a text file (for example a .java file) to load.

The Save Text File menu item (and button) saves the current text file.

The Save All Text Files menu item saves all the opened and unsaved text files.

The Save Text File As... menu item (and button) saves the current text file with a new filename entered by the user.

The Revert Text File menu item (and button) reloads the text file from the saved version.

The Print Preview... menu item opens a window allowing you to manage the page layout in order to print files from the text editor.

The Print... menu item opens a window allowing you to print the current file of the text editor.

The Import VRML 2.0... menu item adds VRML97 objects at the end of the scene tree. These objects come from a VRML97 file you must specify. This feature is useful for importing complex shapes that were modeled in a 3D modelling program, then exported to VRML97 (or VRML 2.0). Most 3D modelling software, like 3D Studio Max, Maya, AutoCAD, Pro Engineer, AC3D, or Art Of Illusion, include the VRML97 (or VRML 2.0) export feature. Be aware that Webots cannot import files in VRML 1.0 format. Once imported, these objects appear as Group, Transform or Shape nodes at the bottom of the scene tree. You can then either turn these objects into Webots nodes (like Solid, DifferentialWheels, etc.) or cut and paste them into the children list of existing Webots nodes.

The Export VRML 2.0... item allows you to save the currently loaded world as a .wrl file, conforming to the VRML97 standard. Such a file can, in turn, be opened with any VRML97 viewer. This is especially useful for publishing Webots-created worlds on the Web.

The Make Movie... item allows you to create MPEG movies (Linux and Mac OS X) or AVI movies (Windows).

The Take Screenshot... item allows you to take a screenshot of the current view in Webots. It opens a file dialog to save the current view as a PNG or JPG image.

The Quit Webots terminates the current simulation and closes Webots.

2.3.2 Edit Menu

The Edit menu provides usual text edition functions to manipulate files opened in the Text editor, such as Copy, Paste, Cut, etc.

2.3.3 View Menu

The View menu allows to control the viewing in the simulation window.

The Follow Object menu item allows to switch between a fixed (static) viewpoint and a viewpoint that follows a mobile object (usually a robot). If you want the viewpoint to follow an object, first you need to select the object with the mouse and then check the Follow Object menu item. Note that the Follow Object state is saved in the .wbt file.

The Restore Viewpoint item restores the viewpoint's position and orientation to their initial settings when the file was loaded or reverted. This feature is handy when you get lost while navigating in the scene, and want to return to the original viewpoint.

The Projection radio button group allows to choose between the Perspective Projection (default) and the Orthographic Projection mode for Webots simulation window. The perspective mode corresponds to a natural projection: in which the farther an object is from the viewer, the smaller it appears in the image. With the orthographic projection, the distance from the viewer does not affect how large an object appears. Furthermore, with the orthographic mode, lines which are parallel in the model are drawn parallel on the screen, therefore this projection is sometimes useful during the modelling phase. No shadows are rendered in the orthographic mode.

The Rendering radio button group allows to choose between the Regular Rendering (default), the High Quality Rendering and the Wireframe modes for Webots simulation window. In regular mode, the objects are rendered with their geometrical faces, materials, colors and textures, in the same way they are usually seen by an eye or a camera. The high quality mode is identical to the regular mode except the diffuse and specular lights are rendered per-pixel instead of per-vertex by using a shader. This rendering mode is slightly less efficient (if the shadows are activated) but is more realistic. In wireframe mode, only the segments of the renderable primitives are rendered. This mode can be useful to debug your meshes. If the wireframe mode and the View > Optional Rendering > Show All Bounding Objects toggle button are both activated, then only bounding objects are drawn (not the renderable primitives). This can be used to debug a problem with the collision detection.

Finally, the Optional Rendering submenu allows to display, or to hide, supplementary information. These rendering are displayed only in the main rendering and hide in the robot camera. They are used to understand better the behavior of the simulation.

The Show Coordinate System allows to display, or to hide, the global coordinate system at the bottom right corner of the 3D window as red, green and blue arrows representing the x, y and z axes respectively.

The Show All Bounding Objects allows to display, or to hide, all the bounding objects (defined in the boundingObject fields of every Solid node). Bounding objects are represented by white lines. These lines turn rose when a collision occurs.

The Show Contact Points allows to display, or to hide, the contact points generated by the collision detection engine. Contact points that do not generate a corresponding contact force are not shown. A contact force is generated only for objects simulated with physics (Physics node required). A step is required for taking this operation into account.

The Show Connector axes allows to display, or to hide, the connector axes. The rotation alignments are depicted in black while the y and z axes respectively in green and blue.

The Show Servo axes allows to display, or to hide, the servo axes. The servo axes are represented by black lines.

The Show Camera frustums allows to display, or to hide, the OpenGL culling frustum for every camera in the scene, using a magenta wire frame. The OpenGL culling frustum is a truncated pyramid corresponding to the field of view of a camera. The back of the pyramid is not represented because the far plane is set to infinity. More information about this concept is available in the OpenGL documentation.

The Show Distance Sensor rays allows to display, or to hide, the rays casted by the distance sensor devices. These rays are drawn as red lines (which become green beyond collision points). Their length corresponds to the maximum range of the device.

The Show Light Sensor rays allows to display, or to hide, the rays casted by the light sensor devices. These rays are drawn as yellow lines.

The Show Lights allows to display, or to hide, the lights (including PointLights and SpotLights). DirectionalLights aren't represented. PointLights and SpotLights are represented by a colored circle surrounded by a flare.

The Show Center Of Mass and Support Polygon allows to display, or to hide, both the global center of mass of a selected solid (with non NULL Physics node) and its support polygon. By support polygon we mean the projection of the convex hull of the solid's contact points on the horizontal plane which contains the lowest one. In addition, the projection of the center of mass in the latter plane is rendered in green if it lies inside the support polygon (static equilibrium), red otherwise. This rendering option can be activated only for solids with no other solid at their top.

2.3.4 Simulation Menu

The Simulation menu is used to control the execution of the simulation.

The Stop menu item (and button) pauses the simulation.

The Step menu item (and button) executes one basic time step of simulation. The duration of this step is defined in the basicTimeStep field of the WorldInfo node, and can be adjusted in the scene tree window to suit your needs.

The Real-time menu item (and button) runs the simulation at real-time until it is interrupted by Stop or Step. In run mode, the 3D display of the scene is refreshed every n basic time steps, where n is defined in the displayRefresh field of the WorldInfo node.

The Run menu item (and button) is like Real-time, except that it runs as fast as possible (Webots PRO only).

The Fast menu item (and button) is like Run, except that no graphical rendering is performed (Webots PRO only). As the graphical rendering is disabled (black screen) this allows for a faster simulation and therefore this is well suited for cpu-intensive simulations (genetic algorithms, vision, learning, etc.).

2.3.5 Build Menu

The Build menu provides the functionality to compile (or cross-compile) controller code. The build menu is described in more details here.

2.3.6 Robot Menu

The Robot menu is active only when a robot is selected in the 3D window or when there is only one robot in the simulation.

The Edit Controller menu item opens the source file of the controller of the selected robot.

The Show Robot Window menu item opens a Robot Window. The type of the window depends on the type of robot, in particular Webots has specific windows for e-puck, Khepera and Aibo robots. Each type of robot window allows some level of interaction with the robot sensors and actuators.

2.3.7 Tools Menu

The Tools menu allows you to open various Webots windows.

The Scene Tree menu item opens the Scene Tree window in which you can edit the virtual world. Alternatively it is also possible to double-click on some of the objects in the main window: this automatically opens the Scene Tree with the corresponding object selected.

The Text Editor menu item opens the Webots text editor. This editor can be used for editing and compiling controller source code.

The Console menu item opens the Webots Console, which is a read-only console that is used to display Webots error messages and controller outputs.

The Restore Layout menu item restores the factory layout of the panes of the main window.

The Clear Console menu item clears the console.

The Edit Physics Plugin menu item opens the source code of the physics plugin in the text editor.

The Preferences item pops up a window:

2.3.8 Wizards Menu

The Wizards menu makes it easier to create new projects and new controllers.

The New Project Directory... menu item first prompts you to choose a filesystem location and then it creates a project directory. A project directory contains several subdirectories that are used to store the files related to a particular Webots project, i.e. world files, controller files, data files, plugins, etc. Webots remembers the current project directory and automatically opens and saves any type of file from the corresponding subdirectory of the current project directory.

The New Robot Controller... menu item allows you to create a new controller program. You will first be prompted to choose between a C, C++, Java, Python or MATLABTM controller. Then, Webots will ask you to enter the name of your controller and finally it will create all the necessary files (including a template source code file) in your current project directory.

The New Physics Plugin... menu item will let you create a new physics plugin for your project. Webots asks you to choose a programming language (C or C++) and a name for the new physics plugin. Then it creates a directory, a template source code file and a Makefile in your current project.

2.3.9 Help menu

In the Help menu, the About... item opens the About... window that displays the license information.

The Webots Guided Tour... menu item starts a guided tour that demonstrates Webots capabilies through a series of examples.

The OpenGL Information... menu item gives you information about your current OpenGL hardware and driver. It can be used to diagnose rendering problems.

The remaining menu items bring up various information as indicated, in the form of HTML pages, PDF documents, etc.

2.3.10 Speedometer and Virtual Time

A speedometer (see figure 2.2) indicates the speed of the simulation on your computer. It is displayed on the 3D Window toolbar, and indicates how fast the simulation runs compared to real time. In other words, it represents the speed of the virtual time. If the value of the speedometer is 2, it means that your computer simulation is running twice as fast as the corresponding real robots would. This information is valid both in Run mode and Fast mode.

speedometer

Figure 2.2: Speedometer

To the left of the speedometer, the virtual time is displayed using following format:

H:MM:SS:MMM

where H is the number of hours (may be several digits), MM is the number of minutes, SS is the number of seconds, and MMM is the number of milliseconds (see figure 2.2). If the speedometer value is greater than one, the virtual time is progressing faster than real time.

The basic time step for simulation can be set in the basicTimeStep field of the WorldInfo node in the scene tree window. It is expressed in virtual time milliseconds. The value of this time step defines the length of the time step executed during the Step mode. This step is multiplied by the displayRefresh field of the same WorldInfo node to define how frequently the display is refreshed.

release 7.0.2
Copyright © 2012 Cyberbotics Ltd. All right reserved.