Download
latest Releases
C++ | 1.2.1-RELESE |
Java | 1.2.1-RELESE |
Python | 1.2.1-RELESE |
Tools | 1.2.1 |
For Begginers
Windows msi(installer) package (only trying samples)
C++,Python,Java, Toolsを含む |
1.2.1-RELEASE |
Development environment is required for RT-Component development. See download page for details.
Number of Projects
RT-Component | 150 |
RT-Middleware | 30 |
Tools | 22 |
Documentation | 1 |
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
はじめに
Python のサンプルとして付属している GUIジョイスティック
http://svn.openrtm.org/OpenRTM-aist-Python/trunk/OpenRTM-aist-Python/OpenRTM_aist/examples/TkJoyStick/TkJoyStickComp.py
移動ロボットのシンプルなシミュレーターのサンプル
http://svn.openrtm.org/OpenRTM-aist-Python/trunk/OpenRTM-aist-Python/OpenRTM_aist/examples/MobileRobotCanvas/TkMobileRobotSimulator.py
などが一例です。
TkJoystickComp の例
TkJoystickComp のサンプルの main関数ですが、以下のようになっています。
ポイント
コンポーネントの中から GUI のメインループ関数を呼んだり、GUI オブジェクトを生成したりはしないほうが無難
GUI ツールキットの中には、mainスレッドから呼ばなければならないものや、 同一のスレッドから呼ばれることを前提としている関数などを持つものがある。RTC は onInitialize/onFinalize を呼ぶスレッドと、onExecute/onActivated/onDeactivated その他を呼ぶスレッドは異なります。また、onExecute 他の関数は複数のスレッドから同時に呼ばれる可能性すらあります。GUI スレッドと RTC とは別に扱ったほうがトラブルは少ないでしょう。
GUI と RTC のデータのやり取りは、RTC にそのための関数を追加することで対応
RTC と GUI のコントロールやウィジェットを1対1対応にしておくとわかりやすい
ただし、GUI コントロールと RTC はそれぞれ生成方法が異なるので、別々に生成して、上述したように RTC に実装したデータ入出力関数を通じて GUI コントロールと結びつけたほうがよいでしょう。
http://svn.openrtm.org/OpenRTM-aist-Python/trunk/OpenRTM-aist-Python/OpenRTM_aist/examples/MobileRobotCanvas/TkMobileRobotSimulator.py