hsnuhayato / rtm-ros-robotics

Automatically exported from code.google.com/p/rtm-ros-robotics
0 stars 0 forks source link

hrpsys_profile cannot be activated #219

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
hrpsys_profile.pyでエラーがでます。

configuration ORB with  localhost : 15005
Traceback (most recent call last):
  File "/home/nozawa/ros/groovy/rtm-ros-robotics/rtmros_common/hrpsys_ros_bridge/scripts/hrpsys_profile.py", line 86, in <module>
    rtc_init(hostname)
  File "/home/nozawa/ros/groovy/rtm-ros-robotics/rtmros_common/hrpsys_ros_bridge/scripts/hrpsys_profile.py", line 22, in rtc_init
    ms = rtm.findRTCmanager(hostname)
  File "/home/nozawa/ros/groovy/rtm-ros-robotics/openrtm_common/hrpsys/lib/python2.7/dist-packages/rtm.py", line 336, in findRTCmanager
    socket.gethostbyaddr(hostname)[0],
socket.gaierror: [Errno -2] Name or service not known

試したものは
rtmlaunch hrpsys_ros_bridge_tutorials samplerobot.launch
rtmlaunch hironx_ros_bridge hironx_ros_bridge_simualtion.launch
で、現状シミュレーションなので実害はないですが、
実機ではうごいてますでしょうか。

エラーの箇所はhrpsys_profile.pyの
    args_without_ros_options = filter(lambda x : str.find(x, '__'), sys.argv)
    if len(args_without_ros_options) > 1 :
        hostname=args_without_ros_options[1]

    try:
        rtc_init(hostname)
でrtc_initにIPアドレス・ホスト名でないhostnameがわたされ(手�
��では"-ORBInitRef"の文字列)、
rtm.pyのfindRTCManagerで解決しているところでエラーがでます。
また、"-ORBInitRef"はsys.args(hrpsys_ros_bridge.launchの中で渡される�
��数)がargs_without_ros_optionsになってhostnameにセットされ、
rtc_initに渡されていますが、これは本来何がはいることを(
特に実機で)想定されてますでしょうか

多分以下のパッチのようなかんじになると思うのですが,
ご確認いただけますと助かります。

Index: hrpsys_profile.py
===================================================================
--- hrpsys_profile.py   (リビジョン 5604)
+++ hrpsys_profile.py   (作業コピー)
@@ -79,7 +79,7 @@
     hostname = socket.gethostname()
     args_without_ros_options = filter(lambda x : str.find(x, '__'), sys.argv)
     if len(args_without_ros_options) > 1 :
-        hostname=args_without_ros_options[1]
+        hostname=args_without_ros_options[2].split(":")[2]

     try:
         rtc_init(hostname)

Original issue reported on code.google.com by nothewo...@gmail.com on 26 Sep 2013 at 12:50

GoogleCodeExporter commented 9 years ago
hrp4r実機でも同様のエラーが出てhrpsys_profile.pyでエラーが出�
��ことを確認しました.
該当のパッチを当てることでエラーなく起動することも確��
�しました.
多分rtcdが走っているホスト名が入ることが期待されている�
��思われるのですがいかがでしょうか.

Original comment by ik0...@gmail.com on 30 Sep 2013 at 1:05

GoogleCodeExporter commented 9 years ago
https://code.google.com/p/hrpsys-base/issues/detail?id=128
で仕様が変わっているのですが,それに対応した解決方法��
�なっているか確認したい.

Original comment by kei.ok...@gmail.com on 30 Sep 2013 at 1:20

GoogleCodeExporter commented 9 years ago
please check if this fixed in r5712

Original comment by kei.ok...@gmail.com on 16 Oct 2013 at 3:16

GoogleCodeExporter commented 9 years ago

Original comment by kei.ok...@gmail.com on 30 Jan 2014 at 11:11