gbiggs / rtshell

Shell commands for managing RT-Middleware running on OpenRTM-aist.
http://openrtm.org
GNU Lesser General Public License v3.0
10 stars 17 forks source link

rtcyroでエラーがでます. #13

Closed k-okada closed 10 years ago

k-okada commented 11 years ago

以下のようなエラーがでますが,どこがおかしいでしょうか.

k-okada@kokada-t430s:~$ rtcryo --verbose Traceback (most recent call last): File "/home/k-okada/ros/groovy/rtm-ros-robotics/openrtm_common/rtshell/lib/python2.7/site-packages/rtshell/rtcryo.py", line 257, in main sysname=options.sysname, version=options.version, tree=tree) File "/home/k-okada/ros/groovy/rtm-ros-robotics/openrtm_common/rtshell/lib/python2.7/site-packages/rtshell/rtcryo.py", line 189, in freeze_dry components) File "/home/k-okada/ros/groovy/rtm-ros-robotics/openrtm_common/rtshell/lib/python2.7/site-packages/rtshell/rtcryo.py", line 95, in find_unique_connectors data_type=conn.properties['dataport.data_type'], KeyError: 'dataport.data_type' /home/k-okada/ros/groovy/rtm-ros-robotics/openrtm_common/rtshell/bin/rtcryo: 'dataport.data_type' k-okada@kokada-t430s:~$ rtcryo --version 3.0.0 k-okada@kokada-t430s:~$ echo $RTCTREE_NAMESERVERS localhost

k-okada commented 11 years ago

