-
I integrated a modified fork of StreetMapPlugin (as submodule) to enable automatic map import and road mesh generation from OSM data.
-
I implemented automatic route planner generation from GPS trajectories as RouteGenerator.
-
The above two functionalities can be used together to easily simulate driving trajectories recorded from real-world traffic.
- In terminal:
git clone -b master https://github.com/ruichen-v/carla.git --recursive
- Build carla using UE4.21. You will need to build from source.
- Export OSM data for an area of interest from Open Street Map. A sample osm file is provided
Unreal/CarlaUE4/Plugins/Carla/Content/sample_files/CMUTrack.osm
. - In UE Editor, import the downloaded osm file into content folder.
- Drag the imported osm file into main view. You will get a StreetMapActor.
- In Meshes category in StreetMapActor property, assign a road mesh to each StreetMapMeshTag slot in StaticMeshes.
- You can use
Content/Carla/Static/Road/RoadPiece.uasset
for all mesh tags for simplicity. - Each StreetMapMeshTag controls the appearance of a certain range of road types in osm data. Refer to
path/to/carla/Unreal/CarlaUE4/Plugins/StreetMap/Source/StreetMapRuntime/StreetMapComponent.cpp:262~298
for the correspondence between mesh tags and road types.
- In UE Editor, import your GPS routes in required format into content viewer, select FGPSLocationDescriptor in the drop down menu when prompted. A sample GPS route file is provided
Unreal/CarlaUE4/Plugins/StreetMap/Content/sample_files/buggytracegps.csv
. PLEASE FORMAT YOUR GPS ROUTE FILE AFTERbuggytracegps.csv
. - In
Carla C++ class/AutoGen/RouteGen/
, drag RouteGenerator into main view. Set its location to the same as StreetMapActor. - Copy RelativeLatitude & RelativeLongitude from StreetMap category in StreetMapActor property and paste into the AverageLatitude & AverageLongitude in Projection category in the RouteGenerator that you created. This aligns the projection origins of both roads and routes.
- In Traffic Routes category in RouteGenerator property, click
+
in GPS_routes. - Assign the imported GPS route file to the newly created entry in GPS_routes
- Click once in arbitrary area in editor main view to visualize the generated route planners.
- Enlarge and place the box trigger volume (attached to RouteGenerator) at the start point of your route.
- Vehicles entering the box trigger volume will follow the GPS routes.
- Click
+
in GPS_routes to add as many routes as you like.
You can create a map with road meshes from CMUTrack.osm
and generate routes from buggytracegps.csv
to simulate the Buggy Race in CMU Spring Carnival.
The screenshot shows the buggy race track (highlighted) aligned with CMU Pittsburgh campus.
Map data © OpenStreetMap contributors. Link to copyright page
CARLA is an open-source simulator for autonomous driving research. CARLA has been developed from the ground up to support development, training, and validation of autonomous driving systems. In addition to open-source code and protocols, CARLA provides open digital assets (urban layouts, buildings, vehicles) that were created for this purpose and can be used freely. The simulation platform supports flexible specification of sensor suites and environmental conditions.
If you want to benchmark your model in the same conditions as in our CoRL’17 paper, check out Benchmarking.
Repositories associated to the CARLA simulation platform:
- Scenario_Runner: Engine to execute traffic scenarios in CARLA 0.9.X
- ROS-bridge: Interface to connect CARLA 0.9.X to ROS
- Driving-benchmarks: Benchmark tools for Autonomous Driving tasks
- Conditional Imitation-Learning: Training and testing Conditional Imitation Learning models in CARLA README
- AutoWare AV stack: Bridge to connect AutoWare AV stack to CARLA
- Reinforcement-Learning: Code for running Conditional Reinforcement Learning models in CARLA
We are continuously working on improving CARLA, and we appreciate contributions from the community. Our most immediate goals are:
- Support simulation of traffic scenarios
- Support ROS interface
- Allowing for flexible and user-friendly import and editing of maps
- Control of all vehicles from client side
- Control of pedestrians from client side
- No rendering mode for high performance simulation
- Support parallel simulation of traffic scenarios in the cloud
- RADAR simulation
If you use CARLA, please cite our CoRL’17 paper.
CARLA: An Open Urban Driving Simulator
Alexey Dosovitskiy, German Ros,
Felipe Codevilla, Antonio Lopez, Vladlen Koltun; PMLR 78:1-16
[PDF]
[talk]
@inproceedings{Dosovitskiy17,
title = {{CARLA}: {An} Open Urban Driving Simulator},
author = {Alexey Dosovitskiy and German Ros and Felipe Codevilla and Antonio Lopez and Vladlen Koltun},
booktitle = {Proceedings of the 1st Annual Conference on Robot Learning},
pages = {1--16},
year = {2017}
}
Use git clone
or download the project from this page. Note that the master
branch contains the latest fixes and features, for the latest stable code may be
best to switch to the stable
branch.
Then follow the instruction at How to build on Linux or How to build on Windows.
Unfortunately we don't have official instructions to build on Mac yet, please check the progress at issue #150.
Please take a look at our Contribution guidelines.
If you run into problems, check our FAQ.
CARLA specific code is distributed under MIT License.
CARLA specific assets are distributed under CC-BY License.
Note that UE4 itself follows its own license terms.