[openrtm-users 00613] Re: rtc_handle.pyについて

Yusuke Nakajima y.nakajima @ aist.go.jp
2008年 9月 26日 (金) 14:26:21 JST


末廣様

早速対応頂きありがとうございました。
新しいバージョンを利用して、全てcreateされる
ようになったことを確認いたしました。

中島


> 中島様,
> 
> CorbaClient生成時の引数に誤りがありました.
> 修正してHome Page にuploadしましたので
> そちらを試してみて下さい.
> 
> よろしくお願いします.
> 
> Yusuke Nakajima さんは書きました:
> > 末廣様
> > 
> > 自律Gの中島と申します。
> > 
> > 知能化PJの検証用RTCの公開に向けて、喜多さんの意向により、
> > rtc_handle.pyを使ったRtcHandleのスクリプトも用意すべく、
> > http://staff.aist.go.jp/t.suehiro/rtm/index.html を参照しながら
> > 作成を試みているのですが、以下のようにRTCを認識できないような
> > エラーが出てまして、もし簡単にお分かりのようでしたら、
> > 解決法お教え頂けると幸いです。
> > 
> > ほぼ同様の作り方で、複数のRTCを作成し、rtc.confの中身もほぼ同一の
> > ものを使用しており、各々を端末から起動させてから、以下のログにあるような
> > 操作を行ったのですが、['rh00.rtc', 'MotorControl0.rtc', 'DriveControl0.rtc']
> > の3つはcreateされるのですが、'Map0.rtc'などは"is not alive."となり、
> > それ以降、ハンドルの取得も出来ない状態です。
> > 
> > ちなみに、これらは、RtcLinkやRtSystemEditorで正常に表示でき、ポートの接
> > 続から、activate、全て正常に動作するようですし、NameServiceViewにも正常
> > 表示されています。
> > 
> > OpenRTMの中身など良く分からないのですが、何故このような違いが出ているの
> > かが解決できない状態です。('Map0.rtc'などはconsumerをもっており、正常な
> > 3つのRTCはプロバイダのみを持っているのですが、何か影響がありますでしょ
> > うか)
> > 
> > 
> > 私の環境ですが、
> > OS: ubuntu7.1
> > OpenRTM: C++ 0.4.2,  Python0.4.1, PublisherFactory.cpp部修正済み
> > です。
> > 
> > よろしくお願いいたします。
> > 
> > 
> > -- 以下がログ--
> > 
> > nakajima @ invent-v2:/data/RTC/invent/DEVELOP/Python$ python
> > Python 2.5.1 (r251:54863, Jul 31 2008, 23:17:40) 
> > [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.
> >>>> import sys
> >>>> import os
> >>>> RtmToolsDir="/data/RTC/invent/DEVELOP/Python"
> >>>> save_path = sys.path[:]
> >>>> sys.path.append(RtmToolsDir+"/rtc_handle")
> >>>> from rtc_handle import *
> >>>> sys.path = save_path
> >>>> env = RtmEnv(sys.argv, ["localhost:2809"])
> >>>> env.name_space.keys()
> > ['localhost:2809']
> >>>>
> >>>> env.name_space["localhost:2809"].list_obj()
> > objcet EventChannelFactory was listed.
> > objcet UrgSensorComponent0.rtc was listed.
> > UrgSensorComponent0.rtc is not alive.
> > objcet OnlineViewer was listed.
> > objcet ViewSimulator was listed.
> > objcet CollisionDetectorFactory was listed.
> > objcet ModelLoader was listed.
> > objcet DynamicsSimulatorFactory was listed.
> > objcet InventGUIComp0.rtc was listed.
> > InventGUIComp0.rtc is not alive.
> > objcet DriveControl0.rtc was listed.
> > handle for DriveControl0.rtc was created.
> > objcet rh00.rtc was listed.
> > handle for rh00.rtc was created.
> > objcet MotorControlFactory was listed.
> > objcet MotorControl0.rtc was listed.
> > handle for MotorControl0.rtc was created.
> > objcet GlobalPathPlanning0.rtc was listed.
> > GlobalPathPlanning0.rtc is not alive.
> > objcet LocalPathPlanning0.rtc was listed.
> > LocalPathPlanning0.rtc is not alive.
> > objcet ObstacleDetection0.rtc was listed.
> > ObstacleDetection0.rtc is not alive.
> > objcet Map0.rtc was listed.
> > Map0.rtc is not alive.
> > [['UrgSensorComponent0.rtc', <RTC._objref_DataFlowComponent instance at 0xb75a552c>], ['InventGUIComp0.rtc', <RTC._objref_DataFlowComponent instance at 0xb75a56ac>], ['DriveControl0.rtc', <RTC._objref_DataFlowComponent instance at 0xb75a572c>], ['rh00.rtc', <RTC._objref_DataFlowComponent instance at 0xb75c0dcc>], ['MotorControl0.rtc', <RTC._objref_DataFlowComponent instance at 0xb75ce3ec>], ['GlobalPathPlanning0.rtc', <RTC._objref_DataFlowComponent instance at 0x82c098c>], ['LocalPathPlanning0.rtc', <RTC._objref_DataFlowComponent instance at 0x82c0b6c>], ['ObstacleDetection0.rtc', <RTC._objref_DataFlowComponent instance at 0x82c0bec>], ['Map0.rtc', <RTC._objref_DataFlowComponent instance at 0x82c0e4c>]]
> >>>>
> >>>> env.name_space['localhost:2809'].rtc_handles.keys()
> > ['rh00.rtc', 'MotorControl0.rtc', 'DriveControl0.rtc']
> >>>>
> >>>> handle_drive = env.name_space["localhost:2809"].rtc_handles['DriveControl0.rtc']
> >>>> dir(handle_drive)
> > ['__doc__', '__init__', '__module__', 'activate', 'conf_ref', 'conf_set', 'conf_set_data', 'deactivate', 'env', 'execution_contexts', 'inports', 'name', 'outports', 'port_refs', 'ports', 'profile', 'prop', 'retrieve_info', 'rtc_ref', 'services', 'set_conf', 'set_conf_activate']
> >>>>
> >>>> handle_map = env.name_space["localhost:2809"].rtc_handles['Map0.rtc']
> > Traceback (most recent call last):
> >   File "<stdin>", line 1, in <module>
> > KeyError: 'Map0.rtc'
> > 
> > 
> > 
> > 
> > 
> 
> 
> -- 
> Takashi Suehiro, Principal Research Scientist, Intelligent Systems
> Research Institute, AIST
> Tel: +81-29-861-5964 Fax: +81-29-861-5989 E-mail: t.suehiro @ aist.go.jp
> 1-1-1 Umezono, Tsukuba, Ibaraki 3058568, Japan
> 





openrtm-users メーリングリストの案内