launch_tools package

Various tools load CARLA and data. Also handles problematic import deriving from version conflicts

launch_tools.prepare_blueprints(ego_vehicle: str = 'vehicle.lincoln.mkz_2020', ego_color: str = '255,0,0') Tuple[carla.ActorBlueprint, carla.ActorBlueprint]

Convenience function to acquire two different colored blueprints, e.g. for the ego and all other NPC vehicles.

Parameters:
  • ego_vehicle (str) – str, optional The name of the ego vehicle, by default “vehicle.lincoln.mkz_2020”

  • ego_color (str) – str, optional The color of the ego vehicle in RGB format, by default “255,0,0”

Returns:

A tuple containing the ego vehicle blueprint and the NPC vehicle blueprint.

Return type:

Tuple[carla.ActorBlueprint, carla.ActorBlueprint]

Submodules

launch_tools.argument_parsing module

Argument parsers for arguments used by CARLA examples.

Deprecated since version _: In favor of Hydra.

meta private:

launch_tools.argument_parsing.subparser(func: Callable[[Concatenate[ArgumentParser, _P]], Any]) _SubparserMixIn[_P][source]

This decorator allows to join multiple subparsers in a flexible way.

Parameters:

func (Callable[[Concatenate[ArgumentParser, ~_P]], Any])

Return type:

_SubparserMixIn[~_P]

launch_tools.argument_parsing.client_settings(parser: ArgumentParser = None, *args, **kwargs)[source]
Parameters:

parser (ArgumentParser)

launch_tools.argument_parsing.interactive_mode(parser: ArgumentParser = None, *args, **kwargs)[source]
Parameters:

parser (ArgumentParser)

launch_tools.argument_parsing.interactive_control_example(parser: ArgumentParser = None, *args, **kwargs)[source]
Parameters:

parser (ArgumentParser)

launch_tools.argument_parsing.automatic_control_example(parser=None, *args, **kwargs)[source]
launch_tools.argument_parsing.main_parser() ArgumentParser[source]
Return type:

ArgumentParser

launch_tools.blueprint_helpers module

launch_tools.blueprint_helpers.get_blueprint_library(world: carla.World | None = None) carla.BlueprintLibrary[source]

Get the blueprint library of the given world.

Deprecated since version Consider: using CarlaDataProvider._blueprint_library or CarlaDataProvider.create_blueprint() instead.

Parameters:

world (carla.World | None)

Return type:

carla.BlueprintLibrary

launch_tools.blueprint_helpers.get_contrasting_blueprints(ego_vehicle: str = 'vehicle.lincoln.mkz_2020', ego_color: str = '255,0,0') Tuple[carla.ActorBlueprint, carla.ActorBlueprint][source]

Convenience function to acquire two different colored blueprints, e.g. for the ego and all other NPC vehicles.

Parameters:
  • ego_vehicle (str) – str, optional The name of the ego vehicle, by default “vehicle.lincoln.mkz_2020”

  • ego_color (str) – str, optional The color of the ego vehicle in RGB format, by default “255,0,0”

Returns:

A tuple containing the ego vehicle blueprint and the NPC vehicle blueprint.

Return type:

Tuple[carla.ActorBlueprint, carla.ActorBlueprint]

launch_tools.blueprint_helpers.get_actor_blueprints(pattern: str, generation: Literal[1, 2, 'all']) List[carla.ActorBlueprint] | carla.BlueprintLibrary[source]

Returns a list of actor blueprints filtered by the given filter and generation.

Parameters:
  • world – The world to get the blueprints from.

  • filter – The filter to apply to the blueprints.

  • generation (Literal[1, 2, 'all']) – The generation of the blueprints to return. Can be “all”, “1”, or “2”.

  • pattern (str)

Returns:

The list of actor blueprints that match the given filter and generation.

Return type:

List of carla.ActorBlueprint

launch_tools.csv_tools module

Contains snippets that can can import/export vehicle positions from/to csv files.

launch_tools.csv_tools.csv_to_transformations(path: str | PathLike[str]) list[carla.Transform][source]

Read a csv file and return a list of Transform objects. Expected columns: x, y, z, pitch, yaw, roll.

Parameters:

path (str | PathLike[str])

Return type:

list[carla.Transform]

launch_tools.csv_tools.transform_to_pandas(transform: carla.Transform) pandas.Series.<class 'float'>[source]

Format a carla.Transform object to a pandas.Series.

Parameters:

transform (carla.Transform)

Return type:

pandas.Series.<class ‘float’>

launch_tools.csv_tools.vehicle_location_to_dataframe(vehicles: list[carla.Actor]) pandas.DataFrame[source]

Exports the locations of vehicles to a pandas.Dataframe.

Parameters:

vehicles (list[carla.Actor])

Return type:

pandas.DataFrame