途中でした.今度お時間のあるときに次に,何を確認したらいいか教えて下さい. -CorbaPort: SequencePlayerService port.port_type CorbaPort Interface: Instance name service0 Type name SequencePlayerService Polarity Provided (2 other connections) となっており, k-okada@kokada-t430s:~$ rtcryo Connection connector0 (ID: connector0), properties {'dataport.publisher.push_rate': '1000', 'dataport.corba_cdr.inport_ref': <omniORB.CORBA.Object instance at 0x19525a8>, 'dataport.corba_cdr.inport_ior': 'IOR:010000001a00000049444c3a4f70656e52544d2f496e506f72744364723a312e30000000010000000000000064000000010102000e0000003139322e3136382e3132322e3100fa0a0e000000fe1aa6f85100000de2000000009d00000200000000000000080000000100000000545441010000001c00000001000000010001000100000001000105090101000100000009010100', 'dataport.subscription_type': 'flush', 'dataport.buffer.length': '1', 'dataport.interface_type': 'corba_cdr', 'dataport.dataflow_type': 'Push', 'dataport.data_type': 'IDL:RTC/TimedDoubleSeq:1.0', 'dataport.serializer.cdr.endian': 'little,big'}, with ports [('/localhost/PA10Controller(Robot)0.rtc:q', <rtctree.ports.DataOutPort object at 0x1b2ed90>), ('/localhost/kokada-t430s.host_cxt/manager.mgr/sh.rtc:currentQIn', <rtctree.ports.DataInPort object at 0x1b2a690>)] Connection connector0 (ID: connector0), properties {'dataport.publisher.push_rate': '1000', 'dataport.corba_cdr.inport_ref': <omniORB.CORBA.Object instance at 0x1950d40>, 'dataport.corba_cdr.inport_ior': 'IOR:010000001a00000049444c3a4f70656e52544d2f496e506f72744364723a312e30000000010000000000000064000000010102000e0000003139322e3136382e3132322e3100fa0a0e000000fe1aa6f85100000de2000000009e00000200000000000000080000000100000000545441010000001c00000001000000010001000100000001000105090101000100000009010100', 'dataport.subscription_type': 'flush', 'dataport.buffer.length': '1', 'dataport.interface_type': 'corba_cdr', 'dataport.dataflow_type': 'Push', 'dataport.data_type': 'IDL:RTC/TimedDoubleSeq:1.0', 'dataport.serializer.cdr.endian': 'little,big'}, with ports [('/localhost/PA10Controller(Robot)0.rtc:q', <rtctree.ports.DataOutPort object at 0x1b300d0>), ('/localhost/fk.rtc:q', <rtctree.ports.DataInPort object at 0x1b2e110>)] Connection connector0 (ID: connector0), properties {'dataport.publisher.push_rate': '1000', 'dataport.corba_cdr.inport_ref': <omniORB.CORBA.Object instance at 0x1948440>, 'dataport.corba_cdr.inport_ior': 'IOR:010000001a00000049444c3a4f70656e52544d2f496e506f72744364723a312e30000000010000000000000064000000010102000e0000003139322e3136382e3132322e3100fa0a0e000000fe1aa6f85100000de200000000aa00000200000000000000080000000100000000545441010000001c00000001000000010001000100000001000105090101000100000009010100', 'dataport.subscription_type': 'flush', 'dataport.buffer.length': '1', 'dataport.interface_type': 'corba_cdr', 'dataport.dataflow_type': 'Push', 'dataport.data_type': 'IDL:RTC/TimedDoubleSeq:1.0', 'dataport.serializer.cdr.endian': 'little,big'}, with ports [('/localhost/PA10Controller(Robot)0.rtc:q', <rtctree.ports.DataOutPort object at 0x1b303d0>), ('/localhost/afs.rtc:qCurrent', <rtctree.ports.DataInPort object at 0x1b2e090>)] Connection connector0 (ID: connector0), properties {'dataport.publisher.push_rate': '1000', 'dataport.corba_cdr.inport_ref': <omniORB.CORBA.Object instance at 0x1948b00>, 'dataport.corba_cdr.inport_ior': 'IOR:010000001a00000049444c3a4f70656e52544d2f496e506f72744364723a312e30000000010000000000000064000000010102000e0000003139322e3136382e3132322e3100fa0a0e000000fe1aa6f85100000de200000000ab00000200000000000000080000000100000000545441010000001c00000001000000010001000100000001000105090101000100000009010100', 'dataport.subscription_type': 'flush', 'dataport.buffer.length': '1', 'dataport.interface_type': 'corba_cdr', 'dataport.dataflow_type': 'Push', 'dataport.data_type': 'IDL:RTC/TimedDoubleSeq:1.0', 'dataport.serializer.cdr.endian': 'little,big'}, with ports [('/localhost/PA10Controller(Robot)0.rtc:q', <rtctree.ports.DataOutPort object at 0x1b30750>), ('/localhost/kokada-t430s.host_cxt/manager.mgr/ic.rtc:qCurrent', <rtctree.ports.DataInPort object at 0x1b2e290>)] Connection connector0 (ID: connector0), properties {'dataport.publisher.push_rate': '1000', 'dataport.corba_cdr.inport_ref': <omniORB.CORBA.Object instance at 0x1940d40>, 'dataport.corba_cdr.inport_ior': 'IOR:010000001a00000049444c3a4f70656e52544d2f496e506f72744364723a312e30000000010000000000000064000000010102000e0000003139322e3136382e3132322e3100fa0a0e000000fe1aa6f85100000de200000000ac00000200000000000000080000000100000000545441010000001c00000001000000010001000100000001000105090101000100000009010100', 'dataport.subscription_type': 'flush', 'dataport.buffer.length': '1', 'dataport.interface_type': 'corba_cdr', 'dataport.dataflow_type': 'Push', 'dataport.data_type': 'IDL:RTC/TimedDoubleSeq:1.0', 'dataport.serializer.cdr.endian': 'little,big'}, with ports [('/localhost/PA10Controller(Robot)0.rtc:q', <rtctree.ports.DataOutPort object at 0x1b30ad0>), ('/localhost/tf.rtc:qCurrent', <rtctree.ports.DataInPort object at 0x1b2e650>)] Connection connector0 (ID: connector0), properties {'dataport.publisher.push_rate': '1000', 'dataport.corba_cdr.inport_ref': <omniORB.CORBA.Object instance at 0x1951fc8>, 'dataport.corba_cdr.inport_ior': 'IOR:010000001a00000049444c3a4f70656e52544d2f496e506f72744364723a312e30000000010000000000000064000000010102000e0000003139322e3136382e3132322e3100fa0a0e000000fe1aa6f85100000de200000000ad00000200000000000000080000000100000000545441010000001c00000001000000010001000100000001000105090101000100000009010100', 'dataport.subscription_type': 'flush', 'dataport.buffer.length': '1', 'dataport.interface_type': 'corba_cdr', 'dataport.dataflow_type': 'Push', 'dataport.data_type': 'IDL:RTC/TimedDoubleSeq:1.0', 'dataport.serializer.cdr.endian': 'little,big'}, with ports [('/localhost/PA10Controller(Robot)0.rtc:q', <rtctree.ports.DataOutPort object at 0x1b34e50>), ('/localhost/kokada-t430s.host_cxt/manager.mgr/vs.rtc:qCurrent', <rtctree.ports.DataInPort object at 0x1b2ead0>)] Connection connector0 (ID: connector0), properties {'dataport.publisher.push_rate': '1000', 'dataport.corba_cdr.inport_ref': <omniORB.CORBA.Object instance at 0x1951050>, 'dataport.corba_cdr.inport_ior': 'IOR:010000001a00000049444c3a4f70656e52544d2f496e506f72744364723a312e30000000010000000000000064000000010102000e0000003139322e3136382e3132322e3100fa0a0e000000fe1aa6f85100000de200000000af00000200000000000000080000000100000000545441010000001c00000001000000010001000100000001000105090101000100000009010100', 'dataport.subscription_type': 'flush', 'dataport.buffer.length': '1', 'dataport.interface_type': 'corba_cdr', 'dataport.dataflow_type': 'Push', 'dataport.data_type': 'IDL:RTC/TimedDoubleSeq:1.0', 'dataport.serializer.cdr.endian': 'little,big'}, with ports [('/localhost/PA10Controller(Robot)0.rtc:q', <rtctree.ports.DataOutPort object at 0x1b34d10>), ('/localhost/co.rtc:qCurrent', <rtctree.ports.DataInPort object at 0x1b30550>)] Connection connector0 (ID: connector0), properties {'dataport.publisher.push_rate': '1000', 'dataport.corba_cdr.inport_ref': <omniORB.CORBA.Object instance at 0x194e248>, 'dataport.corba_cdr.inport_ior': 'IOR:010000001a00000049444c3a4f70656e52544d2f496e506f72744364723a312e30000000010000000000000064000000010102000e0000003139322e3136382e3132322e3100fa0a0e000000fe1aa6f85100000de200000000b000000200000000000000080000000100000000545441010000001c00000001000000010001000100000001000105090101000100000009010100', 'dataport.subscription_type': 'flush', 'dataport.buffer.length': '1', 'dataport.interface_type': 'corba_cdr', 'dataport.dataflow_type': 'Push', 'dataport.data_type': 'IDL:RTC/TimedDoubleSeq:1.0', 'dataport.serializer.cdr.endian': 'little,big'}, with ports [('/localhost/PA10Controller(Robot)0.rtc:q', <rtctree.ports.DataOutPort object at 0x1b341d0>), ('/localhost/el.rtc:qCurrent', <rtctree.ports.DataInPort object at 0x1b2ee50>)] Connection connector0 (ID: connector0), properties {'dataport.publisher.push_rate': '1000', 'dataport.corba_cdr.inport_ref': <omniORB.CORBA.Object instance at 0x194e200>, 'dataport.corba_cdr.inport_ior': 'IOR:010000001a00000049444c3a4f70656e52544d2f496e506f72744364723a312e30000000010000000000000064000000010102000e0000003139322e3136382e3132322e3100fa0a0e000000fe1aa6f85100000de200000000b200000200000000000000080000000100000000545441010000001c00000001000000010001000100000001000105090101000100000009010100', 'dataport.subscription_type': 'flush', 'dataport.buffer.length': '1', 'dataport.interface_type': 'corba_cdr', 'dataport.dataflow_type': 'Push', 'dataport.data_type': 'IDL:RTC/TimedDoubleSeq:1.0', 'dataport.serializer.cdr.endian': 'little,big'}, with ports [('/localhost/PA10Controller(Robot)0.rtc:q', <rtctree.ports.DataOutPort object at 0x1b347d0>), ('/localhost/kokada-t430s.host_cxt/manager.mgr/log.rtc:q', <rtctree.ports.DataInPort object at 0x1b30050>)] /home/k-okada/ros/groovy/rtm-ros-robotics/openrtm_common/rtshell/bin/rtcryo: global name 'data_ports' is not defined data_ports ->

