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

rtprintは動いていますでしょうか? #14

Closed k-okada closed 10 years ago

k-okada commented 11 years ago

OpenRTM-aist-1.1.0-RELEASE.tar.gz と, OpenRTM-aist-Python-1.1.0-RC1.tar.gz を使っています.

/home/k-okada/ros/groovy/rtm-ros-robotics/openrtm_common/openrtm_aist/share/openrtm-1.1/example/SeqOutComp

を立ち上げておいた状態で,

$ rtprint -v localhost/SequenceOutComponent0.rtc:DoubleSeq 

とすると,以下のように表示されます.

Pre-loaded modules: ['RTC']
Will run -1 times.
/, {'localhost': <rtctree.nameserver.NameServer object at 0x2642c50>}
 localhost, {'SequenceOutComponent0.rtc': <rtctree.component.Component object at 0x2642f90>}
  SequenceOutComponent0.rtc, {}

IDL:RTC/TimedDoubleSeq:1.0
Automatically importing modules []
Traceback (most recent call last):
  File "/home/k-okada/ros/groovy/rtm-ros-robotics/openrtm_common/rtshell/lib/python2.7/site-packages/rtshell/rtprint.py", line 141, in main
    [path.cmd_path_to_full_path(p) for p in args], options, tree)
  File "/home/k-okada/ros/groovy/rtm-ros-robotics/openrtm_common/rtshell/lib/python2.7/site-packages/rtshell/rtprint.py", line 63, in read_from_ports
    port_specs = port_types.make_port_specs(targets, mm, tree)
  File "/home/k-okada/ros/groovy/rtm-ros-robotics/openrtm_common/rtshell/lib/python2.7/site-packages/rtshell/port_types.py", line 140, in make_port_specs
    port_obj.properties['dataport.data_type'])
  File "/home/k-okada/ros/groovy/rtm-ros-robotics/openrtm_common/rtshell/lib/python2.7/site-packages/rtshell/modmgr.py", line 129, in find_class
    raise rts_exceptions.TypeNotFoundError(name)
TypeNotFoundError: Type not found: IDL:RTC/TimedDoubleSeq:1.0
rtprint: Type not found: IDL:RTC/TimedDoubleSeq:1.0

rtcatの出力は以下になります.

 -DataOutPort: DoubleSeq
    dataport.data_type          IDL:RTC/TimedDoubleSeq:1.0
    dataport.dataflow_type      push,pull
    dataport.interface_type     corba_cdr
    dataport.subscription_type  flush,new,periodic
    port.port_type              DataOutPort
k-okada commented 11 years ago

modmgr.pyのfind_classで以下のように変更すると動きました.正しい直し方はどうなりますでしょうか?

            types = [member for member in inspect.getmembers(m.mod,
                    inspect.isclass) if "IDL:"+self._mods.keys()[0]+"/"+member[0]+":1.0" == name]
k-okada commented 11 years ago

$ rtprint hiro014:15005/RobotHardware0.rtc:q rtprint: Type not found: IDL:RTC/TimedDoubleSeq:1.0

のような簡単な例でも上のパッチが必要になっています。