Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Standard Donkeycar Config
DRIVE_LOOP_HZ = 50 # the vehicle loop will pause if faster than this speed.
MAX_LOOPS = None # the vehicle loop can abort after this many iterations, when given a positive integer.
IMAGE_W = 224
IMAGE_H = 224
IMAGE_DEPTH = 3 # default RGB=3, make 1 for mono
#9865, over rides only if needed, ie. TX2..
PCA9685_I2C_ADDR = 0x40 # I2C address, use i2cdetect to validate this number
PCA9685_I2C_BUSNUM = 0 # None will auto detect, which is fine on the pi. But other platforms should specify the bus num.
USE_SSD1306_128_32 = True # Enable the SSD_1306 OLED Display
SSD1306_128_32_I2C_BUSNUM = 1 # I2C bus number
#SERVO_HBRIDGE_PWM use ServoBlaster to output pwm control from the PiZero directly to control steering, and HBridge for a drive motor.
DEFAULT_MODEL_TYPE = 'linear' #(linear|categorical|rnn|imu|behavior|3d|localizer|latent|transfer|inferred)
BATCH_SIZE = 128 #how many records to use when doing one pass of gradient decent. Use a smaller number if your gpu is running out of memory.
TRAIN_TEST_SPLIT = 0.8 #what percent of records to use for training. the remaining used for validation.
MAX_EPOCHS = 100 #how many times to visit all records of your data
SHOW_PLOT = True #would you like to see a pop up display of final loss?
VERBOSE_TRAIN = True #would you like to see a progress bar with text during training?
USE_EARLY_STOP = True #would you like to stop the training if we see it's not improving fit?
EARLY_STOP_PATIENCE = 5 #how many epochs to wait before no improvement
MIN_DELTA = .0005 #early stop will want this much loss change before calling it improved.
PRINT_MODEL_SUMMARY = True #print layers and weights to stdout
CACHE_IMAGES = False #keep images in memory. will speed succesive epochs, but crater if not enough mem.
USE_JOYSTICK_AS_DEFAULT = True #when starting the, when True, will not require a --js option to use the joystick
JOYSTICK_MAX_THROTTLE = 0.85 #this scalar is multiplied with the -1 to 1 throttle value to limit the maximum throttle. This can help if you drop the controller or just don't need the full speed available.
JOYSTICK_STEERING_SCALE = 1.0 #some people want a steering that is less sensitve. This scalar is multiplied with the steering -1 to 1. It can be negative to reverse dir.
AUTO_RECORD_ON_THROTTLE = True #if true, we will record whenever throttle is not zero. if false, you must manually toggle recording with some other trigger. Usually circle button on joystick.
CONTROLLER_TYPE = 'xbox' #(ps3|ps4|xbox|nimbus|wiiu|F710|rc3)
JOYSTICK_DEADZONE = 0.01 # when non zero, this is the smallest throttle before recording triggered.
JOYSTICK_THROTTLE_DIR = 1.0 # use -1.0 to flip forward/backward, use 1.0 to use joystick's natural forward/backward
# #When racing, to give the ai a boost, configure these values.
# AI_LAUNCH_DURATION = 0.0 # the ai will output throttle for this many seconds
# AI_LAUNCH_THROTTLE = 0.0 # the ai will output this throttle value
# AI_LAUNCH_ENABLE_BUTTON = 'R2' # this keypress will enable this boost. It must be enabled before each use to prevent accidental trigger.
# AI_LAUNCH_KEEP_ENABLED = False # when False ( default) you will need to hit the AI_LAUNCH_ENABLE_BUTTON for each use. This is safest. When this True, is active on each trip into "local" ai mode.
# #Scale the output of the throttle of the ai pilot for all model types.
AI_THROTTLE_MULT = 1.0 # this multiplier will scale every throttle value for all output from NN models
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment