プロジェクト

全般

プロフィール

機能 #3653

[FSM4RTC] HRTMのラッパーライブラリを作成する。

n-ando7年以上前に追加. 約7年前に更新.

ステータス:
終了
優先度:
通常
担当者:
対象バージョン:
開始日:
2016/10/07
期日:
進捗率:

100%

予定工数:

説明

HRTM付属のサンプルコンポーネントがコンパイルできるように、libHRTMに相当するライブラリをlibRTCで実装する。

クリップボード02.png (20.1 KB) クリップボード02.png n-ando, 2016/10/14 10:06
2178

関係しているリビジョン

リビジョン 2763 (差分)
n-ando7年以上前に追加

[FSM4RTC,2.0] Some dummy headers have been added for HRTM porting. refs #3653

リビジョン 2765 (差分)
n-ando7年以上前に追加

[FSM4RTC,2.0] libRTC wrapper lib for libHRTM has been implemented. It still has some bugs. refs #3653

リビジョン 2770 (差分)
n-ando7年以上前に追加

[FSM4RTC,2.0,win32] libHRTM source and build proj file prepared for win32. refs #3653

リビジョン 2770 (差分)
n-ando7年以上前に追加

[FSM4RTC,2.0,win32] libHRTM source and build proj file prepared for win32. refs #3653

リビジョン 2772 (差分)
n-ando7年以上前に追加

[FSM4RTC,2.0,win32] libHRTM source and build proj file prepared for win32. refs #3653

リビジョン 2772 (差分)
n-ando7年以上前に追加

[FSM4RTC,2.0,win32] libHRTM source and build proj file prepared for win32. refs #3653

リビジョン 2783 (差分)
n-ando7年以上前に追加

[FSM4RTC,bugfix] Manager/ComponentManager initialization bug has been fixed. refs #3653

リビジョン 2783 (差分)
n-ando7年以上前に追加

[FSM4RTC,bugfix] Manager/ComponentManager initialization bug has been fixed. refs #3653

リビジョン 3113 (差分)
n-ando6年以上前に追加

merged changes from branches/FSM4RTC/OpenRTM-aist r2763:
[FSM4RTC,HRTM,->RELENG_2_0] Some dummy headers have been added for HRTM porting. refs #3653
[FSM4RTC,HRTM,->RELENG_2_0] Fsm example code from hrtm has been added for HRTM porting. refs #3655
[FSM4RTC,HRTM,->RELENG_2_0] libRTC wrapper lib for libHRTM has been implemented. It still has some bugs. refs #3653
[FSM4RTC,HRTM,->RELENG_2_0] Fsm component build complete, but it still has some bugs. refs #3655
[FSM4RTC,compat,->RELENG_2_0] Ignore Makefile and Makefile.in
[FSM4RTC,compat,->RELENG_2_0] ignore Makefile and Makefile.in
[FSM4RTC,compat,->RELENG_2_0] ignore Makefile and Makefile.in

リビジョン 3113 (差分)
n-ando6年以上前に追加

merged changes from branches/FSM4RTC/OpenRTM-aist r2763:
[FSM4RTC,HRTM,->RELENG_2_0] Some dummy headers have been added for HRTM porting. refs #3653
[FSM4RTC,HRTM,->RELENG_2_0] Fsm example code from hrtm has been added for HRTM porting. refs #3655
[FSM4RTC,HRTM,->RELENG_2_0] libRTC wrapper lib for libHRTM has been implemented. It still has some bugs. refs #3653
[FSM4RTC,HRTM,->RELENG_2_0] Fsm component build complete, but it still has some bugs. refs #3655
[FSM4RTC,compat,->RELENG_2_0] Ignore Makefile and Makefile.in
[FSM4RTC,compat,->RELENG_2_0] ignore Makefile and Makefile.in
[FSM4RTC,compat,->RELENG_2_0] ignore Makefile and Makefile.in

リビジョン 3114 (差分)
n-ando6年以上前に追加

merged changes from branches/FSM4RTC/OpenRTM-aist r2770, Makefile.ams confliction resolved:
[FSM4RTC,win32,->RELENG_2_0] libHRTM source and build proj file prepared for win32. refs #3653
[FSM4RTC,win32,->RELENG_2_0] Fsm example win32 proj file prepared. refs #3655
[FSM4RTC,win32,->RELENG_2_0] libHRTM source and build proj file prepared for win32. refs #3653

リビジョン 3114 (差分)
n-ando6年以上前に追加

merged changes from branches/FSM4RTC/OpenRTM-aist r2770, Makefile.ams confliction resolved:
[FSM4RTC,win32,->RELENG_2_0] libHRTM source and build proj file prepared for win32. refs #3653
[FSM4RTC,win32,->RELENG_2_0] Fsm example win32 proj file prepared. refs #3655
[FSM4RTC,win32,->RELENG_2_0] libHRTM source and build proj file prepared for win32. refs #3653

リビジョン 3115 (差分)
n-ando6年以上前に追加

merged changes from branches/FSM4RTC/OpenRTM-aist r2773, no confliction:
[FSM4RTC,compat,->RELENG_2_0] Some Makefile.am bugs are fixed.
[FSM4RTC,HRTM,bugfix,->RELENG_2_0] Manager/ComponentManager initialization bug has been fixed. refs #3653
[FSM4RTC,->RELENG_2_0] FSM action listener added. refs #3680
[FSM4RTC,incompat,->RELENG_2_0] renameed FsmStructureAction->FsmStructure, FsmProfileListener added. refs #3680
[FSM4RTC,incompat,->RELENG_2_0] FSM listeners add/remove operations are added to RTObject. refs #3681
[FSM4RTC,ext,example,->RELENG_2_0] Now component observer is connected to the FSM state change operation. refs #3591
[FSM4RTC,HRTM,,->RELENG_2_0] updateFsmStatus now calls RTObject::onFsmStateChanged(). refs #3681
[compat,formatting,->RELENG_1_2,->RELENG_2_0] Braces added.
[incompat,->RELENG_1_2,->RELENG_2_0] std::ostream operations have been added to NVUtil.

リビジョン 3115 (差分)
n-ando6年以上前に追加

merged changes from branches/FSM4RTC/OpenRTM-aist r2773, no confliction:
[FSM4RTC,compat,->RELENG_2_0] Some Makefile.am bugs are fixed.
[FSM4RTC,HRTM,bugfix,->RELENG_2_0] Manager/ComponentManager initialization bug has been fixed. refs #3653
[FSM4RTC,->RELENG_2_0] FSM action listener added. refs #3680
[FSM4RTC,incompat,->RELENG_2_0] renameed FsmStructureAction->FsmStructure, FsmProfileListener added. refs #3680
[FSM4RTC,incompat,->RELENG_2_0] FSM listeners add/remove operations are added to RTObject. refs #3681
[FSM4RTC,ext,example,->RELENG_2_0] Now component observer is connected to the FSM state change operation. refs #3591
[FSM4RTC,HRTM,,->RELENG_2_0] updateFsmStatus now calls RTObject::onFsmStateChanged(). refs #3681
[compat,formatting,->RELENG_1_2,->RELENG_2_0] Braces added.
[incompat,->RELENG_1_2,->RELENG_2_0] std::ostream operations have been added to NVUtil.

履歴

#1 n-ando7年以上前に更新

  • 進捗率0 から 30 に変更

以下のファイルを追加

  • component_manager.h
  • data_flow_component.h
  • defs.h
  • in_port.h
  • logger.h
  • out_port.h
  • properties.h
  • statechart.h
  • utils.h
  • version.h
  • component_manager.cpp
  • data_flow_component.cpp
  • logger.cpp
  • properties.cpp
  • statechart.cpp

#2 n-ando7年以上前に更新

Fsmが落ちる問題→2回初期化が行われている?

Oct 06 22:20:07.539 TRACE: manager: Manager::initORB()
Oct 06 22:20:07.543 TRACE: manager: Manager::initNaming()
Oct 06 22:20:07.557 TRACE: manager: Manager::initFactories()
Oct 06 22:20:07.559 TRACE: manager: Manager::registerFactory(PeriodicECSharedComposite)
Oct 06 22:20:07.559 TRACE: manager: Manager::initExecContext()
Oct 06 22:20:07.559 TRACE: manager: Manager::initComposite()
Oct 06 22:20:07.559 TRACE: manager: Manager::initManagerServant()
2回目
Oct 06 22:20:07.564 TRACE: manager: Manager::initORB()
Oct 06 22:20:07.564 TRACE: manager: Manager::initNaming()
Oct 06 22:20:07.568 TRACE: manager: Manager::initFactories()
Oct 06 22:20:07.568 TRACE: manager: Manager::registerFactory(PeriodicECSharedComposite)
Oct 06 22:20:07.568 TRACE: manager: Manager::initExecContext()
Oct 06 22:20:07.568 TRACE: manager: Manager::initComposite()
Oct 06 22:20:07.568 TRACE: manager: Manager::initManagerServant()
ここまで
Oct 06 22:20:07.569 TRACE: manager: Manager::initLocalService()
Oct 06 22:20:07.569 TRACE: manager: Manager::activateManager()
Oct 06 22:20:07.569 TRACE: manager: Manager::registerFactory(Fsm)

#3 n-ando7年以上前に更新

  • ステータス新規 から 担当 に変更
  • 進捗率30 から 60 に変更

ComponentManager 初期化処理の変更

ComponentManagerの初期化処理を変更。ComponentManagerの初期化関数 instance() 内で static 変数 RTC::Manager::manager に ComponentManager のsingleton インスタンスへのポインタを代入。RTC::Manager の二重初期化を回避したことで、ほぼFsmCompが動くようになった。