gbiggs commented 11 years ago

以下のパッチをrtshellのrtlsに適応して、ルート(/)から「rtls -lR」を実行して、出力を全部送っていただけませんか。

diff --git a/rtshell/rtls.py b/rtshell/rtls.py
index 1c4cc7f..a64b979 100644
--- a/rtshell/rtls.py
+++ b/rtshell/rtls.py
@@ -135,6 +135,16 @@ def get_node_long_lines(nodes, use_colour=True):

             info_strings.append((state_string, total_string, in_string,
                                  out_string, svc_string, node.name))
+            for p in node.ports:
+                print p.owner.name, ':', p.name
+                print p
+                print '------------------------------------'
+                print len(p.connections), 'connections'
+                print p.connections
+                for c in p.connections:
+                    print str(c)
+                    print '------------------------------------'
+                print '===================================='
         elif node.is_zombie:
             # Zombies are treated like unknowns, but tagged with *
             if state_width == 0:```
k-okada commented 11 years ago

ありがとうございます. ファイルが大きくpasteできなかったので,圧縮して拡張子をjpgに変換しました.ダウンロードして拡張子をzipにして展開してみてください. rtls

tnaka commented 10 years ago

こちらも似たようなエラーでrtcryoが動いていません。 rtcryoを実行すると以下のようにlist index out of rangeとなります。

$ rtcryo --verbose
Traceback (most recent call last):
  File "/home/tnakaoka/ros/groovy/rtm-ros-robotics/openrtm_common/rtshell_core/rtshell/lib/python2.7/site-packages/rtshell/rtcryo.py", line 284, in main
    sysname=options.sysname, version=options.version, tree=tree)
  File "/home/tnakaoka/ros/groovy/rtm-ros-robotics/openrtm_common/rtshell_core/rtshell/lib/python2.7/site-packages/rtshell/rtcryo.py", line 216, in freeze_dry
    components)
  File "/home/tnakaoka/ros/groovy/rtm-ros-robotics/openrtm_common/rtshell_core/rtshell/lib/python2.7/site-packages/rtshell/rtcryo.py", line 144, in find_unique_connectors
    path = rtctree.path.parse_path(dest_ports[0])
IndexError: list index out of range
/home/tnakaoka/ros/groovy/rtm-ros-robotics/openrtm_common/rtshell_core/rtshell/bin/rtcryo: list index out of range

dest_portsが[]になっているので、rtcryo.pyの144行目の前に

if len(dest_ports) == 0:
    continue

などと書いて回避すると、このissueの最初にあるKeyErrorが出るようになり、 https://code.google.com/p/rtm-ros-robotics/source/browse/trunk/rtmros_common/openrtm/rtcryo.patch?r=953 にあるパッチを当てると正常に動くように見えます。

rtcat -lで見てみると、上のコメントにあるのと同じくサービスポートに(2 other connections)などと表示があるので、サービスポートの接続の見え方がおかしいようです。 接続していないサービスポートもカウントしてしまうようなことはあるでしょうか。

k-okada commented 10 years ago

結論としては https://github.com/tnaka/rtshell/commit/d7c88afef7d284ecb501c773d7c6b1fc425ff11c https://github.com/tnaka/rtshell/commit/f5b44ecf07fbf11f9d7f16dedaabdc9cf3d7b602 https://code.google.com/p/rtm-ros-robotics/source/browse/trunk/rtmros_common/openrtm/rtcryo.patch?r=953 の3つのパッチを当てれば動きそうという事でいいのかな?

tnaka commented 10 years ago

tnaka@f5b44ecf07fbf11f9d7f16dedaabdc9cf3d7b602 のコメントに書きましたが、このパッチは https://code.google.com/p/rtm-ros-robotics/source/browse/trunk/rtmros_common/openrtm/rtcryo.patch?r=953 にあるものと同一です。

こちらでは以下の2つのパッチを当てた状態で動いています。

k-okada commented 10 years ago

ros経由でインストールしている人は,https://github.com/start-jsk/rtshell_core/pull/9 でパッチを当てたものを使えるようにしました.

k-okada commented 10 years ago

ちなみに,これが起こる状況は簡単(openrtm_aistについてくるレベルのサンプルプログラム)に作れないのかな?hrpsysを動かしたら起こっているんだけど...