|
1 | 1 | # Parallel DDP for GPU/CPU # |
2 | 2 |
|
3 | | -This repository holds the code supporting "[A Performance Analysis of Differential Dynamic Programming on a GPU](https://agile.seas.harvard.edu/publications/performance-analysis-parallel-differential-dynamic-programming-gpu)." It is also where experimental work is being done to extend this work. |
| 3 | +### Releases |
| 4 | +**```v0.1: WAFR 2018 Release```** |
| 5 | +holds the code supporting "[A Performance Analysis of Differential Dynamic Programming on a GPU](https://agile.seas.harvard.edu/publications/performance-analysis-parallel-differential-dynamic-programming-gpu)." |
| 6 | + |
| 7 | +**```v0.2: ICRA 2019 Release```** extends the previous work by integrating LCM for hardware experiments and cleaning up the code base / interface. <!--An extended abstract describing the hardware experiments can be found [here]().--> |
4 | 8 |
|
5 | 9 | ### Stucture of this Repository |
6 | | -* ```WAFR_MPC_examples.cu``` and ```WAFR_MPC_examples.cu``` are the main files which run the experiments from the paper (see the comment at the top of each file for the compilation instructions) |
7 | | -* ```config.h``` defines all of the settings (parallel level, plant, etc.) for an experiment |
8 | | -* ```DDPHelpers.cuh``` imports all of the various helper functions and files from the following folders as needed |
9 | | -* ```/DDPHelpers/*``` holds most of the functions as inlined templated CUDA header files |
| 10 | +* ```config.h``` defines all of the default settings (parallel level, plant, etc.) for an experiment and imports all of the various helper functions and files from the following folders as needed |
| 11 | +* ```/examples/*``` holds the scripts that run the WAFR examples and LCM examples (see the comment at the top of each file for the compilation instructions) |
10 | 12 | * ```/plants/*``` holds custom rigid body dynamics and/or analytical dynamics and cost functions for currently supported plants |
| 13 | +* ```/DDPHelpers/*``` holds most of the functions for DDP as inlined templated CUDA header files |
11 | 14 | * ```/utils/*``` holds a variety of support code for matrix multiplication, discrete time integrators, thread/CUDA support, etc. |
12 | | -* ```/lcmtypes/*``` holds experimental LCM types for multi-computer / hardware communication |
| 15 | +* ```/test/*``` holds a variety of testing scripts for various function calls and derivatives (see the comment at the top of each file for the compilation instructions) |
| 16 | +* ```/lcmtypes/*``` holds LCM types for multi-computer / hardware communication |
13 | 17 |
|
14 | 18 | ### Dependencies |
15 | | -* [CUDA](https://developer.nvidia.com/cuda-zone) needs to be installed as code needs to be compiled with the NVCC comiler |
16 | | -* For experimental multi-computer / hardware MPC code there is an additional communicaiton dependency: [LCM](https://lcm-proj.github.io/). |
| 19 | +* [CUDA](https://developer.nvidia.com/cuda-zone) needs to be installed as code needs to be compiled with the NVCC comiler. Currently, this code has been tested with CUDA 9 and X. |
| 20 | +* For multi-computer / hardware MPC code there is an additional communicaiton dependency: [LCM](https://lcm-proj.github.io/). |
| 21 | + |
| 22 | +### Instalation Tips for CUDA |
| 23 | +https://askubuntu.com/questions/1077061/how-do-i-install-nvidia-and-cuda-drivers-into-ubuntu |
| 24 | +https://www.tensorflow.org/install/gpu |
| 25 | + |
| 26 | +### To use with the Drake Kuka Simulator |
| 27 | +1) Install this fork of drake: [https://github.com/plancherb1/drake](https://github.com/plancherb1/drake) |
| 28 | +2) You need to put in you .bashrc ```export DRAKE_PATH_ROOT=<path_to_drake>``` |
| 29 | +Then the scripts in the utils folder should launch the drake visualizer and simulator |
17 | 30 |
|
18 | | -### Known Bugs / Ongoing Development |
19 | | -* Finite-Diff Derivatives are currently only partially implemented (and broken) |
20 | | -* Small float rounding differences need to be investigated further (probably benign) |
21 | | -* GPU RBDYN for Kuka only works in Euler mode -- need to introduce loops and reduce shared memory for Midpoint and RK3 (or use a brand new GPU which has double the shared memory) |
22 | | -* LCM infrastructure for multi-computer / hardware MPC only partially developed (and currenlty commented out) |
23 | | -* Need to catch up the CPU MPC to GPU MPC implementation |
| 31 | +### Known Bugs / Ongoing Development / Roadmap |
| 32 | +* On roadmap to develop a CPU/GPU hybrid (only the gradients on the GPU) and a fully serial CPU version without any instruction level parallelism |
| 33 | +* GPU RBDYN for Kuka only works in Euler mode -- need to introduce loops and reduce shared memory for Midpoint and RK3 (or use a brand new GPU which has double the shared memory) -- potential to also optimize the gradient calc to require less shared memory |
| 34 | +* CPU MPC suffers from resource contention when trajRunner and Goal are on same computer -- need to improve and provide seperate compile paths -- also CPU MPC Parallel Line Search has a subtle bug (in iLQR is identical to serial but diverges in MPC -- need to debug) |
| 35 | +* Constraint handling / penalities need further development - would like to add full AL constraints and/or projection methods |
| 36 | +* Final cost shift is in development and non-functional (tied to frequency and not last goal change / shift count) |
| 37 | +* SLQ implementation is currently broken (and EE version needs a cost kernel) |
| 38 | +* EEVel rpy derivatives are currently broken (may explore forced finite diff) |
| 39 | +* BFGS iters may improve / stabilize the EEPos/Vel cost and should be explored |
| 40 | +* Square root implementation of DDP should add numerical stability and should be explored |
| 41 | +* Want to develop URDF > transforms and inertias tool for Arm |
| 42 | +* Would be nice to add a runtime and not compile time switch for Hardware vs. Sim mode and for level of parallelism (M) |
0 commit comments