This repository contains a fast deployable implementation of Inverse Optimal Control (IOC) for planar box lifting task, formulated through Bayesian Optimization with bayesopt implementation. Costs of the Direct Optimal Control (DOC) are pre-compiled with CppADCodegen and Pinocchio. Ipopt solver is used to solve the DOC.
- IOC: Consists in determining the optimal cost function weights for a DOC, by observing optimal behavior.
- Bayesian Optimization: Solves IOC by approximating DOC cost space through a surrogate model that is function of the costs weights.
- Direct Optimal Control (DOC): Formulates the motion generation problem as the minimization of a weighted sum of cost functions
- Pinocchio: state-of-the-art Rigid Body Algorithms for poly-articulated systems.
- Ipopt: An open-source software package for large-scale nonlinear optimization.
- CppADCodegen: Automatic differentiation with support for code generation.
- BayesOpt: A library for Bayesian optimization.
- CMake: For building and managing the project.
- gcc/g++: C++ compiler.
git clone https://github.com/mohamdev/Inverse-Optimal-Control-cpp.git
cd Inverse-Optimal-Control-cppMake sure to install all required libraries (Ipopt, CppADCodegen, and BayesOpt) and ensure they are available in your system's library paths.
mkdir build && cd build
cmake ..
make.
├── apps # Main executables for testing and demonstrating IOC & DOC
├── cg_libs # CppADCodegen support files
├── data # Example data files (inputs, outputs, reference trajectories)
├── include # Header files
├── output_ioc # Outputs generated by IOC
├── src # Source files for IOC, DOC, and supporting functionality
└── CMakeLists.txt # Build configuration
- Navigate to the build directory:
cd build - Run the IOC executable (replace
example_executablewith the relevant binary name):./apps/main_IOC_bayesopt
- Ipopt: For enabling robust DOC solutions.
- CppADCodegen: For making gradient computations fast and efficient.
- BayesOpt: For providing a flexible Bayesian optimization framework.
For questions or suggestions, feel free to open an issue or contact mohamdev.