Skip to main content

Bird-eye's view for CARLA simulator

Project description

Bird eye's view for CARLA

Freeway-oriented shape Learning By Cheating-like shape
cruising square-cruising

(GIFs above present feature maps after applying as_rgb() function)

Motivation

During our research we found a very inspiring paper called Learning By Cheating. Bird-eye's view is made specifically to learn faster thanks to much simpler, 2D world representation (cheating oracle) which we think fits well in Reinforcement Learning setup.

This repository is an almost complete reimplementation that gives better performance and compatibility with most recent versions of CARLA. You can use it out-of-the-box as input for your model, and if necessary convert and visualize into RGB.

Features

  • one-hot 3D feature map (8x2D layers, each representing other entities, e.g. road layer, pedestrians layer) - made specifically to feed your CNN
  • feature map can be converted to an RGB image
  • layers can be easily removed
  • caching mechanism for static layers like: roads and lanes
  • using OpenCV rendering (efficient, multi-threading friendly) instead of slow Pygame method
  • huge FPS speedup thanks to restricted rendering (only agent's surroundings, not whole map)
  • all CARLA maps are supported out-of-the-box, custom maps with valid OpenDrive file made in RoadRunner are also supported
  • current implementation is specifically adjusted for highway scenarios (prolonged shape), but other shapes and crops are easy to implement

Installation

pip install carla_birdeye_view

How to run

Make sure that PYTHONPATH env variable contains CARLA distribution egg, so that carla package can be imported.

# Launch server instance
./CarlaUE4.sh

# (optional) For CARLA 0.9.8+ you may get additional performance improvement with this
python PythonAPI/util/config.py --no-rendering

# Preview while cruising on autopilot (birdview/__main__.py)
birdview-demo

Development

# From repo root
python -m birdview

Contribution and feedback

We'd :heart: to collct any feedback, issues and pull requests!

Credits

Project born at deepsense.ai, made by:

Michał Martyniak (@micmarty)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

carla_birdeye_view-1.0.tar.gz (3.3 kB view details)

Uploaded Source

File details

Details for the file carla_birdeye_view-1.0.tar.gz.

File metadata

  • Download URL: carla_birdeye_view-1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for carla_birdeye_view-1.0.tar.gz
Algorithm Hash digest
SHA256 6a656afe89cebe4a1a1b680a09d055cfde79b68c43460198d40654e13f080d13
MD5 0bf2113d476a1c14253336558b4c8ef3
BLAKE2b-256 5c03181c09ff9302a019b683bcfb832e6e99089a1e6c512427a9b22201ee89f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page