start-jsk / rtmros_hironx

hironx controller and applications using rtmros packages
http://wiki.ros.org/rtmros_hironx
10 stars 27 forks source link

[ros_bridge] Enable to use impedance controller through ros bridge #527

Open pazeshun opened 6 years ago

pazeshun commented 6 years ago

What I did

pazeshun commented 6 years ago

rtmbuild_genidl_no_py added in https://github.com/start-jsk/rtmros_hironx/pull/527/commits/589e7f3096b97cd6d5c8a184e78c84838cdb5d8c is changed from rtmbuild_genidl not to create any python files.

When you use rtmbuild_genidl like hrpsys_ros_bridge instead of rtmbuild_genidl_no_py, you will see an error in roslaunch hironx_ros_bridge hironx_ros_bridge_real.launch nameserver:=%HOSTNAME% like:

In [1]: from hironx_ros_bridge import hironx_client
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-1-9f26e2343818> in <module>()
----> 1 from hironx_ros_bridge import hironx_client

/home/pazeshun/test_ws/src/rtmros_hironx/hironx_ros_bridge/src/hironx_ros_bridge/hironx_client.py in <module>()
     41 roslib.load_manifest("hrpsys")
     42 from hrpsys.hrpsys_config import *
---> 43 import OpenHRP
     44 import OpenRTM_aist
     45 import OpenRTM_aist.RTM_IDL

/home/pazeshun/test_ws/devel/lib/python2.7/dist-packages/hironx_ros_bridge/OpenHRP/__init__.py in <module>()
      4
      5 import omniORB
----> 6 omniORB.updateModule("OpenHRP")
      7
      8 # ** 1. Stub files contributing to this module

/usr/lib/python2.7/dist-packages/omniORB/__init__.pyc in updateModule(mname)
    618     if _partialModules.has_key(mname):
    619         pmod = _partialModules[mname]
--> 620         mod  = sys.modules[mname]
    621         mod.__dict__.update(pmod.__dict__)
    622         del _partialModules[mname]

KeyError: 'OpenHRP'

I think the bad point is that /home/pazeshun/devel/lib/python2.7/dist-packages/hironx_ros_bridge/OpenHRP is generated. Previously, import OpenHRP means importing /opt/ros/indigo/lib/python2.7/dist-packages/OpenHRP generated in openhrp3 package However, when OpenHRP python module is created inside hironx_ros_bridge, that module is unintendedly tried to be imported.

So current solution is to avoid creating OpenHRP inside hironx_ros_bridge.

pazeshun commented 6 years ago

Current problem: When you create and build workspace containing both hrpsys_ros_bridge and hironx_ros_bridge, next build of hrpsys_ros_bridge will fail. Errors: https://drive.google.com/open?id=11-J_R_xoocBNqVKMWPB4mekjXEoX_fjX Current assumption: build of hironx_ros_bridge changes intermediate product from ImpedanceController which is needed from hrpsys_ros_bridge? <- Fixed in https://github.com/start-jsk/rtmros_hironx/pull/527/commits/931124e6a5192b001b034a2214420216a5d01ca0

k-okada commented 6 years ago

@pazeshun I'll make this PR pass travis, when we need this.

-- ◉ Kei Okada

2018-06-22 20:33 GMT+09:00 Shun Hasegawa notifications@github.com:

Reopened #527 https://github.com/start-jsk/rtmros_hironx/pull/527.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/start-jsk/rtmros_hironx/pull/527#event-1695749271, or mute the thread https://github.com/notifications/unsubscribe-auth/AAeG3KnW-da6G4cl_ry3B2-mp27Ot9VDks5t_NYEgaJpZM4Uvlmg .