Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 8 commits into
base: indigo-devel
Choose a base branch
from

Conversation

pazeshun
Copy link
Contributor

What I did

  • Add auto-generation of ros bridge for old impedance controller inside HiroNX (generation of AbsoluteForceSensorServiceROSBridge and ImpedanceControllerServiceROSBridge)
    • Add idls for old impedance controller (AbsoluteForceSensorService.idl and ImpedanceControllerService.idl from [email protected])
    • Use rtmbuild and custom cmake macro to generate and build ros bridge executables from idls
  • Fix ros bridge launch to run generated ros bridge executables instead of ones in hrpsys_ros_bridge
    • Because ros bridge executables in hrpsys_ros_bridge are generated from idls in latest hrpsys-base, which don't have AbsoluteForceSensorService.idl and have different ImpedanceControllerService.idl

@pazeshun
Copy link
Contributor Author

pazeshun commented Jun 20, 2018

rtmbuild_genidl_no_py added in 589e7f3 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
Copy link
Contributor Author

pazeshun commented Jun 20, 2018

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 931124e

@k-okada
Copy link
Member

k-okada commented Jun 23, 2018 via email

)

catkin_python_setup()
# generate idl for old impedance controller
rtmbuild_genidl_customed()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rtmbuild_genidl_from_file(FILE=idl_315_1_9/Hoge.idl, VERSION=315.1.9)
rtmbuild_genidl_from_file(FILE=idl_315_1_9/Fuga.idl, VERSION=315.1.9)
=> lib/libHoge_315_1_9.so)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Realized in #533

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants