This library is actively under construction. Please wait for proper release after starring this repo ⭐ Also, I am writing this library for practical experience with C++. Any suggestions are helpful to me.
This is an optimal control solver library using constrained differential dynamic programming (CDDP) written in C++ based on Xie's paper. This library is particularly useful for mobile robot trajectory optimization and model predictive control (MPC).
The CDDP library solves problems in the form:
Author: Tomohiro Sasaki
- Eigen (Linear Algebra Library in CPP)
sudo apt-get install libeigen3-dev # For Ubuntu
brew install eigen # For macOS
Although the library automatically finds and installs the following dependencies via FetchContent, if you do not have ones, here is how you can install on your own.
conda install -c conda-forge osqp
git clone https://github.com/astomodynamics/CDDP-cpp
cd CDDP-cpp
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=</path/to/your/desired/directory>/cddp ..
make
make install
make test
If you want to use this library for ROS2 MPC node, please refer CDDP MPC Package
- Zhaoming Xie, C. Karen Liu, and Kris Hauser, "Differential Dynamic Programming with Nonlinear Constraints," 2017 IEEE International Conference on Robotics and Automation (ICRA), 2017.
- Zhamming Xie's github repository https://github.com/ZhaomingXie/CDDP
If you use this work in an academic context, please cite this repository.
- add state constraint handling
- add regularization process
- add initial guess functionality based on path planner solution
- add automatic differentiation
- add nonlinear objective and constraint handling
- add simulation and its plots