# LearnRoboticsCpp **Repository Path**: dadatuYHD/LearnRoboticsCpp ## Basic Information - **Project Name**: LearnRoboticsCpp - **Description**: Classical robotics algorithms implemented in C++17. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-05 - **Last Updated**: 2021-07-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # LearnRoboticsCpp This repository contains my implementations of classical robotics algorithms in C++. Inspiration drawn from [PythonRobotics](https://github.com/AtsushiSakai/PythonRobotics) and [CppRobotics](https://github.com/onlytailei/CppRobotic). The CppRobotics repo was very good, but it used OpenCV to plot 2D graphs. I found the process of converting 2D points to pixel coordinates in OpenCV very tedious and it seems like a bit of a hack. This repo uses [gnuplot-iostream](https://github.com/dstahlke/gnuplot-iostream) instead for plotting which makes much prettier graphs than OpenCV and allows for us to easily make 3D plots. Some of these implementations will have a tutorial attached to it. It's still a work in progress. ## Table of Contents * [Requirements](#requirements) * [Dependencies Installation](#dependency-installation) * [Build](#build) * [Localization](#localization) * [Extended Kalman Filter](#extended-kalman-filter) * [Unscented Kalman Filter](#unscented-kalman-filter) * [Particle Filter](#particle-filter) * [Path Planning](#path-planning) * [Dijkstra](#dijkstra) * [AStar](#astar) * [RRT](#rrt) * [RRTstar](#rrtstar) * [PRM](#prm) * [Potential Field](#potential-field) * [Quintic Polynomial](#quintic-polynomial) * [Cubic Spline](#cubic-spline) * [DWA](#dwa) * [Model Predictive Trajectory Generator](#model-predictive-trajectory-generator) * [State Lattice Planner](#state-lattice-planner) * [Path Tracking](#path-tracking) * [Move to Pose](#move-to-pose) * [Stanely Control](#stanley-control) * [Model Predictive Control](#model-predictive-control) ## Requirments Tested on Ubuntu 18.04 - cmake - opencv 3.3 (for KD tree in PRM) - Eigen 3 - Boost 1.4 (for gnuplot-iostream) - gnuplot - ipoptd (this one is a pickle, [install tips borrowed from Udacity](https://github.com/udacity/CarND-MPC-Quizzes/blob/master/install_Ipopt_CppAD.md) ) - cppad ## Running with Docker The Docker image is about 3GB. Deployment ``` $ sudo docker build -f Dockerfile -t ctfchan/learn-robotics-cpp:latest . $ sudo docker push ctfchan/learn-robotics-cpp:latest ``` Make sure `-it ctfchan/learn-robotics-cpp` goes last when you do `docker run`. ``` $ sudo docker pull ctfchan/learn-robotics-cpp $ sudo docker run --name learn-robotics-cpp --mount type=bind,source="$(pwd)",target=/root/LearnRoboticsCpp -it ctfchan/learn-robotics-cpp ``` From inside the Docker ``` $ cd ~/LearnRoboticsCpp $ ./bin/state_lattice # or whatever executable you want to run ``` The images will show up in the `animations` directory. `docker stop` when you're done. `docker rm` when you want to get rid of the container to start over or something. ``` $ sudo docker stop learn-robotics-cpp $ sudo docker rm learn-robotics-cpp ``` `docker exec` to run it after you stop it. ``` $ sudo docker exec learn-robotics-cpp bash ``` ## Path Planning ### DWA  ### Dijkstra  ### A*  ### PRM  ### RRT  ### RRTStar  ### Potential Field  ### Quintic Polynomial  [Explanation](https://ctfchan.github.io/blog/quintic-polynomials) ### Cubic Spline  [Explanation](https://ctfchan.github.io/blog/cubic-splines) ### Model Predictive Trajectory Generation  [Explanation](https://ctfchan.github.io/blog/trajectory-generator) ### State Lattice Planner