[openrtm-users 02334] Re: rtc.conf
Geoffrey Biggs
geoffrey.biggs @ aist.go.jp
2011年 11月 17日 (木) 08:28:46 JST
Generally, we prefer to put component-specific configuration in a .conf
file that is just for that component. Then we put a line in rtc.conf
indicating the configuration file to use for that component. For example:
example.ConfigSample.config_file: configsample.conf
This line is setting a property, so it can be customised to set the
configuration for all components with the same type name or just for a
single component with a specific instance name.
If you look in the example directory installed with OpenRTM (on Linux,
it's installed to share/openrtm-1.1/example), you can see components
being configured in this way.
Geoff
On 17/11/11 00:42, ostasse @ laas.fr wrote:
> Dear all, I have a question regarding the proper way to provide information
> to a RTC component. Reading the source code of
> openhrp-controller-bridge, it
> seems that the author is going through a complicated pathway to read a
> configuration file. He had to write a specific parser for the config file
> (BrigeConf.cpp), and rewrote the initialization of the component in the
> main
> procedure (main.cpp). However it is very simple to write the needed
> information direclty inside rtc.conf, and after to use the properties given
> the manager through getConfig(). Is it a bad practice to use rtc.conf to
> convey data for a specific component ? For instance in my case, I wanted to
> specify a directory where a set of data is stored. I just added:
> fast-replanner.path = /path/to/directory to rtc.conf to retrieve it through
> manager->getConfig().
>
> _______________________________________________
> openrtm-users mailing list
> openrtm-users @ openrtm.org
> http://www.openrtm.org/mailman/listinfo/openrtm-users
openrtm-users メーリングリストの案内