This is the repository that includes the code material for the ESweek 2021 for the Education Class Lecture A3 "Learn to Drive (and Race!) Autonomous Vehicles"

Overview

ESweek2021_educationclassA3

Title Picture ESWeek 2021

This is the repository that includes the code material for the ESweek 2021 for the Education Class Lecture A3 "Learn to Drive (and Race!) Autonomous Vehicles"

Lecture videos: Youtube Playlist

Lecturers:

Environment Installation guide

  1. Start by installing a Virtual Environment (virtualenv) with Python 3.8 in the repository:
  • Install the virtualenv python3 package
pip3 install virtualenv
  • Create a virtual environment
virtualenv venv
  • Enable the virtual environment
source venv/bin/activate
  1. Install the required python packages within thevirtualenv with the following command:
pip3 install -r requirements.txt
  1. Install the F1TENTH gym environment while in the root folder of this repository by running the following command:
$ pip3 install -e gym/
  1. For more information about the F1TENTH Gym environment you can have a look at the the documentation here.

Run the ESWeek Lecture

1. Avoid the Crash: Follow the Gap

  1. Change to the Folder 01_Follow_The_Gap

  2. To experience the Follow the Gap algorithm, run the following command.

$ python3 FollowTheGap.py
  1. You will see the simulation starting and a new windows with the simulation environment is popping up. This algorithm is running on a map that has obstacles included and you see the algorithm is avoiding these obstacles.

  2. You can adjust the Follow The Gap parameter in the drivers.py file

2. Follow the Raceline: Pure Pursuit

  1. Change to the Folder 02_Pure_Pursuit

  2. To experience the Pure Pursuit algorithm, run the following command.

$ python3 PurePursuit.py
  1. You will see the simulation starting and a new windows with the simulation environment is popping up. This algorithm is following a precalculated racline which is displayed in the simulation environment.

  2. You can adjust the Pure Pursuit parameter directly in the PurePursuit.py file

  3. To get a minimum curvature or minimum time global optimal raceline we recommend that you use the methods and code that is displaye here

3. Race and Overtake: Graph Based Planner

  1. Change to the Folder 03_GraphBasedPlanner

  2. To experience the Graph based planner algorithm, run the following command.

$ python3 GraphPlanner_MultiVehiclepy.py
  1. You will see the simulation starting and a new windows with the simulation environment is popping up. In addition first of all the graph for the whole racetrack is created. This algorithm is following a precalculated racline which while avoiding and overtaking obstacles - fast and safe.

  2. A detailed documentation and explanation of the Graph Based Planner can be found here.

Known issues

  • On MacOS Big Sur and above, when rendering is turned on, you might encounter the error:
ImportError: Can't find framework /System/Library/Frameworks/OpenGL.framework.

You can fix the error by installing a newer version of pyglet:

$ pip3 install pyglet==1.5.11

And you might see an error similar to

gym 0.17.3 requires pyglet<=1.5.0,>=1.4.0, but you'll have pyglet 1.5.11 which is incompatible.

which could be ignored. The environment should still work without error.

References

For this repository we are using the theoretical foundations, images and code from the following papers. If you find our work useful in your research, please consider citing:

  • M. O’Kelly, H. Zheng, D. Karthik, R. Mangharam "F1TENTH: An Open-source Evaluation Environment for Continuous Control and Reinforcement Learning" in Proceedings of the NeurIPS 2019 Competition and Demonstration Track, PMLR 123:77-89, 2020. (PDF)

  • T. Stahl, A. Wischnewski, J. Betz, and M. Lienkamp, “Multilayer Graph-Based Trajectory Planning for Race Vehicles in Dynamic Scenarios,” in 2019 IEEE Intelligent Transportation Systems Conference (ITSC), Oct. 2019, pp. 3149–3154. (PDF)

  • A. Heilmeier, A. Wischnewski, L. Hermansdorfer, J. Betz, M. Lienkamp, B. Lohmann
    "Minimum Curvature Trajectory Planning and Control for an Autonomous Racecar" Vehicle System Dynamics, vol. 58, no. 10, pp. 1497–1527, Jun. 2019, (PDF)

You might also like...
This repository outlines deploying a local Kubeflow v1.3 instance on microk8s and deploying a simple MNIST classifier using KFServing.

Zero to Inference with Kubeflow Getting Started This repository houses all of the tools, utilities, and example pipeline implementations for exploring

Repository for learning Python (Python Tutorial)

Repository for learning Python (Python Tutorial) Languages and Tools 🧰 Overview 📑 Repository for learning Python (Python Tutorial) Languages and Too

Repository for tutorials, examples and starter scripts for using the MTU HPC cluster

MTU-HPC-Starter Repository for tutorials, examples and starter scripts for using the MTU HPC cluster Connecting to the MTU HPC cluster Within the coll

Materi workshop
Materi workshop "Light up your Python!" Himpunan Mahasiswa Sistem Informasi Fakultas Ilmu Komputer Universitas Singaperbangsa Karawang, 4 September 2021 (Online via Zoom).

Workshop Python UNSIKA 2021 Materi workshop "Light up your Python!" Himpunan Mahasiswa Sistem Informasi Fakultas Ilmu Komputer Universitas Singaperban

Members: Thomas Longuevergne Program: Network Security Course: 1DV501 Date of submission: 2021-11-02
Members: Thomas Longuevergne Program: Network Security Course: 1DV501 Date of submission: 2021-11-02

Mini-project report Members: Thomas Longuevergne Program: Network Security Course: 1DV501 Date of submission: 2021-11-02 Introduction This project was

Run `black` on python code blocks in documentation files

