Code Monkey home page Code Monkey logo

carla_fyp1's Introduction

gym-carla

An OpenAI gym third party environment for CARLA simulator.

System Requirements

  • Ubuntu 16.04

Installation

  1. Setup conda environment
$ conda create -n env_name python=3.6
$ conda activate env_name
  1. Clone this git repo in an appropriate folder
$ git clone https://github.com/cjy1992/gym-carla.git
  1. Enter the repo root folder and install the packages:
$ pip install -r requirements.txt
$ pip install -e .
  1. Download CARLA_0.9.6, extract it to some folder, and add CARLA to PYTHONPATH environment variable:
$ export PYTHONPATH=$PYTHONPATH:$YourFolder$/CARLA_0.9.6/PythonAPI/carla/dist/carla-0.9.6-py3.5-linux-x86_64.egg

Usage

  1. Enter the CARLA root folder and launch the CARLA server by:
$ ./CarlaUE4.sh -windowed -carla-port=2000

You can use Alt+F1 to get back your mouse control.

Or you can run in non-display mode by:

$ DISPLAY= ./CarlaUE4.sh -opengl -carla-port=2000
  1. Run the test file:
$ python test.py

See details of test.py about how to use the CARLA gym wrapper.

Description

  1. We provide a dictionary observation including front view camera (obs['camera']), birdeye view lidar point cloud (obs['lidar']) and birdeye view semantic representation (obs['birdeye']):
We also provide a state vector observation (obs['state']) which is composed of lateral distance and heading error between the ego vehicle to the target lane center line (in meter and rad), ego vehicle's speed (in meters per second), and and indicator of whether there is a front vehicle within a safety margin.
  1. The termination condition is either the ego vehicle collides, runs out of lane, reaches a destination, or reaches the maximum episode timesteps. Users may modify function _terminal in carla_env.py to enable customized termination condition.

  2. The reward is a weighted combination of longitudinal speed and penalties for collision, exceeding maximum speed, out of lane, large steering and large lateral accleration. Users may modify function _get_reward in carla_env.py to enable customized reward function.

Related Repos and Papers

Deep Reinforcement Learning for Autonomous Driving

Deep Imitation Learning for Autonomous Driving

Autonomous Driving Perception and Representation Learning

carla_fyp1's People

Contributors

dharrington11 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.