Python API Reference
Important
Versions prior to 0.9.0 have a very different API. For the documentation of the stable version please switch to the stable branch.
carla.Client
Client(host, port, worker_threads=0)set_timeout(milliseconds)get_client_version()get_server_version()ping()get_world()
carla.World
get_blueprint_library()get_spectator()spawn_actor(blueprint, transform, attach_to=None)try_spawn_actor(blueprint, transform, attach_to=None)
carla.BlueprintLibrary
find(id)filter(wildcard_pattern)__getitem__(pos)__len__()__iter__()
carla.ActorBlueprint
idtagscontains_tag(tag)match_tags(wildcard_pattern)contains_attribute(key)get_attribute(key)set_attribute(key, value)
carla.ActorAttribute
is_modifiabletyperecommended_valuesas_bool()as_int()as_float()as_str()as_color()__eq__()__ne__()__nonzero__()__bool__()__int__()__float__()__str__()
carla.Actor
idtype_idget_world()get_location()get_transform()set_location(location)set_transform(transform)destroy()
carla.Vehicle(carla.Actor)
apply_control(vehicle_control)set_autopilot(enabled=True)
carla.Sensor(carla.Actor)
listen(callback_function)
carla.Image
frame_numberwidthheighttypefovraw_data
carla.VehicleControl
throttlesteerbrakehand_brakereverse
carla.Location
xyz
carla.Rotation
pitchyawroll
carla.Transform
locationrotation
carla.Color
rgb