UPMC iCub project/MACSi Software
Getting MACSi software
You can get MACSi code using a subversion client (Linux = svn ; Windows = tortoiseSvn ) and the following command:
Currently, the repository is secured by login and password. To obtain yours, ask Serena (serena.ivaldi _AT_ isir.upmc.fr).
Setting up your system
To compile MACSi code, you need to set up your machine properly: particularly, you must install YARP and iCub and prepare your system with libraries and environment variables.
- some modules require ROS.
- some vision modules require PAE and OpenNI. PAE is a vision library developed within INRIA, and the access is not open yet. If you're running into troubles compiling vision modules, simply uncomment the modules in the CMakelists.
- some vision modules require different versions of OpenCV. We suggest you to install the other OpenCV versions in custom locations (for example /home/icub/opt) to avoid conflicts, then check the makefile to verify that each module is linking the proper version.
- Some CMake files of iCub have been recently changed particularly iCubFindDependencies.cmake is no longer installed. This file is used by MACSi's CMake files to keep MACSi code aligned with iCub. In MACSi's CMake main file it is evoked by default, so you will need to have it installed manually (or you can edit iCub's CMake file). This procedure is not necessary, but warmly encouraged to facilitate the compiling/linking.
If you have questions or troubles, please write to Serena Ivaldi.
The repository has the same organization of iCub, indeed exploits some CMake files to create the project and its executables. The procedure is the following:
- Install YARP
- Install iCub
- Check the installation of the CMake files, praticularly iCubFindDependencies.cmake
- Get MACSi code via svn
- Set the following environment variables ( assuming you put the code in $CODE/macsi ) :
$MACSI_ROOT = $CODE/macsi $MACSI_DIR = $CODE/macsi/main/build
- Create MACSI_DIR, for example
cd $MACSI_ROOT/main mkdir build
- Compile MACSi, creating a CMake project
cd $MACSI_DIR ccmake .. make make install make install_applications
Now you can run MACSi modules!
- In the iCub cluster at ISIR, we put the code in /home/icub/software/src/iCub_MACSI
- You may want to change the INSTALLATION_PREFIX during the CMake configuration, if you want to put the executables in a specific folder. Remember to add this foder to the system path. For example in the iCub cluster we put everything in /home/icub/software -> /bin /lib /include /share
You can run modules both from command-line and from the application GUI. Configuration files are generally stored in $MACSI_ROOT/main/app. Each module or application has its folder (e.g. module) and there's a standard for its configuration files:
stores a *.xml.template file, which is used to provide a template for the xml file used to launch the application GUI. Copy the xml template file and rename it as .xml (i.e. remove the .template) and edit it to fit it with your configuration, particularly to comply with the yarprun servers.
stores the configuration files, which are generally used to read specific parameters (e.g. the robot = icub or icubSim) for the module. You can create yours to change parameters.
- Launch module:
module --from $MACSI_ROOT/main/app/module/conf/file.ini
- Connect ports manually
yarp connect /module/port:o /others_module/port:i ... yarp connect /others_module/port:o /module/port:i
- To terminate the module, first disconnect ports manually
- Send terminate commands where possible:
yarp terminate /module
- Use ctrl+c
Using the GUI
- Launch GUI using python manager
- Click on "run modules" then "connect" to run the module
- To terminate the module, click on "disconnect" then "stop modules"