Skip to content

Commit

Permalink
Updated random initializer to world generator
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiopaniego committed Feb 8, 2022
1 parent 8f9a604 commit 46f5b53
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions behavior_metrics/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__ = []
Expand Down Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions behavior_metrics/utils/script_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 46f5b53

Please sign in to comment.