Skip to content

Instantly share code, notes, and snippets.

@Jimbles
Last active July 12, 2019 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jimbles/3ce065988229ff67fd10606dc82ccd37 to your computer and use it in GitHub Desktop.
Save Jimbles/3ce065988229ff67fd10606dc82ccd37 to your computer and use it in GitHub Desktop.
SOFA Ubtuntu 18.04 build steps

SOFA Soft Robots build on Ubuntu 18.04

Steps to install and build SOFA with soft robots from scratch on a fresh Ubuntu 18.04 virtual machine (windows host)

Naturally we start with update and installing git

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git

install dependencies

From linux build instructions here

build essentials, CMAKE and ccache

sudo apt-get install build-essential cmake cmake-qt-gui
sudo apt-get install ccache

Libraries

Boost

sudo apt-get install libboost-atomic-dev libboost-chrono-dev libboost-date-time-dev libboost-filesystem-dev libboost-locale-dev libboost-regex-dev libboost-system-dev libboost-thread-dev libboost-program-options-dev

Python

sudo apt-get install python2.7-dev python-numpy python-scipy

Other libraries

sudo apt-get install libpng-dev libjpeg-dev libtiff-dev zlib1g-dev libglew-dev
sudo apt-get install libxml2-dev libcgal-dev libblas-dev liblapack-dev libsuitesparse-dev libassimp-dev

QT - unified installer - downloaded file qt-unified-linux-x64-3.1.1-online.run and make it executable

chmod a+x qt-unified-linux-x64-3.1.1-online.run
./qt-unified-linux-x64-3.1.1-online.run

Do not create an account. Under the latest version

  • check Desktop gcc 64-bit and qt charts

Building SOFA

Now we are following the soft robots build instructions instead here

sofa main

from home get latest unstable sofa

git clone -b master https://github.com/sofa-framework/sofa.git sofa/master/src/

this makes /home/james/sofa/master/src

soft robots plugin

from home again

git clone https://github.com/SofaDefrost/SoftRobots

STLIB plugin

git clone https://github.com/SofaDefrost/STLIB.git

cmake gui

cd to /home/james/sofa then run the cmake gui cmake-gui

  • point source to /home/james/sofa/master/src

  • point build directory to /home/james/sofa/build

  • Click generate and then use defaults "unix makefiles" and "use default native compilers"

  • add /home/james/STLIB;/home/james/SoftRobots; to SOFA_EXTERNAL_DIRECTORIES THE ORDER MATTERS

  • check PLUGIN_SOFAPYTHON

  • check SOFA_BUILD_METIS

  • check SOFA_USE_CCACHE

  • check SOFA_BUILD_TUTORIALS

If you hit generate then we get errors because it cannot find qt, so use the instructions at the bottom here

  • click Add Entry then CMAKE_PREFIX_PATH with type path and then point to path /home/james/Qt/5.13.0/gcc_64

If you configure now you should get "Configuring done"

Hit Generate, and then in the build directory

make -j 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment