[openrtm-users 01723] rtc.conf について

6 posts / 0 new
Last post
Kei Okada
Offline
Last seen: Never ago
Joined: 2011-05-17 20:20
[openrtm-users 01723] rtc.conf について

rtc.confについて,以下の質問があります.

http://www.openrtm.org/openrtm/ja/content/%E8%A8%AD%E5%AE%9A%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB-%E5%9F%BA%E7%A4%8E%E7%B7%A8

任意の場所にある設定ファイルをコンポーネントが実行時に読み込むことは可能でしょうか?

また,CORBAに関する引数はプログラムの実行時に設定できそうという
噂を聞いたのですが,その他の項目も引数で設定できるのでしょうか?
_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

Undefined
gbiggs
Offline
Last seen: 6 years 8 months ago
Joined: 2010-08-02 07:51
[openrtm-users 01725] rtc.conf について

産総研のジェフです。

On 25/05/11 22:18, Kei Okada wrote:
> rtc.confについて,以下の質問があります.
>
> http://www.openrtm.org/openrtm/ja/content/%E8%A8%AD%E5%AE%9A%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB-%E5%9F%BA%E7%A4%8E%E7%B7%A8
>
> 任意の場所にある設定ファイルをコンポーネントが実行時に読み込むことは可能でしょうか?

-fオプションで設定ファイルを指定できます。例えば:

$ ./ConsoleInComp -f my_rtc.conf

> また,CORBAに関する引数はプログラムの実行時に設定できそうという
> 噂を聞いたのですが,その他の項目も引数で設定できるのでしょうか?

できます。rtc.confにする場合はetc/rtc.conf.sampleに参照してください。コ
マンドラインにも設定できると思いますが、すみません、やり方は分かりませ
ん。omniORBのドキュメンテーションに参照してください。
_______________________________________________
openrtm-users mailing list
openrtm-users@openrtm.org
http://www.openrtm.org/mailman/listinfo/openrtm-users

root
Offline
Last seen: 11 hours 18 min ago
Joined: 2009-06-23 14:31
[openrtm-users 01726] rtc.conf について

岡田先生

安藤です

> rtc.confについて,以下の質問があります.
>
http://www.openrtm.org/openrtm/ja/content/%E8%A8%AD%E5%AE%9A%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB-%E5%9F%BA%E7%A4%8E%E7%B7%A8
>
> 任意の場所にある設定ファイルをコンポーネントが実行時に読み込むことは可能でしょうか?

デフォルトではカレントディレクトリにあるrtc.confを読み込みますが、
これを任意のファイルを読み込ませたいということでしょうか?
でしたら、-f オプションで
$ YourComp -f your.conf
のように任意のファイルを読み込ませることができます。

また、コンポーネントに対するコンフィギュレーションファイルは
http://www.openrtm.org/openrtm/ja/content/%E8%A8%AD%E5%AE%9A%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB-%E5%9F%BA%E7%A4%8E%E7%B7%A8#toc5
にあるように、メインのconfファイルに

[カテゴリ名].[コンポーネント名].config_file
[カテゴリ名].[インスタンス名]. config_file

のように指定することで設定ファイルを読み込ませることができます、例えば、、、

カテゴリ名:manipulator, コンポーネント名:myarm, インスタンス名myarm0,1,2,… の場合
manipulator.myarm.config_file: arm.conf
または
manipulator.myarm0.config.file: arm0.conf
のように指定可能

また、プログラムの中で読み込むという意味でしたら、
今のところそのような機能は有りません。
ただし、coil::Propertiesを使うとrtc.conf同様の
フォーマットのファイルを読み込んで利用することもできます。

http://www.openrtm.org/svnroot/OpenRTM-aist/trunk/OpenRTM-aist/src/lib/coil/common/Properties.h

> また,CORBAに関する引数はプログラムの実行時に設定できそうという
> 噂を聞いたのですが,その他の項目も引数で設定できるのでしょうか?

一般的なCORBAの実行ファイルに対するコマンドラインオプションや
ORB_init()の引数に渡すもののことでしょうか?
でしたら corba.args で設定可能です。

http://www.openrtm.org/openrtm/ja/content/rtcconf%E8%A8%AD%E5%AE%9A%E9%A0%85%E7%9B%AE%E4%B8%80%E8%A6%A7#toc16

corba.args: -ORBInitialHost myhost -ORBInitialPort 8888

オプションはomniORBのドキュメントにあるものが使えるはずです。
http://omniorb.sourceforge.net/omnipy3/omniORBpy/omniORBpy004.html

あと余談ですが、rtc.conf に書いていないなくても実行時に -o オプションで
任意の設定をいくつでも渡すこともできます。

