diff --git a/behavior_metrics/brains/brains_handler.py b/behavior_metrics/brains/brains_handler.py index 3bbaaf75..084c5dcf 100755 --- a/behavior_metrics/brains/brains_handler.py +++ b/behavior_metrics/brains/brains_handler.py @@ -34,9 +34,13 @@ def __init__(self, sensors, actuators, brain_path, controller, model=None, confi def load_brain(self, path, model=None): path_split = path.split("/") - robot_type = path_split[-2] + robot_type = path_split[1] module_name = path_split[-1][:-3] # removing .py extension - import_name = 'brains.' + robot_type + '.' + module_name + if len(path_split) == 4: + framework = path_split[2] + import_name = 'brains.' + robot_type + '.' + framework + '.' + module_name + else: + import_name = 'brains.' + robot_type + '.' + module_name if robot_type == 'CARLA': module = importlib.import_module(import_name) diff --git a/behavior_metrics/configs/default_carla.yml b/behavior_metrics/configs/default_carla.yml index a25024b3..65d11697 100644 --- a/behavior_metrics/configs/default_carla.yml +++ b/behavior_metrics/configs/default_carla.yml @@ -37,13 +37,13 @@ Behaviors: PilotTimeCycle: 50 # Turn up to reduce number of control decisions AsyncMode: True # Set to False to control simulator time Parameters: - Model: '20230724-125225_pilotnet_CARLA_19_05_dataset_bird_eye_300_epochs_no_flip_3_output_both_directions_all_towns_adam_AFFINE_OPTIMIZATION_PAPER_UPDATED_SHAPE_pretrained_cp.h5' + Model: 'pilotnet.h5' ImageCropped: True ImageSize: [ 200,66 ] ImageNormalized: True PredictionsNormalized: True GPU: True - UseOptimized: True + UseOptimized: False ImageTranform: '' Type: 'CARLA' Simulation: diff --git a/behavior_metrics/models/carla_tf_models/pilotnet.h5 b/behavior_metrics/models/carla_tf_models/pilotnet.h5 new file mode 100644 index 00000000..9cd17687 Binary files /dev/null and b/behavior_metrics/models/carla_tf_models/pilotnet.h5 differ diff --git a/behavior_metrics/models/carla_tf_models/pilotnet_model.pth b/behavior_metrics/models/carla_tf_models/pilotnet_model.pth new file mode 100644 index 00000000..0fa3fd2e Binary files /dev/null and b/behavior_metrics/models/carla_tf_models/pilotnet_model.pth differ