Skip to content

mohamdev/Inverse-Optimal-Control-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inverse Optimal Control (IOC) with Bayesian Optimization

Overview

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.

Features

  • 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

Requirements

Libraries

  1. Pinocchio: state-of-the-art Rigid Body Algorithms for poly-articulated systems.
  2. Ipopt: An open-source software package for large-scale nonlinear optimization.
  3. CppADCodegen: Automatic differentiation with support for code generation.
  4. BayesOpt: A library for Bayesian optimization.

Tools

  • CMake: For building and managing the project.
  • gcc/g++: C++ compiler.

Installation

1. Clone the Repository

git clone https://github.com/mohamdev/Inverse-Optimal-Control-cpp.git
cd Inverse-Optimal-Control-cpp

2. Install Dependencies

Make sure to install all required libraries (Ipopt, CppADCodegen, and BayesOpt) and ensure they are available in your system's library paths.

3. Build the Project

mkdir build && cd build
cmake ..
make

Directory Structure

.
├── 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

How to Run

Example: Perform IOC with Bayesian Optimization

  1. Navigate to the build directory:
    cd build
  2. Run the IOC executable (replace example_executable with the relevant binary name):
    ./apps/main_IOC_bayesopt

Acknowledgments

  • Ipopt: For enabling robust DOC solutions.
  • CppADCodegen: For making gradient computations fast and efficient.
  • BayesOpt: For providing a flexible Bayesian optimization framework.

Contact

For questions or suggestions, feel free to open an issue or contact mohamdev.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors