1.首先安装依赖osqp和Eigen3
由于Eigen3已安装好,下面记录安装osqp:
git clone --recursive https://github.com/oxfordcontrol/osqp
cd osqp
mkdir build
cd build
cmake .. -DBUILD_SHARED_LIBS=ON
make -j6
sudo make install
2.安装osqp-eigen
git clone https://github.com/robotology/osqp-eigen.git
cd osqp-eigen
mkdir build && cd build
cmake ../ #默认安装在/usr/local/include中,非apt安装的包,不在/usr/include/下,而是/usr/local/include下
make
sudo make install
如果git不成功,可以换成下面的gitee托管的:
git clone https://gitee.com/YaoFL/osqp-eigen.git