Objects and Classes Reference¶
The documentation given here describes only the public properties and methods provided by the built-in classes.
If you are working on Scenic’s internals, you can find more complete documentation in the
<class> [<specifier> [, <specifier>]*]
Instantiates a Scenic object from a Scenic class. The properties of the object are determined by the given set of zero or more specifiers. For details on the available specifiers and how they interact, see the Specifiers Reference.
Instantiating an instance of Object has a side effect: the object is added to the scenario being defined.
Names of Scenic classes followed immediately by punctuation are not considered instance creations.
This allows us to refer to a Scenic class without creating an instance of that class in the environment, which is useful for expressions like
Locations in space.
This class provides the fundamental property
position and several associated properties.
- class Point(<specifiers>)
The Scenic base class
The default mutator for Point adds Gaussian noise to
positionwith a standard deviation given by the
position (Vector; dynamic) – Position of the point. Default value is the origin.
visibleDistance (float) – Distance for
can seeoperator. Default value 50.
width (float) – Default value zero (only provided for compatibility with operators that expect an Object).
length (float) – Default value zero.
mutationScale (float) – Overall scale of mutations, as set by the
mutatestatement. Default value zero (mutations disabled).
positionStdDev (float) – Standard deviation of Gaussian noise to add to this object’s
positionwhen mutation is enabled with scale 1. Default value 1.
A location along with an orientation, defining a local coordinate system.
This class subclasses Point, adding the fundamental property
heading and several associated properties.
- class OrientedPoint(<specifiers>)
The Scenic class
heading (float; dynamic) – Heading of the OrientedPoint. Default value 0 (North).
viewAngle (float) – View cone angle for
can seeoperator. Default value 2π.
headingStdDev (float) – Standard deviation of Gaussian noise to add to this object’s
headingwhen mutation is enabled with scale 1. Default value 5°.
A physical object. This class subclasses OrientedPoint, adding a variety of properties including:
lengthto define the bounding box of the object;
regionContainedInto control the built-in requirements that apply to the object;
behavior, specifying the object’s dynamic behavior if any;
velocity, and other properties capturing the dynamic state of the object during simulations.
The built-in requirements applying to each object are:
The object must be visible from the ego object, unless its
requireVisibleproperty is set to
The object must not intersect another object (i.e., their bounding boxes must not overlap), unless either of the two objects has their
allowCollisionsproperty set to
- class Object(<specifiers>)
The Scenic class
This is the default base class for Scenic classes.
width (float) – Width of the object, i.e. extent along its X axis. Default value 1.
length (float) – Length of the object, i.e. extent along its Y axis. Default value 1.
allowCollisions (bool) – Whether the object is allowed to intersect other objects. Default value
requireVisible (bool) – Whether the object is required to be visible from the
egoobject. Default value
cameraOffset (Vector) – Position of the camera for the
can seeoperator, relative to the object’s
speed (float; dynamic) – Speed in dynamic simulations. Default value 0.
velocity (Vector; dynamic) – Velocity in dynamic simulations. Default value is the velocity determined by
angularSpeed (float; dynamic) – Angular speed in dynamic simulations. Default value 0.
behavior – Behavior for dynamic agents, if any (see Dynamic Scenarios). Default value
Hook called at the beginning of each dynamic simulation.
Does nothing by default; provided for objects to do simulator-specific initialization as needed.
- property visibleRegion
The visible region of this object.
The visible region of an Object is a circular sector as for OrientedPoint, except that the base of the sector may be offset from
cameraOffsetproperty (to allow modeling cameras which are not located at the center of the object).