Coder Social home page Coder Social logo

bettertha / carla-controllers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sapan-ostic/carla-controllers

0.0 1.0 0.0 23.93 MB

Controls Course Project: Implementing PID (Stanley Control for Lateral Control) and Model Predictive Controller in Carla Simulator. The backbon code interfacing with the Carla was used from the Coursera: Introduction to Self-Driving Cars Course.

Python 100.00%

carla-controllers's Introduction

Carla-Controllers

Controls Course Project: Implementing PID (Stanley Control for Lateral Control) and Model Predictive Controller in Carla Simulator. The backbon code interfacing with the Carla was used from the Coursera: Introduction to Self-Driving Cars Course.

Coursera Evaluator scores:

Model Predictive Controller PID Controller
100% Waypoints tracked 87.25% waypoints tracked

Installation

  1. Install Carla: Download here

  2. Download Course1FinalProject.zip into CarlaSimulator folder Download here.

  3. Install casadi: pip install casadi

  4. Install Ipopt:

wget http://www.coin-or.org/download/source/Ipopt/Ipopt-3.12.4.tgz
tar xvzf Ipopt-3.12.4.tgz

cd Ipopt-3.12.4/ThirdParty/Blas
./get.Blas
cd ../Lapack
./get.Lapack
cd ../Mumps
./get.Mumps
cd ../Metis
./get.Metis
cd ../../                        #Go back to the IPOPT base dir
  1. Download HSL: Get Lisensce from here

  2. Unpack HSL in Ipopt

cd ~/Ipopt-3.12.4/ThirdParty/HSL
tar xvzf coinhsl-2014.01.10.tar.gz
mv coinhsl-2014.01.10 coinhsl
  1. Compile HSL
cd coinhsl-2014.01.10
./configure LIBS="-llapack" --with-blas="-L/usr/lib -lblas" CXXFLAGS="-g -O2 -fopenmp" FCFLAGS="-g -O2 -fopenmp" CFLAGS="-g -O2 -fopenmp"
make -j 4
make install
ln -s /usr/local/lib/libcoinhsl.so /usr/local/lib/libhsl.so
echo  'export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"' >> ~/.bashrc 
  1. Compile Ipopt:
cd ~/Ipopt-3.12.4/
mkdir build
cd build
../configure
make -j 4                        #Compile using 4 cores (if you have them)
make install

Run Instructions

cd CarlaSimulator
./CarlaUE4.sh /Game/Maps/RaceTrack -windowed -carla-server -benchmark -fps=30

In new terminal run,

cd CarlaSimulator/PythonClient/Course1FinalProject
python3 module_7.py -c MPC

Run python3 module_7.py -h for more options.

carla-controllers's People

Contributors

sapan-ostic avatar

Watchers

James Cloos 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.