This repository contains source of training material for the OCP/MPC Workshop 2024
. The topics covered are:
- Nonlinear programming
- Solving nonlinear programs with CasADi
- Optimal control problems
- Using Rockit to swiftly specify and solve optimal control problems
- Model predictive control
- Using Impact to rapidly specify, prototype and deploy model predictive controllers.
If you have not installed Conda, you should first install Miniconda. Miniconda is a minimal installer for Conda. You can install Miniconda by following these steps:
- Download the Miniconda installer for Linux from the Miniconda website.
- Open a terminal.
- Navigate to the directory where you downloaded the installer.
- Run the installer with the following command, replacing
Miniconda3-latest-Linux-x86_64.sh
with the name of the file you downloaded:bash Miniconda3-latest-Linux-x86_64.sh
- Follow the on-screen instructions to complete the installation.
- Close and reopen your terminal to apply the changes.
For Windows users, follow these steps to install Miniconda:
- Download the Miniconda installer for Windows from the Miniconda website.
- Double-click the downloaded file to start the installation.
- Follow the on-screen instructions, making sure to check the option to "Add Miniconda to my PATH environment variable" for an easier use of Conda from the command prompt.
- After installation, open the Command Prompt or Anaconda Prompt from the Start menu to start using Conda.
Create Conda environment with CasADi 3.6.5 + Rockit + Impact using the following command:
conda env create -f mecoverse_environment.yml
This will create a conda environment called mecoverse
.
Activate the conda environment by running in a terminal
conda activate mecoverse
For the second part of the Impact tutorial you will need to install additional libraries in your environment. Since some of these libraries downgrade the version of CasADi, we recommend you to create a separate Conda environment for this. To create a Conda environment that includes Pinocchio, the Robotics Toolbos for Python and the RobotsMECO library (to generate symbolic robot models compatible with CasADi using Pinocchio), just execute the following command:
conda env create -f mecoverse_robotics_environment.yml
This will create a conda environment called mecoverse-robotics
.
Activate the conda environment by running in a terminal
conda activate mecoverse-robotics
You can follow the instructions provided in the instructions file for the Impact tutorial - Part 2.
This workshop has received funding from the MIT-Belgium - KU Leuven Seed Fund within the framework of the MIT International Science and Technology Initiatives (MISTI) grant programme.
This work is licensed under a Creative Commons Attribution 4.0 International License.