diff --git a/behavior_metrics/driver.py b/behavior_metrics/driver.py index cda07220..fbe4703c 100644 --- a/behavior_metrics/driver.py +++ b/behavior_metrics/driver.py @@ -26,7 +26,7 @@ from utils.configuration import Config from utils.controller import Controller from utils.logger import logger -from utils.random_initializer import tmp_random_initializer +from utils.tmp_world_generator import tmp_world_generator __author__ = 'fqez' __contributors__ = [] @@ -175,7 +175,7 @@ def main(): if app_configuration.current_world and not config_data['script']: logger.debug('Launching Simulation... please wait...') if config_data['random']: - tmp_random_initializer(app_configuration.current_world, app_configuration.stats_perfect_lap, + tmp_world_generator(app_configuration.current_world, app_configuration.stats_perfect_lap, app_configuration.real_time_update_rate, randomize=True, gui=True, launch=False) app_configuration.current_world = 'tmp_circuit.launch' diff --git a/behavior_metrics/utils/script_manager.py b/behavior_metrics/utils/script_manager.py index 222b8aae..322a3c94 100644 --- a/behavior_metrics/utils/script_manager.py +++ b/behavior_metrics/utils/script_manager.py @@ -29,7 +29,7 @@ from utils.logger import logger from utils.constants import MIN_EXPERIMENT_PERCENTAGE_COMPLETED, CIRCUITS_TIMEOUTS from pilot import Pilot -from utils.random_initializer import tmp_random_initializer +from utils.tmp_world_generator import tmp_world_generator from rosgraph_msgs.msg import Clock @@ -39,7 +39,7 @@ def run_brains_worlds(app_configuration, controller, randomize=False): for brain_counter, brain in enumerate(app_configuration.brain_path): repetition_counter = 0 while repetition_counter < app_configuration.experiment_repetitions: - tmp_random_initializer(world, app_configuration.stats_perfect_lap[world_counter], + tmp_world_generator(world, app_configuration.stats_perfect_lap[world_counter], app_configuration.real_time_update_rate, randomize=randomize, gui=False, launch=True) pilot = Pilot(app_configuration, controller, app_configuration.brain_path[brain_counter]) diff --git a/behavior_metrics/utils/random_initializer.py b/behavior_metrics/utils/tmp_world_generator.py similarity index 97% rename from behavior_metrics/utils/random_initializer.py rename to behavior_metrics/utils/tmp_world_generator.py index 811a747a..95b81450 100644 --- a/behavior_metrics/utils/random_initializer.py +++ b/behavior_metrics/utils/tmp_world_generator.py @@ -33,7 +33,7 @@ from utils.logger import logger -def tmp_random_initializer(current_world, stats_perfect_lap, real_time_update_rate, randomize=False, gui=False, +def tmp_world_generator(current_world, stats_perfect_lap, real_time_update_rate, randomize=False, gui=False, launch=False): environment.close_gazebo() tree = ET.parse(current_world)