Difference between revisions of "YARP 2.4 Migration"

From Wiki for iCub and Friends
Jump to: navigation, search
(Things that change in iCub)
Line 2: Line 2:
  
 
Migrating from YARP 2.3 to YARP 2.4 might require some changes to your code.
 
Migrating from YARP 2.3 to YARP 2.4 might require some changes to your code.
 +
 +
== Changes in YARP ==
 +
 +
* The main different was in the policy used in YARP to organize and search for configuration files has changed heavily: see [[ResourceFinder]]
 +
 +
* Devices:
 +
 +
controlBoardWrapper2
 +
analogServer
 +
virtualAnalogServer
 +
 +
have been moved to yarp. The version in icubmod is deprecated and will be removed.
  
 
== Things that change in iCub ==
 
== Things that change in iCub ==
Line 7: Line 19:
 
* Remove references to ICUB_ROOT in ResourceFinder configuration
 
* Remove references to ICUB_ROOT in ResourceFinder configuration
  
* No need to set ICUB_ROOT environment variable, ICUB_ROOT.ini is obsolete
+
* No need to set ICUB_ROOT environment variable
 +
 
 +
* $ICUB_ROOT/ICUB_ROOT.ini is obsolete
 +
 
 +
* Files that used to be in $ICUB_ROOT/app are now in $ICUB_DIR/app or installed in /usr/local with the binaries (depending on how you compile the code) (see changes to the ResourceFinder in the previous section). If existing old files in $ICUB_ROOT/app should be removed.
  
 
* Target ''install_application'' and ICUB_INSTALL_APPLICATIONS cmake flag removed, now applications and other files are with the binaries both in the build and in the installation directory
 
* Target ''install_application'' and ICUB_INSTALL_APPLICATIONS cmake flag removed, now applications and other files are with the binaries both in the build and in the installation directory
Line 28: Line 44:
  
 
* cmake functions for applications like icub_app()/icub_app_install() are obsolete, use yarp_install() instead
 
* cmake functions for applications like icub_app()/icub_app_install() are obsolete, use yarp_install() instead
 
* Devices:
 
 
controlBoardWrapper2
 
analogServer
 
virtualAnalogServer
 
 
have been moved to yarp. The version in icubmod is deprecated and will be removed.
 
  
 
* YARP_ROBOT_NAME environment variable replaces ICUB_ROBOTNAME
 
* YARP_ROBOT_NAME environment variable replaces ICUB_ROBOTNAME
 
== Changes in YARP ==
 
 
* The policy used in YARP to organize and search for configuration files has changed heavily: see [[ResourceFinder]]
 
  
 
== List of incompatible changes ==
 
== List of incompatible changes ==

Revision as of 13:09, 9 December 2013

This page is still work in progress and may change.

Migrating from YARP 2.3 to YARP 2.4 might require some changes to your code.

Changes in YARP

  • The main different was in the policy used in YARP to organize and search for configuration files has changed heavily: see ResourceFinder
  • Devices:
controlBoardWrapper2
analogServer 
virtualAnalogServer

have been moved to yarp. The version in icubmod is deprecated and will be removed.

Things that change in iCub

  • Remove references to ICUB_ROOT in ResourceFinder configuration
  • No need to set ICUB_ROOT environment variable
  • $ICUB_ROOT/ICUB_ROOT.ini is obsolete
  • Files that used to be in $ICUB_ROOT/app are now in $ICUB_DIR/app or installed in /usr/local with the binaries (depending on how you compile the code) (see changes to the ResourceFinder in the previous section). If existing old files in $ICUB_ROOT/app should be removed.
  • Target install_application and ICUB_INSTALL_APPLICATIONS cmake flag removed, now applications and other files are with the binaries both in the build and in the installation directory
  • Updated installation instructions:

ICub Software Installation

  • Repository description Better_Repository and CMake templates in particular have been updated:

Simple template for modules in main

Simple template for libraries in main

Simple template for modules in contrib

Simple template for libraries in contrib

  • Before you compile modules in contrib you have to set up the contrib package (this is described in the installation instructions)
  • cmake functions for applications like icub_app()/icub_app_install() are obsolete, use yarp_install() instead
  • YARP_ROBOT_NAME environment variable replaces ICUB_ROBOTNAME

List of incompatible changes

This is a list of incompatible changes from YARP 2.3 series to YARP 2.4

CMake

YARP_MODULE_PATH

cmake variable YARP_MODULE_PATH is a real "PATH" and therefore could be a list and not a single directory. This might break in a few cases (i.e. when used in include(${YARP_MODULE_PATH}/something.cmake)) There are 2 options to fix this:

  • Use the variable YARP_MODULE_DIR instead of YARP_MODULE_PATH:
    include(${YARP_MODULE_DIR}/something.cmake)
  • Add YARP_MODULE_PATH to the CMAKE_MODULE_PATH variable and use the filename without the path and the extension :
    set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${YARP_MODULE_PATH})
    include(something)