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.
Some of these implementations will have a tutorial attached to it. It's still a work in progress.
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 )
- cppad
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
We can see error ellipse in this demo is a much better approximation of the true distribution. EKF can be biased and inconsistent.