YARP  2.3.70.2
Yet Another Robot Platform
The ResourceFinder Specification
Author
Lorenzo Natale, Daniele Domenichelli, and Elena Ceseracciu

Directories used by ResourceFinder

Broadly speaking, there are three ways in which the ResourceFinder operates to locate files:

  • looking in the current working directory
  • according to a policy
  • performing a system-wide search according to the following environment variables

YARP_CONFIG_HOME

  • Location where user config files are stored <path to a directory>
  • Unless the user wants to test some specific setting, this environment variable should be unset

YARP_DATA_HOME

  • Location where user data files are stored <path to a directory>
  • Unless the user wants to test some specific setting, this environment variable should be unset

YARP_CONFIG_DIRS

  • Locations where system administrator data and config files are stored <list of path separated by (semi)colons>
  • These directories can be used by the system administrator to modify some specific setting for the system

YARP_DATA_DIRS

  • Locations where installed data and config files are stored <list of path separated by (semi)colons>.
  • These are usually the directories where the installers put the data files.
  • If a user wants to use uninstalled packages, she should modify this environment variable

When searching for files and directories, the ResourceFinder looks inside these directories in the above order, so that files modified by the user take precedence over installed ones.

The default value for these variables is dependent on the operating system.

Linux

Default values for Linux are based on the XDG Base Directory Specification (see http://standards.freedesktop.org/basedir-spec/basedir-spec-0.8.html). They rely on XDG environment variables, whose default values are:

$XDG_DATA_HOME:

$HOME/.local/share/

$XDG_CONFIG_HOME:

$HOME/.config/

$XDG_DATA_DIRS:

/usr/local/share/:/usr/share/

$XDG_CONFIG_DIRS:

/etc/xdg/

Default values for Yarp are:

$YARP_DATA_HOME:

$XDG_DATA_HOME + /yarp/

$YARP_CONFIG_HOME:

$XDG_CONFIG_HOME + /yarp/

$YARP_DATA_DIRS:

$XDG_DATA_DIRS + /yarp/ (appended to each dir)

$YARP_CONFIG_DIRS:

$XDG_CONFIG_DIRS + /yarp/ (appended to each dir) [NOTE: /etc/yarp is used as default instead of /etc/xdg/yarp ]

Windows

The following environment variables (with their respective default values) are available on windows:

%YARP_DIR%:

C:\Program Files\robotology\YARP_2.X.XX or C:\Program Files (x86)\robotology\YARP_2.X.XX (Set by the installer or by the user)

%HOMEPATH%:

C:\Users\<username> or C:\Documents and Settings\<username> (User home)

%APPDATA%:

%HOMEPATH%\AppData\Roaming (Windows 7) or %HOMEPATH%\Application Data (Windows XP) (Location where applications should store their data by default)

%ALLUSERSPROFILE%:

C:\ProgramData (Windows Vista) or C:\Documents and Settings\All Users (Windows XP) (Location of the "All Users" or "Common" profile folder)

Default values for Yarp are therefore:

%YARP_DATA_HOME%:

%APPDATA%\yarp

%YARP_CONFIG_HOME%:

%APPDATA%\yarp\config\

%YARP_DATA_DIRS%:

%YARP_DIR%\share\yarp\

%YARP_CONFIG_DIRS%:

%ALLUSERSPROFILE%\yarp\

macOS

On macOS, the following environment variable is used:

$HOME:

/Users/<username>

Default values for Yarp are therefore:

$YARP_DATA_HOME:

$HOME/Library/Application Support/yarp

$YARP_CONFIG_HOME:

$HOME/Library/Preferences/yarp

$YARP_DATA_DIRS:

/usr/local/share/yarp:/usr/share/yarp

$YARP_CONFIG_DIRS:

/etc/yarp:Library/Preferences/yarp

Configuration Files

Config files are INI files that contain parameters used by Yarp's own executables.

  1. User $YARP_CONFIG_HOME
  2. Sysadmin $YARP_CONFIG_DIRS + /config/
  3. Installed ($YARP_DATA_DIRS && path.d) + /config/