Yarp-config

From Wiki for iCub and Friends
Jump to: navigation, search

First learn how to use yarp-config:

http://wiki.icub.org/yarpdoc/yarp_yarp-config.html

Robot configuration (on the PC104)

The following rules apply to a robot with standard laptop installation.

  • repository files are located in the folder:
 /usr/local/src/robot/icub-main/app/robots/<YARP_ROBOT_NAME>

If you want to do permanent modification to the configuration of your robot, you need to edit files located in the above path and commit them to the repository. This path is not searched by robotInterface.

  • when the user executes the following commands:
 ccmake..
 make 

on the pc104 from the folder /usr/local/src/robot/icub-main/build-pc104, files are copied from the above directory (/usr/local/src/robot/icub-main/app/robots/<YARP_ROBOT_NAME>) to the folder:

 /usr/local/src/robot/icub-main/build-pc104/share/<YARP_ROBOT_NAME>

RobotInterface tipically searches the configuration files of the robot in this folder. It's important to remember that this folder is overwritten everytime the user ru ns ccmake/make. So build-pc104/share is a good place only for testing a new configuration, but not to make permanent changes.

  • if you want to make permanent changes, but you still do not want to commit files to repository you can copy them to the local user directoy (which has priority respect the the build-pc104/share folder). For this purpose, you can use the yarp-config tool to copy ALL the robot files:
yarp-config robot import <YARP_ROBOT_NAME>

If you want to copy just a subset of files, leaving the others in the build-pc104/share folder, you can use the following command:

yarp-config robot import <YARP_ROBOT_NAME> <file1> <file2> <...>
  • Summarizing, when you start robotInterface (or iCubInterface) on the PC104, robot configuration files are searched in the following order:
 1.in the current directory .
 2.in the local user directory /home/icub/.local/share/yarp/robot/<YARP_ROBOT_NAME>
 3.in the build directory /usr/local/src/robot/icub-main/build-pc104/share/<YARP_ROBOT_NAME>
  • If you are not sure about which files are currently used by your robotInterface, you can look at the robotInterface log:
robotInterface &> log.txt

at the beginning of the log, you'll find the full path used by robotInterface, e.g.:

found /usr/local/src/robot/iCub/main/build-pc104/share/iCub/robots/iCubGenova01/./icub_all.xml