First clone the repository
git clone https://github.com/roahmlab/RAPTOR.git
We strongly recommend using Docker. We have provided a Dockerfile that will automatically install all the required packages. If you don't have Docker installed, you can find the installation instructions here.
You should complete HSL steps BEFORE you build the docker image otherwise you will have error.
We have selected HSL to solve large linear systems in the nonlinear optimization problem. Please follow the instructions below to complete the installation:
Besides official HSL code, we used ThirdParty-HSL, which is specifically tailored for COIN-OR projects, particularly Ipopt, offering easier integration and installation.
git clone https://github.com/coin-or-tools/ThirdParty-HSL.git.
- Download the tarball containing the Coin-HSL source code from its official website. You will need to apply a license for it. The academic license is free but it could take 1 or 2 days to process the order.
- Download code from ThirdParty-HSL.
- Unpack the Coin-HSL source code and rename the folder as
coinhsl
. - Place the
coinhsl
folder inside ThirdParty-HSL folder, which serves as a wrapper to simplify the compilation and integration of HSL. - Rename the ThirdParty-HSL folder as
HSL
,then compress it into aHSL.zip
file. Note: This zip file will later be 'unziped' and built inside the docker container.
The provided Dockerfile is at docker/Dockerfile. Follow the following intructions to build and enter the docker image.
- Move the
HSL.zip
file indocker/
so that dockerfile can find it. - In Visual Studio Code, simply click
ctrl+shift+P
and search "Dev Containers: Rebuild and Reopen Container", it will build the environment automatically for you from docker/Dockerfile so that you don't need to follow the steps below.
All of the following instructions are assuming that the packages are installed to root directories, like /usr/local or /usr. You might need to edit your ~/.basrc so that the environment variable PATH includes /usr/local/bin and LD_LIBRARY_PATH includes /usr/local/lib. Be careful if you are using a shared server.
sudo apt-get install libgsl-dev
sudo apt-get install libboost-all-dev
sudo apt-get install libyaml-cpp-dev
In Ubuntu 22.04, the Eigen library version is 3.4.0 by default. Simply do
sudo apt install libeigen3-dev
In Ubuntu 20.04, the Eigen library version is 3.3.7 by default. You will have to go to the official website and manually install it.
Please refer to the offical website link.
One small issue could be: pinocchio
would recommend you install through robotpkg
on Linux systems, while some people mainly works with pinocchio
in Python so they install pinocchio
through conda
.
robotpkg
installs pinocchio
in /opt/openrobots/
while conda
installs pinocchio
in ~/miniconda3/
.
Try to avoid installing two pinocchio
on your computer.
If you have to, be sure to specify the paths carefully when you try to link your program to pinocchio
.
Please refer to this link.
Note that in section "Download, build, and install dependencies", you actually only to install one of the external libraries. We choose HSL to solve large linear systems in a nonlinear optimization problem.
Check this github repository out and follow the instructions there.
To be more specific, you need to get HSL library from its official website,
and then put the folder inside ThirdParty-HSL.
After compilation, you should be able to find the library libcoinhsl.so
installed in /usr/local/lib.
If not, please manually move them to /usr/local/lib
so that it is easier for cmake to find them automatically.
I have had one issue before where ipopt tries to find libhsl.so
instead of libcoinhsl.so
.
So libhsl.so
is the actual name of this library while libcoinhsl.so
is the name when compiled in the ThirdParty-HSL wrapper.
You might need to create a symbolic link manually
sudo ln -s libcoinhsl.so libhsl.so
There are a lot of moving pieces here so something might not work or my README is still not enough. Please contact me ([email protected]) if you encounter any problems installing ipopt.