Docs/catalogue_vehicles.md
To examine a vehicle from the catalog, use the following code, retrieve the blueprint ID from the vehicle's details below and paste it into the line bp_lib.find('blueprint.id.goes_here'):
client = carla.Client('localhost', 2000)
world = client.get_world()
bp_lib = world.get_blueprint_library()
spectator = world.get_spectator()
# Set up the vehicle transform
vehicle_loc = carla.Location(x=-46.9, y=20.0, z=0.2)
vehicle_rot = carla.Rotation(pitch=0.0, yaw=142.0, roll=0.0)
vehicle_trans = carla.Transform(vehicle_loc,vehicle_rot)
# Paste the blueprint ID here:
vehicle_bp = bp_lib.find('vehicle.lincoln.mkz')
# Set up the view transform
camera_loc = carla.Location(x=-48.7, y=24.8, z=1.7)
camera_rot = carla.Rotation(pitch=-13.4, yaw=-75.7, roll=0.0)
camera_trans = carla.Transform(camera_loc,camera_rot)
# Spawn the vehicle
vehicle = world.spawn_actor(vehicle_bp, vehicle_trans)
# Move the spectator
spectator.set_transform(camera_trans)
Don't forget to destroy the vehicle before you try and spawn another to avoid a collision:
vehicle.destroy()
Manufacturer: Audi
Model: TT
Class: Standard
Generation: 1
Blueprint ID: <span style="color:#00a6ed;">vehicle.ue4.audi.tt<span>
Base type: car
Has lights: <span style="color:#f16c6c;">False<span>
Has opening doors: <span style="color:#f16c6c;">False<span>
Manufacturer: BMW
Model: Gran Tourer
Class: Compact
Generation: 1
Blueprint ID: <span style="color:#00a6ed;">vehicle.ue4.bmw.grantourer<span>
Base type: car
Has lights: <span style="color:#f16c6c;">False<span>
Has opening doors: <span style="color:#f16c6c;">False<span>
Manufacturer: Chevrolet
Model: Impala
Class: Standard
Generation: 1
Blueprint ID: <span style="color:#00a6ed;">vehicle.ue4.chevrolet.impala<span>
Base type: car
Has lights: <span style="color:#f16c6c;">False<span>
Has opening doors: <span style="color:#f16c6c;">False<span>
Manufacturer: Dodge
Model: Charger 2020
Class: Standard
Generation: 2
Blueprint ID: <span style="color:#00a6ed;">vehicle.dodge.charger<span>
Base type: car
Has lights: <span style="color:#99c635;">True<span>
Has opening doors: <span style="color:#99c635;">True<span>
Manufacturer: Dodge
Model: Police Charger 2020
Class: Standard
Generation: 2
Blueprint ID: <span style="color:#00a6ed;">vehicle.dodgecop.charger<span>
Base type: car
Special type: emergency
Has lights: <span style="color:#99c635;">True<span>
Has opening doors: <span style="color:#99c635;">True<span>
Manufacturer: Ford
Model: Crown (taxi)
Class: Standard
Generation: 2
Blueprint ID: <span style="color:#00a6ed;">vehicle.taxi.ford<span>
Base type: car
Special type: taxi
Has lights: <span style="color:#99c635;">True<span>
Has opening doors: <span style="color:#99c635;">True<span>
Manufacturer: Ford
Model: Mustang
Class: Standard
Generation: 1
Blueprint ID: <span style="color:#00a6ed;">vehicle.ue4.ford.mustang<span>
Base type: car
Has lights: <span style="color:#f16c6c;">False<span>
Has opening doors: <span style="color:#f16c6c;">False<span>
Manufacturer: Lincoln
Model: MKZ
Class: Standard
Generation: 2
Blueprint ID: <span style="color:#00a6ed;">vehicle.lincoln.mkz<span>
Base type: car
Has lights: <span style="color:#99c635;">True<span>
Has opening doors: <span style="color:#99c635;">True<span>
Manufacturer: Mercedes
Model: Coupe
Class: Standard
Generation: 1
Blueprint ID: <span style="color:#00a6ed;">vehicle.ue4.mercedes.ccc<span>
Base type: car
Has lights: <span style="color:#f16c6c;">False<span>
Has opening doors: <span style="color:#f16c6c;">False<span>
Manufacturer: Mini
Model: Cooper S 2021
Class: Standard
Generation: 2
Blueprint ID: <span style="color:#00a6ed;">vehicle.mini.cooper<span>
Base type: car
Has lights: <span style="color:#99c635;">True<span>
Has opening doors: <span style="color:#99c635;">True<span>
Manufacturer: Nissan
Model: Patrol
Class: SUV
Generation: 2
Blueprint ID: <span style="color:#00a6ed;">vehicle.nissan.patrol<span>
Base type: car
Has lights: <span style="color:#99c635;">True<span>
Has opening doors: <span style="color:#99c635;">True<span>
Manufacturer: CARLA Motors
Model: CarlaCola
Class: Truck
Generation: 1
Blueprint ID: <span style="color:#00a6ed;">vehicle.carlacola.actors<span>
Base type: truck
Has lights: <span style="color:#f16c6c;">False<span>
Has opening doors: <span style="color:#f16c6c;">False<span>
Manufacturer: CARLA Motors
Model: Firetruck
Class: Truck
Generation: 2
Blueprint ID: <span style="color:#00a6ed;">vehicle.firetruck.actors<span>
Base type: truck
Special type: emergency
Has lights: <span style="color:#99c635;">True<span>
Has opening doors: <span style="color:#99c635;">True<span>
Manufacturer: Ford
Model: Ambulance
Class: Van
Generation: 2
Blueprint ID: <span style="color:#00a6ed;">vehicle.ambulance.ford<span>
Base type: van
Special type: emergency
Has lights: <span style="color:#99c635;">True<span>
Has opening doors: <span style="color:#99c635;">True<span>
Manufacturer: Mercedes
Model: Sprinter
Class: Van
Generation: 2
Blueprint ID: <span style="color:#00a6ed;">vehicle.sprinter.mercedes<span>
Base type: van
Has lights: <span style="color:#99c635;">True<span>
Has opening doors: <span style="color:#99c635;">True<span>
Manufacturer: Mitsubishi
Model: Fusorosa
Class: Bus
Generation: 2
Blueprint ID: <span style="color:#00a6ed;">vehicle.fuso.mitsubishi<span>
Base type: bus
Has lights: <span style="color:#99c635;">True<span>
Has opening doors: <span style="color:#f16c6c;">False<span>
Manufacturer: Not specified
Model: Earth mover
Class: Truck
Generation: 2
Blueprint ID: <span style="color:#00a6ed;">vehicle.miningtruck.miningtruck<span>
Base type: truck
Has lights: <span style="color:#99c635;">False<span>
Has opening doors: <span style="color:#f16c6c;">False<span>