Webots

The webots dispatcher can be used to evaluate solutions in webots. The dispatcher will launch a webots process for each task it receives and runs the world file specified in the dispatcher settings. In your controller, you can make use of the optimization::Webots class (see liboptimization API documentation for more information) to extract the task description and setup your controller accordingly. The specific dispatcher settings for the webots dispatcher are listed in table 3.8.

Sometimes it might be necessary to change the world file according to your task description. To this end, a special setting is available (worldBuilderPath) which specifies an executable that will dynamically build the webots world file to use instead of specifying it in the world setting. The world builder executable will be executed before the webots process is executed and will receive the task description on standard in (just as for the dispatcher). It should then generate the world file and write the path to this world file on standard out. It can be useful to use the optimization::Dispatcher class (see liboptimization API documentation) to extract the task description. Note that if you use several worker processes, you should take care to generate unique world file names. The world files will be automatically removed after the task has been run.




Table 3.8: Webots Dispatcher Settings
Name Description
mode The mode in which to run webots (defaults to run):
  • run: start webots graphically and start running simulation
  • stop: start webots graphically but do not start running simulation
  • batch: start webots in batch mode ($ <$ 6.1.6)
  • minimize: start webots in minimize mode ($ >=$ 6.1.6)
world Absolute path to the webots world to run (required unless worldBuilderPath is used). In secure mode, the world must be owned by the user and must be in the users' home directory
webotsPath Path to the webots executable to use (optional)
webotsVersion The specific webots version to use. By default, the latest available webots version installed on the cluster is used. This version is occasionally updated (announced on the biorob mailing list). Currently available versions are: 6.1.5, 6.3.1, 6.3.3, 6.3.4 and 6.4.1 (this list can be out of date) (optional)
environment Comma separated list of key=value environment variables to set in the environment in which to execute webots (optional)
worldBuilderPath Path to the world builder to use to build to world before executing webots (optional)
   


Jesse van den Kieboom 2014-02-26