scenic.simulators.gta.interface¶
Python supporting code for the GTA model.
Summary of Module Members¶
Classes
A car color as an RGB tuple. |
|
Mutator that adds Gaussian HSL noise to the |
|
A model of car in GTA. |
|
|
|
Represents roads and obstacles in GTA, extracted from a map image. |
|
Workspace whose rendering is handled by a Map |
|
A distribution given by HSL noise around a base color. |
Member Details¶
-
class
Map
(imagePath, Ax, Ay, Bx, By)[source]¶ Bases:
object
Represents roads and obstacles in GTA, extracted from a map image.
This code handles images from the GTA V Interactive Map, rendered with the “Road” setting.
- Parameters
imagePath (str) – path to image file
Ax (float) – width of one pixel in GTA coordinates
Ay (float) – height of one pixel in GTA coordinates
Bx (float) – GTA X-coordinate of bottom-left corner of image
By (float) – GTA Y-coordinate of bottom-left corner of image
-
class
MapWorkspace
(mappy, region)[source]¶ Bases:
scenic.core.workspaces.Workspace
Workspace whose rendering is handled by a Map
-
class
CarModel
(name, width, height, viewAngle=1.5707963267948966)[source]¶ Bases:
object
A model of car in GTA.
- Attributes
name (str) – name of model in GTA
width (float) – width of this model of car
height (float) – height of this model of car
viewAngle (float) – view angle in radians (default is 90 degrees)
- Class Attributes
models – dict mapping model names to the corresponding
CarModel
-
class
CarColor
[source]¶ Bases:
scenic.simulators.gta.interface.CarColor
A car color as an RGB tuple.
-
static
defaultColor
()[source]¶ Default color distribution for cars.
The distribution starts with a base distribution over 9 discrete colors, then adds Gaussian HSL noise. The base distribution uses color popularity statistics from a 2012 DuPont survey.
-
static
-
class
NoisyColorDistribution
(baseColor, hueNoise, satNoise, lightNoise)[source]¶ Bases:
scenic.core.distributions.Distribution
A distribution given by HSL noise around a base color.
- Parameters
baseColor (RGB tuple) – base color
hueNoise (float) – noise to add to base hue
satNoise (float) – noise to add to base saturation
lightNoise (float) – noise to add to base lightness
-
class
CarColorMutator
[source]¶ Bases:
scenic.core.object_types.Mutator
Mutator that adds Gaussian HSL noise to the
color
property.