Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions aw_scenario_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,22 +167,24 @@ def run_scenario(
agent_class_name = self.module_aw_agent.__name__.title().replace("_", "")
try:
print(getattr(self.module_aw_agent, agent_class_name))
# call the agent method to notify the bridge of the ego spawn
# this will loop until the bridge is ready
self.aw_agent = getattr(self.module_aw_agent, agent_class_name)(
env_config
)
route_config.agent = self.aw_agent

# call the agent method to notify the bridge of the ego spawn
# only continue once state changes!

except Exception as e: # Forces the simulation to run synchronously # pylint: disable=broad-except
traceback.print_exc()
print("Could not setup required agent due to {}".format(e))
# self._cleanup()
return False

# only set synchronous mode once bridge is ready
# tick synchronously until then
# tick asynchronously until then
settings = CarlaDataProvider.get_world().get_settings()
settings.synchronous_mode = True
settings.fixed_delta_seconds = self._carla_config["fixed_delta_seconds"]
CarlaDataProvider.get_world().apply_settings(settings)

# ADD TRAFFIC MANAGER SEED TO CONFIG
tm_port = int(self._tm_config["port"]) # type: ignore
Expand Down
3 changes: 3 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ scenario_runner:
debug: false
route_id: 0
in_docker: true # used for dev
algorithm:
iterations: 1000
hyperparmaters: # will be passed into the algorithm class
Binary file modified docker/autoware_msgs.tar
Binary file not shown.
Loading