--- hrtm/component_manager.cpp  (リビジョン 2768)
+++ hrtm/component_manager.cpp  (作業コピー)
@@ -56,6 +56,7 @@
   }
   ComponentManager& ComponentManager::instance(int argc, char** argv)
   {
+
     // DCL for singleton
     if (!manager)
       {
@@ -63,6 +64,8 @@
         if (!manager)
           {
             manager = new ComponentManager();
+            RTC::Manager::manager = manager;
+            printf("init ComponentManager: %x\n", manager);
             manager->initManager(argc, argv);
             manager->initLogger();
             manager->initORB();

h.2 ログの比較

FsmComp と ConsoleOutComp のログの先頭部分を比較。
時間はdiffを取るときに邪魔なので削除済み。
コンポーネント名やコンフィグの違い以外は、処理順序に違いなしなので、Manager初期化問題は解決とする。

--- consout_clean.log   2016-10-13 22:14:44.358732000 +0900
+++ fsm_clean.log       2016-10-13 22:14:57.642732000 +0900
@@ -15,7 +15,7 @@
   - instance_name: manager
   - name: manager
   - naming_formats: %h.host_cxt/%n.mgr
-  - pid: 27892
+  - pid: 27776
   - refstring_path: /var/log/rtcmanager.ref
   - modules
     - load_path: ./
@@ -56,7 +56,7 @@
   - hostname: ubuntu1404
 - logger
   - enable: YES
-  - file_name: ./rtc27892.log
+  - file_name: fsm.log
   - date_format: %b %d %H:%M:%S.%Q
   - log_level: PARANOID
   - stream_lock: NO
@@ -68,7 +68,7 @@
 - naming
   - enable: YES
   - type: corba
-  - formats: %h.host_cxt/%n.rtc
+  - formats: %n.rtc
   - update
     - enable: YES
     - interval: 10.0
@@ -86,7 +86,7 @@
 - exec_cxt
   - periodic
     - type: PeriodicExecutionContext
-    - rate: 1000
+    - rate: 1.0
   - sync_transition: YES
   - transition_timeout: 0.5
 - sdo
@@ -95,13 +95,12 @@
       - enabled_service: ALL
     - consumer
       - enabled_service: ALL
-- example
-  - ConsoleOut
-    - config_file: consout.conf
-  - ConsoleIn
-    - config_file: consin.conf
-  - ConfigSample
-    - config_file: configsample.conf
+- logging
+  - loggers
+    - root
+      - level: trace
+    - HRTM
+      - level: trace
 - config_file: ./rtc.conf

 ESC[0mESC[32mOct 13 DEBUG: manager: ESC[0mcorba.endpoint:
@@ -142,11 +141,11 @@
 ESC[0mESC[32mOct 13 DEBUG: manager: ESC[0m- enabled_services: ALL
 - modules:

-ESC[0mESC[36mOct 13 TRACE: manager: ESC[0mManager::registerFactory(ConsoleOut)
-ESC[0mESC[36mOct 13 TRACE: manager: ESC[0mManager::createComponent(ConsoleOut)
+ESC[0mESC[36mOct 13 TRACE: manager: ESC[0mManager::registerFactory(Fsm)
+ESC[0mESC[36mOct 13 TRACE: manager: ESC[0mManager::createComponent(Fsm)
 ESC[0mESC[36mOct 13 TRACE: manager: ESC[0mRTC basic propfile vendor:
 ESC[0mESC[36mOct 13 TRACE: manager: ESC[0mRTC basic propfile category:
-ESC[0mESC[36mOct 13 TRACE: manager: ESC[0mRTC basic propfile implementation_id: ConsoleOut
+ESC[0mESC[36mOct 13 TRACE: manager: ESC[0mRTC basic propfile implementation_id: Fsm
 ESC[0mESC[36mOct 13 TRACE: manager: ESC[0mRTC basic propfile version:
 ESC[0mESC[36mOct 13 TRACE: manager: ESC[0mManager::getORB()
 ESC[0mESC[36mOct 13 TRACE: manager: ESC[0mManager::getPOA()

#4 n-ando7年以上前に更新

FsmCompのactivate/deactivateをRTSystemEditorで行うと、「エラーが発生しました」とのダイアログが出る。
FsmComp自体は正常にactivate/deactivateされる。

#5 n-ando7年以上前に更新

  • ファイル クリップボード02.png を追加
  • ステータス担当 から 解決 に変更
  • 進捗率60 から 100 に変更

FsmCompのECの周期が1.0に設定されていたため、RTSystemEditorのタイムアウトに引っかかった模様。
設定でRT Name Service View でタイムアウト待ち時間を2000ms程度にすると、エラーは出なくなった。
まずは、FsmCompが動くようになったので、本件はこれにて終了とする。

#6 n-ando7年以上前に更新

  • ファイル を削除 (クリップボード02.png)

#8 n-ando約7年前に更新

  • ステータス解決 から 終了 に変更

他の形式にエクスポート: Atom PDF