Skip to content

Commit afb04e6

Browse files
committed
Added CARLA examples for GUI pipelines
1 parent a80c972 commit afb04e6

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
*.max
6969

7070
*.h5
71+
*.pth
7172

7273
### Python ###
7374
# Byte-compiled / optimized / DLL files

behavior_metrics/brains/brains_handler.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,13 @@ def __init__(self, sensors, actuators, brain_path, controller, model=None, confi
3434
def load_brain(self, path, model=None):
3535

3636
path_split = path.split("/")
37-
robot_type = path_split[-2]
37+
robot_type = path_split[1]
3838
module_name = path_split[-1][:-3] # removing .py extension
39-
import_name = 'brains.' + robot_type + '.' + module_name
39+
if len(path_split) == 4:
40+
framework = path_split[2]
41+
import_name = 'brains.' + robot_type + '.' + framework + '.' + module_name
42+
else:
43+
import_name = 'brains.' + robot_type + '.' + module_name
4044

4145
if robot_type == 'CARLA':
4246
module = importlib.import_module(import_name)

behavior_metrics/configs/default_carla.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ Behaviors:
3737
PilotTimeCycle: 50 # Turn up to reduce number of control decisions
3838
AsyncMode: True # Set to False to control simulator time
3939
Parameters:
40-
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'
40+
Model: 'pilotnet.h5'
4141
ImageCropped: True
4242
ImageSize: [ 200,66 ]
4343
ImageNormalized: True
4444
PredictionsNormalized: True
4545
GPU: True
46-
UseOptimized: True
46+
UseOptimized: False
4747
ImageTranform: ''
4848
Type: 'CARLA'
4949
Simulation:
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)