Difference between revisions of "UPMC iCub project/MACSi Software"

From Wiki for iCub and Friends
Jump to: navigation, search
Line 11: Line 11:
  
 
'''Notes''':  
 
'''Notes''':  
 +
* some modules require ROS
 
* some vision modules require PAE and OpenNI
 
* some vision modules require PAE and OpenNI
 
* 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 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.  

Revision as of 19:04, 24 January 2013

Getting MACSi software

You can get MACSi code using a subversion client (Linux = svn ; Windows = tortoiseSvn ) and the following command:

  svn co https://hotline.isir.upmc.fr/svn/macsi/

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.

Notes:

  • some modules require ROS
  • some vision modules require PAE and OpenNI
  • 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.

If you have questions or troubles, please write to Serena Ivaldi.

Compiling

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
  • 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!

Notes:

  • 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

Running applications

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:

  $MACSI_ROOT/main/app/module/scripts

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.

  $MACSI_ROOT/main/app/module/conf

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.

Command line

  • 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
 manager.py $MACSI_ROOT/main/app/module/scripts/module.xml
  • Click on "run modules" then "connect" to run the module
  • To terminate the module, click on "disconnect" then "stop modules"