scenic.simulators.webots.model

Generic Scenic world model for the Webots simulator.

Summary of Module Members

Classes

Ground

Special kind of object representing a (possibly irregular) ground surface.

Hill

Terrain shaped like a Gaussian.

Terrain

Abstract class for objects added together to make a Ground.

WebotsObject

Abstract class for Webots objects.

Member Details

class WebotsObject(<specifiers>)[source]

Bases: scenic.core.object_types.Object

Abstract class for Webots objects.

The webotsName property must be set to the name of the Webots node to use for this object, which must already exist in the world loaded into Webots.

Also defines the elevation property as a standard way to access the Y component of an object’s position, since the Scenic built-in property position is only 2D. If elevation is set to None, it will be updated to the object’s Y coordinate in Webots when the simulation starts.

Properties
  • elevation (float or None; dynamic) – default None (see above).

  • requireVisible (bool) – Default value False (overriding the default from Object).

  • webotsName (str) – ‘DEF’ name of the Webots node to use for this object.

  • webotsObject – Is set at runtime to a handle to the Webots node for the object, for use with the Supervisor API. Primarily for internal use.

  • controller (str or None) – name of the Webots controller to use for this object, if any (instead of a Scenic behavior).

  • resetController (bool) – Whether to restart the controller for each simulation (default True).

  • positionOffset (Vector) – Offset to add when computing the object’s position in Webots; for objects whose Webots translation field is not aligned with the center of the object.

class Ground(<specifiers>)[source]

Bases: scenic.simulators.webots.model.WebotsObject

Special kind of object representing a (possibly irregular) ground surface.

Implemented using an ElevationGrid node in Webots.

Attributes
  • allowCollisions (bool) – default value False (overriding default from Object).

  • webotsName (str) – default value ‘Ground’

class Terrain(<specifiers>)[source]

Bases: scenic.core.object_types.Object

Abstract class for objects added together to make a Ground.

This is not a WebotsObject since it doesn’t actually correspond to a Webots node. Only the overall Ground has a node.

class Hill(<specifiers>)[source]

Bases: scenic.simulators.webots.model.Terrain

Terrain shaped like a Gaussian.

Attributes
  • height (float) – height of the hill (default 1).

  • spread (float) – standard deviation as a fraction of the hill’s size (default 3).