2.3 Main Window: Menus and buttonsThe main window displays the currently loaded virtual world. It has six menus: File, Simulation, View, Wizard, Tools and Help. There is also a toolbar with eight buttons which are shorcuts for some of the menu items:
Note that only seven of the eight buttons will be present simultaneously. 2.3.1 File MenuThe File menu allows you to perform the usual file operations: loading, saving, etc.
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 Animation... item allows you to create a 3D animation as a .wva file. This file format allows one to playback Webots animations in Webots Player. Webots Player is free and can be downloaded from the Cyberbotics website. Webots Player can show animations in 3D, allowing the user to watch from any angles. It can run as a plugin for Internet Explorer, Firefox or Mozilla, but also as a stand alone application. Webots Player works on Windows, Linux and Mac OS X. It is well suited to demonstrate Webots results, possibly on the Internet / World Wide Web. The Make Movie... item allows you to create an MPEG movie under Linux and Mac OS X, or an AVI movie under Windows. As these movies are created with 25 frame per second, you should adapt the basicTimeStep and the displayRefresh fields of the WorldInfo node in the Scene Tree window to obtain a movie running at real time. Leaving the basic time step at 32 ms and setting the display refresh to 1 basic simulation step will produce movies running slightly faster than real time. If you need exactly real time, set the basic time step to 25 ms (it might then be optimal to adapt your controllers' robot_step() functions using a multiple of 25, like 50, 75 or 100). It is also possible to make accelerated movies by setting the display refresh to 2 (or more) basic time steps, while leaving the basic time step at its original value (32 or 25). 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 image. The Quit Webots terminates the current simulation and closes Webots. 2.3.2 Simulation MenuThe Simulation menu is used to control the execution of the simulation.
The Show Robot Window item allows you to open a robot specific 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. This menu is disabled when no robot is currently selected. 2.3.3 View MenuThe View menu allows to control the viewing in the main 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 also restores the projection mode to perspective. This feature is handy when you get lost while navigating in the scene, and want to return to the original viewpoint. The Projection submenu allows to choose between the Perspective and the Orthographic projection mode for Webots main window. The perspective mode is the default; it 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 while creating a robot model. The Rendering submenu allows to choose between the Regular (the default) and the Bounding Objects rendering modes for Webots main 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. In Bounding Objects mode, only the bounding objects are rendered. This can be used to debug a problem with the collision detection. The Show Contact Points item allows to draw 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). 2.3.4 Wizard MenuThe Wizard 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 or a Python 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. 2.3.5 Tools MenuThe 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 open Webots text editor. This editor can be used for editing and compiling controller source code. The Log menu item opens Webots Log, which is a read-only console that is used to displays Webots error messages and controller output. The Upload to e-puck robot... menu item allows you to choose a Bluetooth connection and upload to an e-puck robot. The Preferences item pops up a window with two tabs:
2.3.6 Help menuIn 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 Register... item tells you your ComputerID and brings up Webots registration page. The OpenGL Information... menu item gives you information about your current OpenGL hardware and driver. It can be used to diagnose a rendering problems. The remaining menu items bring up various information as indicated, in the form of HTML pages, PDF documents, etc. 2.3.7 Speedometer and Virtual TimeA speedometer (see figure 2.2) allows you to observe the speed of the simulation on your computer. It is displayed on the bottom right hand side of the main window, 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. ![]() 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. 2.3.8 Selecting an objectA single mouse click on a solid object allows you to select this object. Selecting a robot enables the Robot View item in the simulation menu. Double-clicking on a solid object opens the scene tree window, in which the world and robots can be edited. The selected solid object appears selected in the scene tree window as well. 2.3.9 Navigation in the sceneThe view of the scene is generated by a virtual camera set in a given position and orientation. You can change this position and orientation to navigate in the scene by using the mouse buttons. The x, y, and z axes mentioned below correspond to the coordinate system of the camera; z is the axis corresponding to the direction the camera is pointing.
2.3.10 Moving a solid objectIn order to move an object, select the object, then hold the shift key down while using the mouse.
![]() ^ page top ^ |
| E-mail to webmaster | Last updated: | Copyright © 2008 Cyberbotics Ltd. |