blacken-docs Run black on python code blocks in documentation files. install pip install blacken-docs usage blacken-docs provides a single executable

The source code that powers readthedocs.org

Welcome to Read the Docs Purpose Read the Docs hosts documentation for the open source community. It supports Sphinx docs written with reStructuredTex

Documentation of the QR code found on new Austrian ID cards.

Austrian ID Card QR Code This document aims to be a complete documentation of the format used in the QR area on the back of new Austrian ID cards (Per

Automated generation of real Swagger/OpenAPI 2.0 schemas from Django REST Framework code.
Automated generation of real Swagger/OpenAPI 2.0 schemas from Django REST Framework code.

drf-yasg - Yet another Swagger generator Generate real Swagger/OpenAPI 2.0 specifications from a Django Rest Framework API. Compatible with Django Res

Comments
  • TypeError: reset() takes 1 positional argument but 2 were given

    TypeError: reset() takes 1 positional argument but 2 were given

    While I can run follow_the_gap simulation, I have errors on the other two:

    # python3 GraphPlanner_MultiVehiclepy.py
    
    Traceback (most recent call last):
    
    .../ESweek2021_educationclassA3/03_GraphBasedPlanner/GraphPlanner_MultiVehiclepy.py", line 516, in <module>: 
     obs, step_reward, done, info = env.reset(np.array([[conf.sx, conf.sy, conf.stheta],[conf.sx2, conf.sy2, conf.stheta2]]))
    TypeError: reset() takes 1 positional argument but 2 were given
    

    I have installed the requirements (using python3.9). Any idea is appreciated.

    opened by zlg9folira 1
  • add explicit version for gym dependencies

    add explicit version for gym dependencies

    Hello all! I was trying to follow along with the YouTube videos and I ran into an issue when trying to run the "Follow the Gap" example:

    (/home/joe/work/github/f1tenth/ESweek2021_educationclassA3/.conda) joe@joe-pc:~/work/github/f1tenth/ESweek2021_educationclassA3/01_Follow_The_Gap(main)$ python3 FollowTheGap.py 
    Traceback (most recent call last):
      File "FollowTheGap.py", line 82, in <module>
        runner.run()
      File "FollowTheGap.py", line 55, in run
        env.render()
      File "/home/joe/work/github/f1tenth/ESweek2021_educationclassA3/gym/f110_gym/envs/f110_env.py", line 391, in render
        F110Env.renderer.update_map(self.map_name, self.map_ext)
      File "/home/joe/work/github/f1tenth/ESweek2021_educationclassA3/gym/f110_gym/envs/rendering.py", line 153, in update_map
        self.batch.add(1, GL_POINTS, None, ('v3f/stream', [map_points[i, 0], map_points[i, 1], map_points[i, 2]]), ('c3B/stream', [183, 193, 222]))
    AttributeError: 'Batch' object has no attribute 'add'
    

    It looks like there was a breaking API change introduced with the release of pyglet v2.0.0. After pegging the versions of the gym dependencies, the demo runs as expected (i.e., the GUI pops up and the simulated car drives around the obstacles).

    Thanks for sharing these examples and the videos on YouTube. I'm looking forward to going them!

    opened by jwdinius 0
Owner
F1TENTH Autonomous Racing Community
F1TENTH is an open-source evaluation environment for continuous control and reinforcement learning.
F1TENTH Autonomous Racing Community
A Material Design theme for MkDocs

A Material Design theme for MkDocs Create a branded static site from a set of Markdown files to host the documentation of your Open Source or commerci

Martin Donath 12.3k Jan 4, 2023
Material for the ros2 crash course

Material for the ros2 crash course

Emmanuel Dean 1 Jan 22, 2022
Watch a Sphinx directory and rebuild the documentation when a change is detected. Also includes a livereload enabled web server.

sphinx-autobuild Rebuild Sphinx documentation on changes, with live-reload in the browser. Installation sphinx-autobuild is available on PyPI. It can

Executable Books 440 Jan 6, 2023
Anomaly Detection via Reverse Distillation from One-Class Embedding

Anomaly Detection via Reverse Distillation from One-Class Embedding Implementation (Official Code ⭐️ ⭐️ ⭐️ ) Environment pytorch == 1.91 torchvision =

null 73 Dec 19, 2022
In this Github repository I will share my freqtrade files with you. I want to help people with this repository who don't know Freqtrade so much yet.

My Freqtrade stuff In this Github repository I will share my freqtrade files with you. I want to help people with this repository who don't know Freqt

Simon Kebekus 104 Dec 31, 2022
This is a repository for "100 days of code challenge" projects. You can reach all projects from beginner to professional which are written in Python.

100 Days of Code It's a challenge that aims to gain code practice and enhance programming knowledge. Day #1 Create a Band Name Generator It's actually

SelenNB 2 May 12, 2022
Main repository for the Sphinx documentation builder

Sphinx Sphinx is a tool that makes it easy to create intelligent and beautiful documentation for Python projects (or other documents consisting of mul

null 5.1k Jan 2, 2023
Main repository for the Sphinx documentation builder

Sphinx Sphinx is a tool that makes it easy to create intelligent and beautiful documentation for Python projects (or other documents consisting of mul

null 5.1k Jan 4, 2023
Generate a single PDF file from MkDocs repository.

PDF Generate Plugin for MkDocs This plugin will generate a single PDF file from your MkDocs repository. This plugin is inspired by MkDocs PDF Export P

null 198 Jan 3, 2023
Canonical source repository for PyYAML

PyYAML - The next generation YAML parser and emitter for Python. To install, type 'python setup.py install'. By default, the setup.py script checks

The YAML Project 2k Jan 1, 2023