From 819de117e023a1d5d04be46af741012bc4387d0c Mon Sep 17 00:00:00 2001 From: mcarfagno Date: Thu, 10 Dec 2020 21:11:37 +0000 Subject: [PATCH] update .gitignore --- .DS_Store | Bin 6148 -> 0 bytes .gitignore | 3 +- .ipynb_checkpoints/README-checkpoint.md | 62 ------------------------ notebooks/MPC_racecar_crosstrack.ipynb | 6 +-- 4 files changed, 4 insertions(+), 67 deletions(-) delete mode 100644 .DS_Store delete mode 100644 .ipynb_checkpoints/README-checkpoint.md diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index b6c42c7f5517c57e94b5d10f1bcc5418dd62c1cf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK&2G~`5T0!eI0l44NbS)VBo0xPQk1GfNG7C*9*_`5Z~)}SwUt;n-jFzi5`uE! z9e_9BQFsC#ga?3ce~Mx!NN_=@+KG0*+1Z(~_w)W_iHNl)@eYwoL^g^*%R#k9M87C2 zvY{=PfK22#%=mGX@d#~^(1>BcFz|mfAl9x$+tj0!ipu)EgT9YHq{u-yr+)D5QBIsj zlvHBARAR0nCZ!>rz(1mpj;T)x>X)!_^yE~~xSWG+R&vzfH=thGi^SXATzb2!@EIa= zD4!P5gfjdRdv_HJuFuiKk9cJ3Y?4Nl(9-p${C!Z0BW zTeOrb8c*Rfls_Qvbuh{^p7-D_GS%e-C_rq456SUC*L}uide=mpRXW!Ub%nl1bU^p0 zLl1!4n4NKXcCrs3d6_;}tTuXud7VmafRGH zFd+5^4@ID_aiLId9jN3L0BFH11-ks}5A=iq=xbakgayJ>C{TqmeZ^q<=D<`q`hD%c zP^iL*$tNR^elpWH6s9j8%#-fKe1)bq3>XH=4AfN973crK@9+QRAk#7o7zWN11I+3K zoi>J~&(@W}iL=&2IYJR4{1ysj2r7LXOGO;TTPRY{=LrSqYg{OV1!DdPNE%FK82G0Q F`~+{E6NCT& diff --git a/.gitignore b/.gitignore index 471ccf6..c82352f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ *.pyc *.DS_Store -/notebook/.ipynb_checkpoints -.ipynb_checkpoints +*.ipynb_checkpoints diff --git a/.ipynb_checkpoints/README-checkpoint.md b/.ipynb_checkpoints/README-checkpoint.md deleted file mode 100644 index bc6c2b7..0000000 --- a/.ipynb_checkpoints/README-checkpoint.md +++ /dev/null @@ -1,62 +0,0 @@ -# mpc_python - -Python implementation of a mpc controller for path tracking using **[CVXPY](https://www.cvxpy.org/)**. - -## About - -The MPC is a model predictive path following controller which does follow a predefined reference by solving an optimization problem. The resulting optimization problem is shown in the following equation: - -![](img/quicklatex_equation.png) - -The terns of the cost function are the sum of the **reference tracking error**, **heading effort** and **actuaction rate of change**. - -Where R,P,Q are the cost matrices used to tune the response. - -The vehicle model is described by the bicycle kinematics model using the state space matrices A and B: - -![](img/quicklatex2.png) - -The state variables **(x)** of the model are: - -* **x** coordinate of the robot -* **y** coordinate of the robot -* **v** velocuty of the robot -* **theta** heading of the robot - -The inputs **(u)** of the model are: - -* **a** linear acceleration of the robot -* **delta** steering angle of the robot - -## Demo - -The MPC implementation is tested using **[bullet](https://pybullet.org/wordpress/)** physics simulator. Racing car model is from: *https://github.com/erwincoumans/pybullet_robots*. - -![](img/f10.png) - -Results: - -![](img/demo.gif) - -To run the pybullet demo: - -```bash -python3 mpc_demo/mpc_demo_pybullet.py -``` - -To run the simulation-less demo: - -```bash -python3 mpc_demo/mpc_demo_pybullet.py -``` - -## Requirements - -```bash -pip3 install --user --requirement requirements.txt -``` - -## References -* [mpc paper](https://borrelli.me.berkeley.edu/pdfpub/IV_KinematicMPC_jason.pdf) -* [pythonrobotics](https://github.com/AtsushiSakai/PythonRobotics/) -* [pybullet](https://pybullet.org/wordpress/) \ No newline at end of file diff --git a/notebooks/MPC_racecar_crosstrack.ipynb b/notebooks/MPC_racecar_crosstrack.ipynb index d6559d7..310adac 100644 --- a/notebooks/MPC_racecar_crosstrack.ipynb +++ b/notebooks/MPC_racecar_crosstrack.ipynb @@ -1203,9 +1203,9 @@ ], "metadata": { "kernelspec": { - "display_name": "Python [conda env:.conda-jupyter] *", + "display_name": "Python 3", "language": "python", - "name": "conda-env-.conda-jupyter-py" + "name": "python3" }, "language_info": { "codemirror_mode": { @@ -1217,7 +1217,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.5" + "version": "3.7.6" } }, "nbformat": 4,