Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
src
 
 
 
 
 
 

README.md

LearnRoboticsCpp

This repository contains my implementations of classical robotics algorithms in C++. Inspiration drawn from PythonRobotics and CppRobotics. 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 instead for plotting which makes much prettier graphs than OpenCV and allows for us to easily make 3D plots.

Table of Contents

Requirments

Tested on Ubuntu 18.04

Dependencies Installation

  1. apt installs
sudo apt update
sudo apt install build-essential
sudo apt install cmake
sudo apt install gnuplot
sudo apt install libboost-all-dev
sudo apt install libopencv-dev python3-opencv
sudo apt install libeigen3-dev
sudo apt install cppad
  1. ipoptd install
sudo apt install gfortran
sudo apt install unzip

You probably want to cd into another directory like Downloads for this folder

wget https://www.coin-or.org/download/source/Ipopt/Ipopt-3.12.7.zip && unzip Ipopt-3.12.7.zip && rm Ipopt-3.12.7.zip

Call install_ipopt.sh in this repo with sudo and the source directory as the first argument (e.g. sudo bash install_ipopt.sh ~/Ipopt-3.12.7)

  1. Xming (for Windows Subsystem Linux users only) Need to install xming for gnuplot visualization: https://sourceforge.net/projects/xming/. Set display to gnuplot with: $ export DISPLAY=:0 gnuplot.

Build

$ git clone https://github.com/CtfChan/LearnRoboticsCpp.git
$ mkdir build
$ cd build
$ cmake ../
$ make -j4

Path Planning

DWA

DWA Demo

Dijkstra

Dijkstra Demo

A*

A* Demo

PRM

PRM Demo

RRT

RRT Demo

RRTStar

RRTStar Demo

Potential Field

Potential Field Demo

Quintic Polynomial

Quintic Polynomial Demo

Cubic Spline

Cubic Spline Demo

Model Predictive Trajectory Generation

 Model Predictive Trajectory Generation

State Lattice Planner

Left to right: uniform, biased, lane sampling

Path Tracking

Move To Pose

Move To Pose Demo

Stanley Control

Stanely Control Demo

Model Predictive Control

Model Predictive Control Demo

Localization

Extended Kalman Filter

Extended Kalman Filter Demo

Unscented Kalman Filter

Unscented Kalman Filter Demo

We can see error ellipse in this demo is a much better approximation of the true distribution. EKF can be biased and inconsistent.

Particle Filter

Particle Filter Demo

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.