Eigen安装
sudo apt-get install libeigen3-dev #进行安装
1、CppAD 安装
sudo apt-get install cppad
CppAD需要调用系统中已经安装好的优化求解器,如非线性优化器ipopt、Gurobi、GLPK。
2、Ipopt安装
# How to install Ipopt on arm environment
## Inatall CPPAD & Fortran
$ sudo apt-get install cppad gfortran
## Get ipopt source code
Download Ipopt-3.12.8.tgz from https://www.coin-or.org/download/source/Ipopt/
Untar the package and cd into the "Ipopt-3.12.8" folder
## Step by step
$ cd CUSTOM_PATH/Ipopt-3.12.8/ThirdParty/Blas
$ ./get.Blas
$ cd ../Lapack
$ ./get.Lapack
$ cd ../Mumps
$ ./get.Mumps
$ cd ../Metis
$ ./get.Metis
$ cd CUSTOM_PATH/Ipopt-3.12.8
$ mkdir build
$ cd build
$ ../configure --build=arm-linux
$ make -j4
$ make install
## Copy install files into specific directory
$ cd CUSTOM_PATH/Ipopt-3.12.8/build
$ sudo cp -a include/* /usr/include/.
$ sudo cp -a lib/* /usr/lib/.
## Trouble Shooting
If something wrong like: "redefinition of ‘bool CppAD::is_pod()"
Modify the file:
$ sudo gedit /usr/include/cppad/configure.hpp
Change line from:
define CPPAD_SIZE_T_NOT_UNSIGNED_INT 1
to
define CPPAD_SIZE_T_NOT_UNSIGNED_INT 0
# How to install Ipopt on x86 environment
## Inatall CPPAD & Fortran
$ sudo apt-get install cppad gfortran
## Get ipopt source code
Download Ipopt-3.12.8.tgz from https://www.coin-or.org/download/source/Ipopt/
Untar the package and cd into the "Ipopt-3.12.8" folder
## Step by step
$ cd CUSTOM_PATH/Ipopt-3.12.8/ThirdParty/Blas
$ ./get.Blas
$ cd ../Lapack
$ ./get.Lapack
$ cd ../Mumps
$ ./get.Mumps
$ cd ../Metis
$ ./get.Metis
$ cd ../ASL
$ ./get.ASL
$ cd CUSTOM_PATH/Ipopt-3.12.8
$ mkdir build
$ cd build
$ ../configure
$ make -j4
$ make install
## Copy install files into specific directory
$ cd CUSTOM_PATH/Ipopt-3.12.8/build
$ sudo cp -a include/* /usr/include/.
$ sudo cp -a lib/* /usr/lib/.
3、osqp安装
这里默认git的是最新版本,apollo默认用的是0.5.0版本,可以切换0.6.0。0.6.0更新了osqp_setup
git clone --recursive https://github.com/oxfordcontrol/osqp
cd osqp
mkdir build
cd build
cmake -G "Unix Makefiles" ..
cmake --build .
make
sudo make install
4、osqp-eigen
git clone https://github.com/robotology/osqp-eigen.git
cd osqp-eigen
mkdir build
cd build
cmake -G "Unix Makefiles" ..
cmake --build .
make
sudo make install