YuanYunshuang / carla-1

Open-source simulator for autonomous driving research.

Home Page:http://carla.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OSM map data and GPS route import

  • 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.

    Demonstration of generating downtown Pittsburgh from OSM data.

Import OSM data and generate road meshes

  1. In terminal: git clone -b master https://github.com/ruichen-v/carla.git --recursive
  2. Build carla using UE4.21. You will need to build from source.
  3. 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.
  4. In UE Editor, import the downloaded osm file into content folder.
  5. Drag the imported osm file into main view. You will get a StreetMapActor.
  6. In Meshes category in StreetMapActor property, assign a road mesh to each StreetMapMeshTag slot in StaticMeshes.
  7. You can use Content/Carla/Static/Road/RoadPiece.uasset for all mesh tags for simplicity.
  8. 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.

Import GPS routes and generate route planners for navigation

  1. 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 AFTER buggytracegps.csv.
  2. In Carla C++ class/AutoGen/RouteGen/, drag RouteGenerator into main view. Set its location to the same as StreetMapActor.
  3. 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.
  4. In Traffic Routes category in RouteGenerator property, click + in GPS_routes.
  5. Assign the imported GPS route file to the newly created entry in GPS_routes
  6. Click once in arbitrary area in editor main view to visualize the generated route planners.
  7. Enlarge and place the box trigger volume (attached to RouteGenerator) at the start point of your route.
  8. Vehicles entering the box trigger volume will follow the GPS routes.
  9. 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

Sample Usage

CARLA Simulator

Build Status Documentation

carla.org download documentation discord

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.

CARLA Video

If you want to benchmark your model in the same conditions as in our CoRL’17 paper, check out Benchmarking.

CARLA Ecosystem

Repositories associated to the CARLA simulation platform:

2019 Roadmap

carla.org

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

Paper

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}
}

Building CARLA

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.

Contributing

Please take a look at our Contribution guidelines.

F.A.Q.

If you run into problems, check our FAQ.

License

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.

About

Open-source simulator for autonomous driving research.

http://carla.org

License:Other


Languages

Language:C++ 75.4%Language:Python 18.3%Language:Batchfile 2.3%Language:Shell 1.8%Language:C 1.0%Language:CMake 0.9%Language:Makefile 0.2%Language:C# 0.2%Language:Dockerfile 0.0%