Fixing some format issues

This commit is contained in:
felipecode 2018-01-17 14:06:29 +01:00
parent 388a8060d7
commit bad04d82da
3 changed files with 8 additions and 10 deletions

View File

@ -7,7 +7,7 @@
# For a copy, see <https://opensource.org/licenses/MIT>. # For a copy, see <https://opensource.org/licenses/MIT>.
from builtins import input from builtins import input_data
import csv import csv
import datetime import datetime
@ -269,12 +269,11 @@ class Benchmark(object):
# Make a date file: to show when this was modified, # Make a date file: to show when this was modified,
# the number of times the experiments were run # the number of times the experiments were run
now = datetime.datetime.now() now = datetime.datetime.now()
with open(os.path.join(full_name, open(os.path.join(full_name, now.strftime("%Y%m%d%H%M"))).close()
now.strftime("%Y%m%d%H%M")), 'w') as f:
pass
return suffix_name, full_name return suffix_name, full_name
def _continue_experiment(self, continue_experiment): def _continue_experiment(self, continue_experiment):
if self._experiment_exist(): if self._experiment_exist():
@ -284,7 +283,7 @@ class Benchmark(object):
else: else:
# Ask question, to avoid mistaken override situations # Ask question, to avoid mistaken override situations
answer = input("The experiment was already found in the files" answer = input_data("The experiment was already found in the files"
+ ", Do you want to continue (y/n)? \n" + ", Do you want to continue (y/n)? \n"
) )
if answer == 'Yes' or answer == 'y': if answer == 'Yes' or answer == 'y':

View File

@ -1,11 +1,10 @@
from carla.settings import CarlaSettings from carla.settings import CarlaSettings
from carla.sensor import Camera
class Experiment(object): class Experiment(object):
def __init__(self, **kwargs): def __init__(self):
self.Id = '' self.Id = ''
self.Conditions = CarlaSettings() self.Conditions = CarlaSettings()
self.Poses = [[]] self.Poses = [[]]

View File

@ -10,9 +10,9 @@ def compare(x, y):
return collections.Counter(x) == collections.Counter(y) return collections.Counter(x) == collections.Counter(y)
"""
Constants Used for the high level commands # Constants Used for the high level commands
"""
REACH_GOAL = 0.0 REACH_GOAL = 0.0
GO_STRAIGHT = 5.0 GO_STRAIGHT = 5.0