$ YourComp -o "corba.nameservers:additional.name.server.org:9876"

Kei Okada
Offline
Last seen: Never ago
Joined: 2011-05-17 20:20
[openrtm-users 01727] rtc.conf について

ジェフさん,安藤さん,すばやいお返事ありがとうございます.
大変,助かりました.

2011/5/25 Ando Noriaki :
> 岡田先生
>
> 安藤です
>
>> rtc.confについて,以下の質問があります.
>>
> http://www.openrtm.org/openrtm/ja/content/%E8%A8%AD%E5%AE%9A%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB-%E5%9F%BA%E7%A4%8E%E7%B7%A8
>>
>> 任意の場所にある設定ファイルをコンポーネントが実行時に読み込むことは可能でしょうか?
>
> デフォルトではカレントディレクトリにあるrtc.confを読み込みますが、
> これを任意のファイルを読み込ませたいということでしょうか?
> でしたら、-f オプションで
> $ YourComp -f your.conf
> のように任意のファイルを読み込ませることができます。
>
> また、コンポーネントに対するコンフィギュレーションファイルは
> http://www.openrtm.org/openrtm/ja/content/%E8%A8%AD%E5%AE%9A%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB-%E5%9F%BA%E7%A4%8E%E7%B7%A8#toc5
> にあるように、メインのconfファイルに
>
> [カテゴリ名].[コンポーネント名].config_file
> [カテゴリ名].[インスタンス名]. config_file
>
> のように指定することで設定ファイルを読み込ませることができます、例えば、、、
>
> カテゴリ名:manipulator, コンポーネント名:myarm, インスタンス名myarm0,1,2,… の場合
> manipulator.myarm.config_file: arm.conf
> または
> manipulator.myarm0.config.file: arm0.conf
> のように指定可能
>
> また、プログラムの中で読み込むという意味でしたら、
> 今のところそのような機能は有りません。
> ただし、coil::Propertiesを使うとrtc.conf同様の
> フォーマットのファイルを読み込んで利用することもできます。
>
> http://www.openrtm.org/svnroot/OpenRTM-aist/trunk/OpenRTM-aist/src/lib/coil/common/Properties.h
>
>
>> また,CORBAに関する引数はプログラムの実行時に設定できそうという
>> 噂を聞いたのですが,その他の項目も引数で設定できるのでしょうか?
>
> 一般的なCORBAの実行ファイルに対するコマンドラインオプションや
> ORB_init()の引数に渡すもののことでしょうか?
> でしたら corba.args で設定可能です。
>
> http://www.openrtm.org/openrtm/ja/content/rtcconf%E8%A8%AD%E5%AE%9A%E9%A0%85%E7%9B%AE%E4%B8%80%E8%A6%A7#toc16
>
> corba.args: -ORBInitialHost myhost -ORBInitialPort 8888
>
> オプションはomniORBのドキュメントにあるものが使えるはずです。
> http://omniorb.sourceforge.net/omnipy3/omniORBpy/omniORBpy004.html
>
> あと余談ですが、rtc.conf に書いていないなくても実行時に -o オプションで
> 任意の設定をいくつでも渡すこともできます。
>
> $ YourComp -o "corba.nameservers:additional.name.server.org:9876"
>
>

Kei Okada
Offline
Last seen: Never ago
Joined: 2011-05-17 20:20
[openrtm-users 01807] rtc.conf について

安藤さま

岡田です.お世話になります.

> あと余談ですが、rtc.conf に書いていないなくても実行時に -o オプションで
> 任意の設定をいくつでも渡すこともできます。
>
> $ YourComp -o "corba.nameservers:additional.name.server.org:9876"

を使わせてもらっているのですが,コンフィグレーションを実行時に渡すことはできますでしょうか?
それともコンフィギュレーションはファイル経由でないと設定できなかったりしますでしょうか?

