Closed traversaro closed 9 years ago
+1 The robots directory should be used to retrieve robot specific parameters. I am glad it is adopted so we better understand limitations/problems etc.
Preliminary support in : https://github.com/robotology/icub-main/pull/58
cc @francesco-romano
I'm having an issue in this.
I followed (at my best) the documentation in http://wiki.icub.org/yarpdoc/yarp_data_dirs.html and tried to enable the path.d
way (environmental variable are a problem for what I need)
I then added a new file called codyco.ini
with the following content
[search codyco]
path "/Users/makaveli/Projects/src/codyco-superbuild/build/install/share/codyco"
I added this file in the share directory of the installed yarp (in my case it is : /Users/makaveli/Projects/src/local/share/yarp/config/path.d
). In this folder there is also the iCub.ini
file.
The problem is that when I start the ResourceFinder this is the log:
||| clearing context
||| adding context [torqueBalancing]
||| configuring
||| no policy found
||| default config file specified as /Users/makaveli/Projects/src/codyco-superbuild/main/codyco-modules/src/modules/torqueBalancing/app/conf/default.ini
||| checking [/Users/makaveli/Projects/src/codyco-superbuild/main/codyco-modules/src/modules/torqueBalancing/app/conf/default.ini] (pwd)
||| found /Users/makaveli/Projects/src/codyco-superbuild/main/codyco-modules/src/modules/torqueBalancing/app/conf/default.ini
||| finding file [wbi_config_file]
||| checking [/Users/makaveli/Projects/src/codyco-superbuild/build/main/codyco-modules/bin/Debug/yarpWholeBodyInterface.ini] (pwd)
||| checking [/Users/makaveli/Projects/src/codyco-superbuild/main/codyco-modules/src/modules/torqueBalancing/app/conf/yarpWholeBodyInterface.ini] (defaultConfigFile path)
||| checking [/Users/makaveli/Library/Application Support/yarp/config/robots/iCubGenova03] (robot YARP_CONFIG_HOME)
||| checking [/Users/makaveli/Library/Application Support/yarp/robots/iCubGenova03] (robot YARP_DATA_HOME)
||| checking [/Library/Preferences/yarp/robots/iCubGenova03] (robot YARP_CONFIG_DIRS)
||| checking [/etc/yarp/robots/iCubGenova03] (robot YARP_CONFIG_DIRS)
||| checking [/usr/local/share/yarp/robots/iCubGenova03] (robot YARP_DATA_DIRS)
||| checking [/usr/share/yarp/robots/iCubGenova03] (robot YARP_DATA_DIRS)
||| checking [/usr/local/share/yarp/config/path.d] (robot path.d YARP_DATA_DIRS)
||| checking [/usr/share/yarp/config/path.d] (robot path.d YARP_DATA_DIRS)
||| checking [/Users/makaveli/Library/Application Support/yarp/config/yarpWholeBodyInterface.ini] (YARP_CONFIG_HOME)
||| checking [/Users/makaveli/Library/Application Support/yarp/yarpWholeBodyInterface.ini] (YARP_DATA_HOME)
||| checking [/Library/Preferences/yarp/yarpWholeBodyInterface.ini] (YARP_CONFIG_DIRS)
||| checking [/etc/yarp/yarpWholeBodyInterface.ini] (YARP_CONFIG_DIRS)
||| checking [/usr/local/share/yarp/yarpWholeBodyInterface.ini] (YARP_DATA_DIRS)
||| checking [/usr/share/yarp/yarpWholeBodyInterface.ini] (YARP_DATA_DIRS)
||| did not find yarpWholeBodyInterface.ini
If I understood correctly the search path is not influenced by where yarp has been installed, but it uses the default install prefix (/usr/local
).
Did I make something wrong or this is a bug of yarp? @drdanz @lornat75 @traversaro
I want to something: If a user for any reason is unable to set enviromental variables, we should also find an alternative way of setting YARP_ROBOT_NAME
, otherwise we lose all the power of the robots
directory.
This could also be useful in a different use case: let's say that I have a walkingControl module and I have a gazebo simulation where I spawned both iCubGenova01 and iCubHeidelberg01 (clearly with different port prefix, not the usual icubSim/icubGazeboSim
).
It make sense that I want to easily launch one controller for iCubGenova01 and another iCubHeidelberg01, and I would expect to have a way of loading for each controller the correct configuration for the desired robot.
@traversaro : for the use case you are proposing, prepending YARP_ROBOT_NAME="iCubGenova01" and YARP_ROBOT_NAME="iCubHeidelberg01" when launching the two different controllers should be ok.
After the new_wbi_ID merge, we are now fruitfully using the robot-specific configuration files. Closing for now.
Several modules (for example wholeBodyDynamicsTree) require robot-specific configuration. We have to provide this information using the robots directory. @jeljaik already did some of this work in WBIToolbox, we have to properly integrate with the
robots
directory.