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
29 changes: 14 additions & 15 deletions aw_scenario_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,21 @@ def run_scenario(

ego.prepare_ego()

logger.info("Updating world settings:")
logger.info("Loading route...")

try:
scenario = RouteScenario(
world=self.carla_world,
config=route_config,
debug_mode=self.DEBUG,
ego_vehicle=ego,
)
except Exception:
logger.info("Could not load Route Scenario")
traceback.print_exc()
return False

logger.info("Updating world settings:")
# tick asynchronously until then
settings = CarlaDataProvider.get_world().get_settings()
settings.synchronous_mode = True
Expand All @@ -169,20 +182,6 @@ def run_scenario(
tm.set_random_device_seed(int(self._tm_config["seed"])) # ADD TO CONFIG
tm.set_synchronous_mode(self._tm_config["sync"])

logger.info("Loading route...")

try:
scenario = RouteScenario(
world=self.carla_world,
config=route_config,
debug_mode=self.DEBUG,
ego_vehicle=ego,
)
except Exception:
logger.info("Could not load Route Scenario")
traceback.print_exc()
return False

logger.info("Starting scenario...")
try:
self.scenario_manager.load_scenario(scenario, self.aw_agent)
Expand Down
1 change: 1 addition & 0 deletions srunner/tools/environment_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def parse_ego_config(config: EnvironmentConfig, elem: Element) -> None:

elif sensor_type == "sensor.lidar.ray_cast":
sensor_obj = LidarRayCast()
sensor_obj.range = sensor.attrib.get("range", 0)
sensor_obj.channels = sensor.attrib.get("channels", 0)
sensor_obj.points_per_second = sensor.attrib.get("points_per_second", 0)
sensor_obj.upper_fov = sensor.attrib.get("upper_fov", 0.0)
Expand Down