| Prev: Running the Exemplificative Experiments | Up: Running the Exemplificative Experiments | Next: Configuring an Experiment |
|---|---|---|
Table of contents
In the following section we provide the instructions for compiling a FARSA plugin under the Windows, Linux, or MAC OS operating systems. We will use one of the exemplificative experiments that come with the FARSA distribution, but the same procedure applies to all plugins. We assume that you already installed FARSA either through a binary release or compiling the sources code. If not, follow the instructions in this page.
In this guide we will use SOURCE_DIR to indicate the directory with the source files of the plugin and BUILD_DIR to indicate the directory where the plugin is compiled (which can be wherever you like). While the two may be coincident, it is advisable to keep them separatate: this way it is easy to start from scratch by removing all files from the BUILD_DIR. We will show how to compile an exemplificative experiment from the FARSA release, but the same instructions can be applied to any other plugin.
If you already installed and compiled the Source release of FARSA you can skip directly to Step 2.
You are now ready to run the corresponding experiment from the total99 application by loading the configuration file contained in the SOURCE_DIR\conf directory, by setting the right plugin directory in which the .dll file is located.
In addition to the steps above, you can also install the plugin. This has the advantage that you only need to specify its name in configuration files and not its full path. If the plugin also provides some example configurations, those will be installed as well and they will be listed in the main page of total99. Installing the plugin is compulsory in case other plugins depend on it (as is the case of the iCub plugin). To install the plugin simply build the "INSTALL" target in Visual Studio.
You will need the development package of FARSA to compile your plugins. If you installed farsa from binaries, you can simply install the FARSA-devel or farsa-dev package (refer to the Linux Binary Installation page for more information). If you installed and compiled the source release of FARSA you can already have all that is needed.
Compile and install the plugin with the following commands:
cd BUILD_DIR
make
If you setted CMake to generate project file for your IDE, then you do not have to run the make command above, but instead open the generated project file with your IDE and start the compilation and installation of the Plugin
Verify that the compiler has correctly produced a "BraitenbergExperiment.farsaPlugin.so" file in the build directory
You are now ready to run the corresponding experiment from the total99 application by loading the configuration file contained in the SOURCE_DIR/conf directory, by setting the right plugin directory in which the .so file is located.
In addition to the steps above, you can also install the plugin. This has the advantage that you only need to specify its name in configuration files and not its full path. If the plugin also provides some example configurations, those will be installed as well and they will be listed in the main page of total99. Installing the plugin is compulsory in case other plugins depend on it (as is the case of the iCub plugin). To install the plugin simply run the command "make install" from inside the build directory.
Generate the makefiles for the exerimental plugin that you want to compile by using CMake. Use the settings below:
Source directory = *SOURCE\_DIR*
Build directory = *BUILD\_DIR*
BUILD_TESTING = OFF
CMAKE_BUILD_TYPE = Release # or Debug if you want a debug build
CMAKE_EXE_LINKER_FLAGS = -L/opt/local/lib
CMAKE_SHARED_LINKER_FLAGS = -L/opt/local/lib
The last two options are visible only if the advanced mode of CMake is active.
Compile and install the plugin with the following commands:
cd BUILD_DIR
make
If you setted CMake to generate project file for XCode, then you do not have to run the make command above, but instead open the generated project file with XCode and start the compilation and installation of FARSA
Verify that the compiler has correctly produced a "BraitenbergExperiment.farsaPlugin.so" file in the build directory
You are now ready to run the corresponding experiment from the total99 application by loading the configuration file contained in the SOURCE_DIR/conf directory, by setting the right plugin directory in which the .so file is located.
In addition to the steps above, you can also install the plugin. This has the advantage that you only need to specify its name in configuration files and not its full path. If the plugin also provides some example configurations, those will be installed as well and they will be listed in the main page of total99. Installing the plugin is compulsory in case other plugins depend on it (as is the case of the iCub plugin). To install the plugin simply run the command "make install" from inside the build directory.
Manual: Configuring an Experiment
Manual: Home
Manual: Installation
Manual: RunningExperiments
Anonymous