Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions donkeycar/templates/complete.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,13 @@ def drive(cfg, model_path=None, use_joystick=False, model_type=None,
#if we also try to use cuda. so disable for donkey_gym.
os.environ["CUDA_VISIBLE_DEVICES"]="-1"

train_localizer = getattr(cfg, 'TRAIN_LOCALIZER', False)
train_behaviors = getattr(cfg, 'TRAIN_BEHAVIORS', False)

if model_type is None:
if cfg.TRAIN_LOCALIZER:
if train_localizer:
model_type = "localizer"
elif cfg.TRAIN_BEHAVIORS:
elif train_behaviors:
model_type = "behavior"
else:
model_type = cfg.DEFAULT_MODEL_TYPE
Expand Down Expand Up @@ -394,7 +397,7 @@ def run(self, *components):
#
outputs = ['pilot/angle', 'pilot/throttle']

if cfg.TRAIN_LOCALIZER:
if train_localizer:
outputs.append("pilot/loc")

#
Expand Down
2 changes: 1 addition & 1 deletion donkeycar/tests/test_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_config():


def test_drive():
path = default_template(d2_path(gettempdir()))
path = custom_template(d2_path(gettempdir()), template="complete")
myconfig = open(os.path.join(path, 'myconfig.py'), "wt")
myconfig.write("CAMERA_TYPE = 'MOCK'\n")
myconfig.write("USE_SSD1306_128_32 = False \n")
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ donkey = "donkeycar.management.base:execute_from_command_line"
[project.urls]
Homepage = "https://github.com/autorope/donkeycar"

[tool.pytest.ini_options]
norecursedirs = ["scripts"]

[tool.setuptools.dynamic]
version = {attr = "donkeycar.__version__"}

Expand Down
Loading