config module¶
Configuration classes for all of the components
-
class
config.
GUIConfig
[source]¶ Bases:
object
Configuration used by the
gui
moduletuple
attributes store main text at index 0, and tooltip text at index 1-
CompareText
= 'Compete with AUDRI'¶ (
str
) Text for the button in theMainFrame
, linking to theSimulator
in compare mode
-
ConfAppearance
= 'Appearance'¶ (
str
) Header text for the appearance parameters section in theConfigFrame
-
ConfBackground
= ('Scroll background', 'Whether the background should scroll down the window, as if the car\nis travelling down it\nDisable if you experience dizziness')¶
-
ConfCarScale
= ('Car scale', 'Multiplied against the normal size of the car sprite')¶
-
ConfCarSpeed
= ('Car speed', '(metres per second)\nThe forward speed of the main car')¶
-
ConfExperiment
= 'Experiment parameters'¶ (
str
) Header text for the experimental parameters section in theConfigFrame
-
ConfFPS
= ('Frames per second', 'Frame rate - how many times per second the screen is redrawn\nHigher values will likely result in more CPU usage')¶
-
ConfInnerPadding
= 15¶ (
int
) Padding between labels and their connected control in theConfigFrame
-
ConfObstFreq
= ('Obstacle frequency', '(seconds)\nTime between obstacles spawning')¶
-
ConfObstScale
= ('Obstacle scale', 'Multiplied against the normal size of the obstacle sprites')¶
-
ConfObstSpeed
= ('Obstacle speed', '(metres per second)\nThe forward speed of the obstacle vehicles\nMust be smaller than car speed')¶
-
ConfOffroad
= ('Allow the car to drive offroad', 'If checked, the main car will be able to use the offroad areas to avoid vehicles')¶
-
ConfRandomSeed
= ('Random seed', 'The value used to control pseudo-random number generation')¶
-
ConfRecordFreq
= ('Snapshot interval', 'Gap in seconds between recordings of the state of the simulation')¶
-
ConfRowPadding
= 10¶
-
ConfSave
= ('Save', 'Save configuration and return to the main menu')¶
-
ConfText
= 'Configuration'¶ (
str
) Text for the button in theMainFrame
, linking to theConfigFrame
-
ConfTickrate
= ('Tickrate', 'Tick rate - how many times per second the game logic should run\nLower values will impact expermiental accuracy\nHigher values will likely result in more CPU usage')¶
-
ConfTitle
= 'Configuration'¶ (
str
) Header text in theConfigFrame
-
DataText
= 'Gather training data'¶ (
str
) Text for the button in theMainFrame
, linking to theSimulator
in training mode
-
FontBold
= {'family': 'sans-serif', 'size': 10, 'weight': 'bold'}¶ (
dict
) Data used to create a bold font
-
FontHeading
= {'family': 'sans-serif', 'size': 15, 'weight': 'bold'}¶ (
dict
) Data used to create a header font
-
MainButtonXPad
= 15¶
-
MainButtonYPad
= 15¶
-
ModeText
= ['manual', 'AUDRI', 'compare']¶ list
ofstr
mapping simulator modes to a description of that mode, used bySimulatorPanel
-
SimPopupDupWarn
= 'This name is already in use, overwrite?'¶ Duplicate warning message in (
NameDatasetPopup
)
-
SimPopupPad
= 10¶ Padding in (
NameDatasetPopup
)
-
SimPopupText
= 'Choose a name for this training set'¶ Message in (
NameDatasetPopup
)
-
SimPopupTitle
= 'Name the training set'¶ Window title of the popup for naming a training set (
NameDatasetPopup
)
-
TestText
= 'Test AUDRI'¶
-
TooltipWidth
= 250¶
-
VisualiserWidth
= 500¶ (
int
) Width of thevisualiser.visualiser.SimulatorVisualiser
-
-
class
config.
SimulatorConfig
[source]¶ Bases:
object
Configuration used by the
visualiser
class-
ObstacleSpeed
= 8¶
-
RandomSeed
= 'geqJQD6MfJ'¶ Random seed used to influence when vehicles spawn Can be
int
,str
, and others. Seerandom.seed()
for details
-
-
class
config.
Singleton
[source]¶ Bases:
type
Metaclass that provides singleton behaviour
Author: Adam Forsyth <adam@adamforsyth.net> Source: https://stackoverflow.com/a/6798042