Interface to Webots for dynamic simulations.

This interface is intended to be instantiated from inside the controller script of a Webots Robot node with the supervisor field set to true. Such a script can create a WebotsSimulator (passing in a reference to the supervisor node) and then call its simulate method as usual to run a simulation. For an example, see examples/webots/generic/controllers/

Scenarios written for this interface should use our generic Webots world model scenic.simulators.webots.model or a model derived from it. Objects which are instances of WebotsObject will be matched to Webots nodes; see the model documentation for details.

Summary of Module Members



Simulation object for Webots.


Simulator object for Webots.

Member Details

class WebotsSimulator(supervisor)[source]

Bases: Simulator

Simulator object for Webots.


supervisor – Supervisor node handle from the Webots Python API.

class WebotsSimulation(scene, supervisor, verbosity=0, coordinateSystem=<scenic.simulators.webots.utils.WebotsCoordinateSystem object>)[source]

Bases: Simulation

Simulation object for Webots.


supervisor – Webots supervisor node used for the simulation. This is exposed for the use of scenarios which need to call Webots APIs directly; e.g. simulation().supervisor.setLabel(...).