clone the repo in the home/user directory and cd into the capracontrol directory.
git submodule update --recursive --init
cd ~/dtmpc/src/mpc/acados
mkdir -p build
cd build
cmake -DACADOS_WITH_QPOASES=ON ..
make install -j4
cd ~/dtmpc/
sudo apt install python3-pip
cd ~/dtmpc/src/mpc/acados/
pip install -e interfaces/acados_template
cd ~/dtmpc/
cd ~/dtmpc/
sudo apt install cargo
cd ~/dtmpc/src/mpc/acados/
git clone https://github.com/acados/tera_renderer.git
cd tera_renderer
cargo build --verbose --release
cd target/release/
cd ~/dtmpc/src/mpc/acados/
cp tera_renderer/target/release/t_renderer bin/
cd ~/dtmpc/
Very important note. You must source each time you run the simulation. Each time you start up there is no need to build and install the code. Just run these lines and the libary is setup.
source setup_acados.sh
source setup_acados.sh
cd ~/dtmpc
python3 src/mpc/acados/examples/acados_python/getting_started/minimal_example_ocp.py
If you a graph with states and control input over time to reach a set point then it works.
- ACADOS_SUCCESS,
- ACADOS_FAILURE,
- ACADOS_MAXITER,
- ACADOS_MINSTEP,
- ACADOS_QP_FAILURE,
- ACADOS_READY,
- SUCCESS, // found solution satisfying accuracy tolerance
- MAX_ITER, // maximum iteration number reached
- MIN_STEP, // minimum step length reached
- NAN_SOL, // NaN in solution detected
- INCONS_EQ, // unconsistent equality constraints