opencda.scenario_testing.utils package
Submodules
opencda.scenario_testing.utils.customized_map_api module
Loading world from customized map
- class opencda.scenario_testing.utils.customized_map_api.bcolors
Bases:
object
- BOLD = '\x1b[1m'
- ENDC = '\x1b[0m'
- FAIL = '\x1b[91m'
- HEADER = '\x1b[95m'
- OKBLUE = '\x1b[94m'
- OKCYAN = '\x1b[96m'
- OKGREEN = '\x1b[92m'
- UNDERLINE = '\x1b[4m'
- WARNING = '\x1b[93m'
- opencda.scenario_testing.utils.customized_map_api.load_customized_world(xodr_path, client)
Load .xodr file and return the carla world object
- Parameters:
xodr_path (str) – path to the xodr file
client (carla.client) – The created CARLA simulation client.
- opencda.scenario_testing.utils.customized_map_api.spawn_helper_2lanefree(carla_version, coefficient)
A helper function to locate the valid spawn point on the merge lane.
- Parameters:
carla_version (str) – The CARLA simulator version. We need this as the map for 0.9.11 and 0.9.12 are a little different
coefficient (float) – A single scalar indicating where is the spawn point, eg. 0.5 represents the spawn position is in the middle of the merge lane.
- Returns:
transform_point – The desired spawn points.
- Return type:
carla.transform
- opencda.scenario_testing.utils.customized_map_api.spawn_helper_2lanefree_complete(carla_version, coefficient)
A helper function to locate the valid spawn point on the merge lane.
- Parameters:
carla_version (str) – The CARLA simulator version. We need this as the map for 0.9.11 and 0.9.12 are a little different
coefficient (float) – A single scalar indicating where is the spawn point, eg. 0.5 represents the spawn position is in the middle of the merge lane.
- Returns:
transform_point – The desired spawn points.
- Return type:
carla.transform