scenic.core.object_types¶
Implementations of the builtin Scenic classes.
Summary of Module Members¶
Functions





Classes
Mutator adding Gaussian noise to 

An object controlling how the 

Implementation of the Scenic class 

Implementation of the Scenic class 

Implementation of the Scenic base class 

Mutator adding Gaussian noise to 
Member Details¶
 class Mutator[source]¶
An object controlling how the
mutate
statement affects anObject
.A
Mutator
can be assigned to themutator
property of anObject
to control the effect of themutate
statement. When mutation is enabled for such an object using that statement, the mutator’sappliedTo
method is called to compute a mutated version.
 class PositionMutator(stddev)[source]¶
Bases:
scenic.core.object_types.Mutator
Mutator adding Gaussian noise to
position
. Used byPoint
. Attributes
stddev (float) – standard deviation of noise
 class HeadingMutator(stddev)[source]¶
Bases:
scenic.core.object_types.Mutator
Mutator adding Gaussian noise to
heading
. Used byOrientedPoint
. Attributes
stddev (float) – standard deviation of noise
 class Point(<specifiers>)[source]¶
Implementation of the Scenic base class
Point
.The default mutator for
Point
adds Gaussian noise toposition
with a standard deviation given by thepositionStdDev
property. Properties
Note
If you’re looking into Scenic’s internals, note that
Point
is actually a subclass of the internal Python class_Constructible
.
 class OrientedPoint(<specifiers>)[source]¶
Bases:
scenic.core.object_types.Point
Implementation of the Scenic class
OrientedPoint
.The default mutator for
OrientedPoint
adds Gaussian noise toheading
with a standard deviation given by theheadingStdDev
property, then applies the mutator forPoint
. Properties
heading (float; dynamic) – Heading of the
OrientedPoint
. Default value 0 (North).viewAngle (float) – View cone angle for
can see
operator. Default value \(2\pi\).
 class Object(<specifiers>)[source]¶
Bases:
scenic.core.object_types.OrientedPoint
Implementation of the Scenic class
Object
.This is the default base class for Scenic classes.
 Properties
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
False
.requireVisible (bool) – Whether the object is required to be visible from the
ego
object. Default valueTrue
.regionContainedIn (
Region
orNone
) – ARegion
the object is required to be contained in. IfNone
, the object need only be contained in the scenario’s workspace.cameraOffset (
Vector
) – Position of the camera for thecan see
operator, relative to the object’sposition
. Default0 @ 0
.speed (float; dynamic) – Speed in dynamic simulations. Default value 0.
velocity (
Vector
; dynamic) – Velocity in dynamic simulations. Default value is the velocity determined byself.speed
andself.heading
.angularSpeed (float; *dynamic*) – Angular speed in dynamic simulations. Default value 0.
behavior – Behavior for dynamic agents, if any (see Dynamic Scenarios). Default value
None
.
 class _Constructible(*args, _internal=False, **kwargs)[source]¶
Bases:
scenic.core.distributions.Samplable
Abstract base class for Scenic objects.
Scenic objects, which are constructed using specifiers, are implemented internally as instances of ordinary Python classes. This abstract class implements the procedure to resolve specifiers and determine values for the properties of an object, as well as several common methods supported by objects.