2011/5/25 Ando Noriaki :
> 岡田先生
>
> 安藤です
>
>> rtc.confについて,以下の質問があります.
>>
> http://www.openrtm.org/openrtm/ja/content/%E8%A8%AD%E5%AE%9A%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB-%E5%9F%BA%E7%A4%8E%E7%B7%A8
>>
>> 任意の場所にある設定ファイルをコンポーネントが実行時に読み込むことは可能でしょうか?
>
> デフォルトではカレントディレクトリにあるrtc.confを読み込みますが、
> これを任意のファイルを読み込ませたいということでしょうか?
> でしたら、-f オプションで
> $ YourComp -f your.conf
> のように任意のファイルを読み込ませることができます。
>
> また、コンポーネントに対するコンフィギュレーションファイルは
> http://www.openrtm.org/openrtm/ja/content/%E8%A8%AD%E5%AE%9A%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB-%E5%9F%BA%E7%A4%8E%E7%B7%A8#toc5
> にあるように、メインのconfファイルに
>
> [カテゴリ名].[コンポーネント名].config_file
> [カテゴリ名].[インスタンス名]. config_file
>
> のように指定することで設定ファイルを読み込ませることができます、例えば、、、
>
> カテゴリ名:manipulator, コンポーネント名:myarm, インスタンス名myarm0,1,2,… の場合
> manipulator.myarm.config_file: arm.conf
> または
> manipulator.myarm0.config.file: arm0.conf
> のように指定可能
>
> また、プログラムの中で読み込むという意味でしたら、
> 今のところそのような機能は有りません。
> ただし、coil::Propertiesを使うとrtc.conf同様の
> フォーマットのファイルを読み込んで利用することもできます。
>
> http://www.openrtm.org/svnroot/OpenRTM-aist/trunk/OpenRTM-aist/src/lib/coil/common/Properties.h
>
>
>> また,CORBAに関する引数はプログラムの実行時に設定できそうという
>> 噂を聞いたのですが,その他の項目も引数で設定できるのでしょうか?
>
> 一般的なCORBAの実行ファイルに対するコマンドラインオプションや
> ORB_init()の引数に渡すもののことでしょうか?
> でしたら corba.args で設定可能です。
>
> http://www.openrtm.org/openrtm/ja/content/rtcconf%E8%A8%AD%E5%AE%9A%E9%A0%85%E7%9B%AE%E4%B8%80%E8%A6%A7#toc16
>
> corba.args: -ORBInitialHost myhost -ORBInitialPort 8888
>
> オプションはomniORBのドキュメントにあるものが使えるはずです。
> http://omniorb.sourceforge.net/omnipy3/omniORBpy/omniORBpy004.html
>
> あと余談ですが、rtc.conf に書いていないなくても実行時に -o オプションで
> 任意の設定をいくつでも渡すこともできます。
>
> $ YourComp -o "corba.nameservers:additional.name.server.org:9876"
>
>

root
Offline
Last seen: 11 hours 18 min ago
Joined: 2009-06-23 14:31
[openrtm-users 01820] rtc.conf について

岡田先生

安藤です

Unfortunately rtc.conf and "-o" option only affect to parameters of manager.
Each component's configuration parameter has to be given only
configuration option in rtc.conf as follows.

category.compname.config_file: file_name

However, the following patch enables such feature.
You can give RTC's configuration parameter from command line options as follows.
$ ./ConfigSampleComp -o "example.ConfigSample.conf.default.int_param0:110"
or
$ ./ConfigSampleComp -o "example.ConfigSample0.conf.default.int_param0:110"

But, these same configurations in rtc.conf have same effect.
For example the following rtc.conf configuration overwrites
component's configuration file specified in "example.ConfigSample.config_file."

 :
example.ConfigSample0.conf.default.int_param0: 110
  :

It is natural that command line options has higher priority, but
it is little strange that rtc.conf's priority is higher than component
configuration file. How do you think about it?

現状、残念ながらrtc.confや-oで渡すことのできるコンフィギュレーションは
マネージャに対するパラメータのみとなっています。
各コンポーネントは
category.compname.config_file: file_name

で渡していただくしかありません。

ただ、trunkの最新コードに以下のパッチを当てると

$ ./ConfigSampleComp -o "example.ConfigSample.conf.default.int_param0:110"

$ ./ConfigSampleComp -o "example.ConfigSample0.conf.default.int_param0:110"
のように、コンフィギュレーションパラメータをコマンドラインから渡すことができます。

ただし、同じ内容をrtc.confに渡した場合、
たとえば、rtc.conf に以下のように記述した場合、
 :
example.ConfigSample0.conf.default.int_param0: 110
  :

example.ConfigSample.config_file に指定した内容を上書きしてしまいます。

コマンドラインオプションの優先順位が高いのはいいと思うのですが、
rtc.confの方が各コンポーネントのconfigファイルより優先順位が高いのは
少々違和感が有ります。レアなケースだと思うので、あまり問題にならないような
気がしますが。皆さま、いかがでしょうか?

Log in or register to post comments

Download

latest Releases : 2.0.0-RELESE

2.0.0-RELESE Download page

Number of Projects

Choreonoid

Motion editor/Dynamics simulator

OpenHRP3

Dynamics simulator

OpenRTP

Integrated Development Platform

AIST RTC collection

RT-Components collection by AIST

TORK

Tokyo Opensource Robotics Association

DAQ-Middleware

Middleware for DAQ (Data Aquisition) by KEK