ダウンロード
最新バージョン : 2.1.0-RELESE
| 2.1.0-RELESE | ダウンロードページ |
OpenRTM@Github
OpenRTM-aist GitHubサイト
ROS
Robot Operating System
Choreonoid
モーションエディタ/シミュレータ
DAQ-Middleware
ネットワーク分散環境でデータ収集用ソフトウェアを容易に構築するためのソフトウェア・フレームワーク
産総研が提供するRTC集
東京オープンソースロボティクス協会
| 2.1.0-RELESE | ダウンロードページ |
OpenRTM-aist GitHubサイト
Robot Operating System
モーションエディタ/シミュレータ
ネットワーク分散環境でデータ収集用ソフトウェアを容易に構築するためのソフトウェア・フレームワーク
産総研が提供するRTC集
東京オープンソースロボティクス協会
인스톨의 확인
샘플을 이용해 인스톨 완료의 확인
부속의 샘플 RT컴포넌트를 이용하여 동작 확인을 실시합니다. "내 컴퓨터"에서 SimpleIO ※1 폴더를 표시해, 그 중의 run.py 를 더블 클릭 합니다. ※2 처음에 터미널 화면이 3개 열리고, 몇초후에 또 하나 열립니다. 4번째의 터미널 화면이 열릴 때까지, 반드시 기다려 주십시오. "Please input number:"라고 표시되고 있는 윈도우에 숫자를 입력합니다. ※3 입력하는 숫자는 long int 에 들어가는 범위의 값을 입력해 주십시오. 그러면 다른 한쪽의 윈도우에서 입력한 수치와 같은 수치가 나타납니다. 여기까지 할 수 있으면 OpenRTM-aist-Python이 정상적으로 인스톨 되고 있는 것을 알 수 있습니다.
인스톨러를 사용했을 경우는 통상 C:\Program Files\OpenRTM-aist\0.4\examples\Python\SimpleIO에, 소스로부터 빌드 했을 경우 <소스의 전개 폴더>\OpenRTM\examples\SimpleIO에 각각 인스톨 되고 있습니다.
-''FAQ:'' python.exe가 기동하지 않는 경우
-''FAQ:'' Cygwin를 인스톨 하고 있는 환경에서는 python.exe가 복수 존재하는 경우가 있음
-''FAQ:'' 「Can't open file: ./rtc.conf」라고 표시됨
참고:
그 외 샘플 컴포넌트에 대해
OpenRTM-aist-Python에는 SimpleIO 뿐만이 아니라, SeqIO, SimpleService, ConfigSample, ExtTrigger등의 샘플 컴포넌트가 부속되어 있습니다(SimpleIO 폴더와 같은 장소에 있습니다). 샘플 컴포넌트의 자세한 내용은 OpenRTM-aist-0.4 Java의 샘플에 대해를 참조해 주십시오.컴포넌트 템플릿의 테스트
다음으로 컴포넌트의 템플릿 제네레이터를 사용하여 간단한 컴포넌트를 작성하는 테스트를 실시합니다. 템플릿 제네레이터 (rtc-template.py)를 사용합니다. 또한 여기에서는 편의상 Python2.4를 사용하는 환경에서의 예를 들고 있습니다. Python2.5 를 사용하는 환경에서는 Python24라고 부분을 Python25로 수정하여 사용해 주십시오.
컴포넌트를 작성하는 폴더(임의의 경로, 임의의 폴더. 이하의 예에서는 C:\Documents and Settings\<user name>\SampleComponent를 작업 폴더로 합니다.)를 작성하고, 거기서 컴포넌트 작성 작업을 합니다. 커멘드 prompt를 기동해, 작성한 폴더까지 이동합니다.
우선은 help를 보겠습니다.
> C:\Python24\Lib\site-packages\OpenRTM\rtc-template\rtc-template.py --help Usage: rtc-template [OPTIONS] Options: [-h] Print short help. [--help] Print details help. [--backend[=backend] or -b] Specify template code generator. [--module-name[=name]] Your module name. [--module-desc[=description]] Module description. [--module-version[=version]] Module version. [--module-vendor[=vendor]] Module vendor. [--module-category[=category]] Module category. [--module-comp-type[=component_type]] Component type. [--module-act-type[=activity_type]] Component's activity type. [--module-max-inst[=max_instance]] Number of maximum instance. [--module-lang[=language]] Language. [--config[=ParamName:Type:Default]] Configuration variable. [--inport[=PortName:Type]] InPort's name and type. [--outport[=PortName:Type]] OutPort's name and type [--service[=PortName:Name:Type]] Service Provider Port [--service-idl[=IDL_file]] IDL file name for service [--consumer[=PortName:Name:Type]] Service Consumer Port [--consumer-idl[=IDL_file]] IDL file name for consumer [--idl-include=[path]] Search path for IDL compile : 중략 : Example: rtc-template -bcxx --module-name=Sample --module-desc='Sample component' --module-version=0.1 --module-vendor=AIST --module-category=Generic --module-comp-type=DataFlowComponent --module-act-type=SPORADIC --module-max-inst=10 --config=int_param0:int:0 --config=int_param1:int:1 --config=double_param0:double:3.14 --config=double_param1:double:9.99 --config="str_param0:std::string:hoge" --config="str_param1:std::string:foo" --inport=Ref:TimedFloat --inport=Sens:TimedFloat --outport=Ctrl:TimedDouble --outport=Monitor:TimedShort --service=MySvcPort:myservice0:MyService --consumer=YourSvcPort:yourservice0:YourService --service-idl=MyService.idl --consumer-idl=YourService.idlinterface MyService { void echo(); };interface YourService { void echo(); };> python C:\Python24\Lib\site-packages\OpenRTM\rtc-template\rtc-template.py -bpython^ --module-name=Sample --module-desc="Sample component"^ --module-version=0.1 --module-vendor=AIST --module-category=Generic^ --module-comp-type=DataFlowComponent --module-act-type=SPORADIC^ --module-max-inst=10^ --config=int_param0:int:0 --config=int_param1:int:1^ --config=double_param0:double:3.14 --config=double_param1:double:9.99^ --config="str_param0:std::string:hoge"^ --config="str_param1:std::string:foo"^ --inport=Ref:TimedFloat --inport=Sens:TimedFloat^ --outport=Ctrl:TimedDouble --outport=Monitor:TimedShort^ --service=MySvcPort:myservice0:MyService^ --consumer=YourSvcPort:yourservice0:YourService^ --service-idl=MyService.idl --consumer-idl=YourService.idl File "MyService_idl_example.py" was generated. File "Sample.py" was generated. File "README.Sample" was generated. > dir 2008/06/25 12:28 <DIR> . 2008/06/25 12:28 <DIR> .. 2008/06/25 12:27 45 MyService.idl 2008/06/25 12:28 2,226 MyService_idl.py 2008/06/25 12:28 1,341 MyService_idl_example.py 2008/06/25 12:28 3,557 README.Sample 2008/06/25 12:28 4,615 Sample.py 2008/06/25 12:27 47 YourService.idl 2008/06/25 12:28 2,312 YourService_idl.py 2008/06/25 12:28 <DIR> _GlobalIDL 2008/06/25 12:28 <DIR> _GlobalIDL__POArtc-template.py를 실행할 때에 매회 커멘드 입력하는 것은 불편하므로, 이하와 같은 배치파일을 작성해 사용하는 것을 추천합니다.
python C:\Python24\Lib\site-packages\OpenRTM\rtc-template\rtc-template.py -bpython^ --module-name=Sample --module-desc="Sample component"^ --module-version=0.1 --module-vendor=AIST --module-category=Generic^ --module-comp-type=DataFlowComponent --module-act-type=SPORADIC^ --module-max-inst=10^ --config=int_param0:int:0 --config=int_param1:int:1^ --config=double_param0:double:3.14 --config=double_param1:double:9.99^ --config="str_param0:std::string:hoge"^ --config="str_param1:std::string:foo"^ --inport=Ref:TimedFloat --inport=Sens:TimedFloat^ --outport=Ctrl:TimedDouble --outport=Monitor:TimedShort^ --service=MySvcPort:myservice0:MyService^ --consumer=YourSvcPort:yourservice0:YourService^ --service-idl=MyService.idl --consumer-idl=YourService.idlCORBA 의 네이밍 서비스를 기동합니다. 다른 커멘드 prompt를 열어,
마지막으로, 컴포넌트를 기동합니다.