Glossary
- action
A primitive operation executed by an agent during a single step of a dynamic simulation. For example, a car might take an action which sets its throttle, or turns on its headlights. Actions are defined by the simulator interfaces (or abstract domains like
scenic.domains.driving) as subclasses ofAction.- agent
A Scenic Object which has a dynamic behavior (set as its
behaviorproperty).- behavior
- dynamic behavior
A function defining the behavior of an agent during a simulation. The function runs in parallel with the simulation, taking actions at each time step. See our tutorial on Dynamic Scenarios for examples.
- container
The region specified as the
regionContainedInproperty of an Object, or the entire workspace if it isNone(the default). A built-in requirement enforces that objects are completely contained in their containers: so by default all objects fit into the workspace, and particular kinds of objects can define more stringent requirements by overridingregionContainedIn(e.g. making cars be on roads by default).- dynamic properties
Properties of Scenic objects which are updated at each time step of a dynamic simulation. The built-in properties representing positions, orientations, velocities, etc. are all dynamic (see Object). See the source code of
scenic.domains.driving.model.DrivingObjectfor an example of defining a dynamic property.- external parameters
Values which are determined by an external tool instead of Scenic’s own sampler. These allow using optimization or other techniques to explore parameters of Scenic scenarios beyond simple random sampling. For how to define external parameters or interface to new external samplers, see
scenic.core.external_params.- footprint
The infinite extrusion of a 2D Region in the positive and negative Z directions. Testing containment of an Object in a 2D region automatically uses its footprint, so that the object is considered contained if and only if its projection into the plane of the region is contained in the region. Footprints are represented internally by instances of the
PolygonalFootprintRegionclass, and can be accessed using thefootprintattribute.- global parameters
Parameters of a scene like weather or time of day which are not associated with any object. These are defined using the
paramstatement, and can be overridden from the command line with the--paramoption.- modular scenario
A scenario defined using the
scenariostatement (rather than simply being the content of a Scenic file). Such scenarios can take arguments, be instantiated multiple times, and be composed with other scenarios: see Composing Scenarios.- monitor
A function which runs in parallel with a simulation, rejecting or terminating the simulation if conditions of interest are met (using the
requireandterminatestatements). Monitors use similar syntax to dynamic behaviors, except that they are not associated with a specific Object and do not take actions (only usingwaitto advance time).- preferred orientation
A Vector Field set as the
orientationattribute of a Region, indicating that objects placed within that region should be oriented to align along that vector field unless otherwise specified. For example, theroadregion provided by the Driving Domain has as its preferred orientation theroadDirectionvector field, so that vehicles positioned using the specifieron roadwill be facing the nominal traffic direction at their position by default (but an explicitfacing Hspecifier will override it).- temporal requirement
A
requirestatement using one or more temporal operators (always,until, etc.) to impose a requirement over an entire simulation rather than just the generated scene. For example,require always Xrequires not only that the conditionXbe true in any scenes sampled from the scenario, but that it remain true at every time step of simulations run from those scenes.- visible region
The Region which is “visible” from a given Object. See the Visibility System reference for more details.
- workspace
The region of space in which a scenario takes place. Workspaces are represented as instances of the
Workspaceclass, which extends Region with additional methods for rendering schematics of scenes for debugging. The default workspace contains all space, so it puts no restrictions on the locations of objects. A world model can define a more specific workspace to exclude space occupied by fixed objects in the simulated world which aren’t otherwise known to Scenic (e.g. buildings in GTA V or CARLA).- world model
A Scenic library defining classes, regions, actions, helper functions, etc. for use by scenarios targeting a particular simulator or application domain. For example, the world model for the Driving Domain,
scenic.domains.driving.model, defines classes for vehicles, actions for steering, and regions for different parts of the road network. In the linenew Car in intersection, only thenewkeyword andinspecifier are built into Scenic: the classCarand the regionintersectionare defined by the world model. A world model can be used through themodelstatement, or simply by importing it like any other Scenic module.See also
Defining a World Model gives further examples and details on how to write a world model.