Giter VIP home page Giter VIP logo

msc_project_hw's Introduction

MSc Project

Evaluating the Performance of Different Reinforcement Learning Methods for Autonomous Racing

[Dissertation] [Videos of the evaluation of the DQN controllers on the physical car]

car top

The controllers implement several parameters both for the car (maximum speed, steering angle, acceleration...) and for the training process (learning rate, epsilon starting value and decay, size of the replay buffer...), to make the code as flexible as possible.
Logging in Tensorboard was already implemented in https://github.com/MichaelBosello/, and logging to csv format was added.

Introduction

Abstract — The increasing popularity of Reinforcement Learning over the last decade has transformed the AI field. One area that has benefited from this so-called deep learning revolution is autonomous driving and more specifically autonomous racing. Many Reinforcement Learning based controllers have been implemented with varying levels of success, to such an extent that it has become a challenge to find the method with the right compromise between performance and complexity of implementation. Furthermore, most implementations of Reinforcement Learning controllers for autonomous racing are trained in a simulated environment and assume that the Sim2Real gap won't have too much of an impact on performance: this is something that can have a considerable impact on the choice of a specific method for real-life applications.
This project will have a double aim. Firstly, it will be to compare the performance of different autonomous racing controllers and their ability to generalise to new data to help users choose one that corresponds to their needs. Secondly, it will be to compare the Sim2Real gaps to give users an idea of performance in real-life situations; this will be achieved by using the F1Tenth platform. This research report details my review of the relevant literature and establishes research questions, hypotheses, objectives, and a well-defined experimental protocol.

Experiments

Several experiments have been performed (more details are available in the dissertation) to answer all experimental requirements:

  • In-simulator comparison of DQN to Wall Following: compares the performance of DQN to Wall Following on training track using both CNNs and NNs, with LiDAR data as input. The performance is assessed by three different metrics: speed, safety and smoothness; three different reward functions were tested.
  • In-simulator comparison of DQN to assess whether DRL generalises well to new tracks: compares the performance of DQN controllers trained on track A and tested on track B to DQN controllers tested and trained on track B.
  • Sim2real experiment to assess the Sim2Real gap: the DQN controllers are trained in the simulator and evaluated on the physical F1tenth car. Using the same metrics as before, the DQN controllers are compared to Wall Following and manual driving.

Installation

  1. Install ROS Melodic or Noetic
  2. Install required dependencies:
    $ sudo apt install rospkg catkin_pkg
    $ sudo apt install ros-noetic-ackermann-msgs or ros-melodic-ackermann-msgs
    $ sudo apt install tensorflow==2.0.0
    When on a machine with ARM architecture, a pre-built Tensorflow binary has to be installed instead.

DQN training

DQN/rl_car_driver.py

epsilon-decay = 0.99994

DQN/car_control.py

MAX_SPEED_REDUCTION_SIM = 1
STEERING_SPEED_REDUCTION_SIM = 1.4
BACKWARD_SPEED_REDUCTION_SIM = 4.5
BACKWARD_SECONDS = 1.5

Testing parameters for DQN

gpu-time = 0.0001
train-epoch-steps = 0
max-step-limit = 1000000
save-model-freq = 100000

Run in simulator

  1. Launch the F1Tenth simulator:
    $ cd catkin_ws
    $ source devel/setup.bash
    $ roslaunch f1tenth_simulator simulator.launch
  2. Launch the controller:
    $ python3 rl_car_driver.py --simulator

Simulator options:

  • The guide of the simulator is found in the readme simulator/src/f1tenth_simulator/README/md

  • Many parameters can be changed in simulator/src/f1tenth_simulator/params.yaml

  • The race track can be changed by editing simulator/src/f1tenth_simulator/launch/simulator.launch

  • The simulation can be sped up by adding to simulator/src/f1tenth_simulator/launch/simulator.launch and changing the sim_speed_multiplier parameter in Clock.py

Run on the physical car

roslaunch racecar teleop.launch

Load a model

the argument --model can be used to load a trained model:
python3 rl_car_driver.py --model=./CNNRW3/models

msc_project_hw's People

Contributors

hl-boisvert 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.