Building on OSX

Apple logoBuilding on OSX

 

1.  In the CMake GUI, first click on Generate to prepare the build solution. Select your generator. When it is done, you can set the variable SOFA_EXTERNAL_DIRECTORIES to the path of your softrobots plugin.

2. The plugin has a dependency to the qpOASES library. In the SoftRobots/extlibs/qpOASES-3.2.0/make.mk file, check that only “include make_osx.mk” is uncomment.

#include ${TOP}/make_linux.mk
#include ${TOP}/make_cygwin.mk
#include ${TOP}/make_windows.mk
include ${TOP}/make_osx.mk

Install qpOASES using the following commands:

cd SoftRobots/extilbs/qpOASES-3.2.0
make

If necessary, see https://projects.coin-or.org/qpOASES/wiki/QpoasesInstallation.

3. Finally, you can start the compilation of the plugin by going into the build directory and launching (depending on your build system):

ninja

or

make

4. You can now test the plugin by using:

cd YOUR_BUILD_DIR/bin
runSofa PATH_TO_SOFA/application/plugins/SoftRobots/examples/AN_EXAMPLE

NB: Most of the examples provided in the SoftRobots plugin require the SofaPython plugin. This plugin is enabled by default when using the SoftRobots plugin.
The runSofa application has a plugin manager. If you want a plugin library to be loaded by the application you have two options:

  1. Add to your scene a “RequiredPlugin” component (see the modeler application for more information, or the examples provided in the plugin)
  2. Manually add it using the “Edit/plugin manager” of the runSofa application

If you want runSofa to recognize python extension “.py” or “.pyscn”, you will need to add the python plugin library manually.

Comments are closed