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

[NXO Client] Overridden getRTCList now simply calls a method from the parent class, HIRONX #239

Merged
merged 1 commit into from
Oct 18, 2016

Conversation

130s
Copy link
Contributor

@130s 130s commented Mar 23, 2016

In order to return the same RTCs and utilize whatever the logic defined.

This PR is similar to #238 but the purpose is different.

@130s
Copy link
Contributor Author

130s commented Mar 23, 2016

This PR actually fixes a bug that we just found; currently there's no way for NXO to utilize RemoveForceSensorLinkOffset or AbsoluteForceSensor RTC (, which from HIRONX you can. See here).

@130s
Copy link
Contributor Author

130s commented Mar 23, 2016

There seems to be a temporary glitch on ROS buildfarm with some MoveIt! packages so that the test is failing on Travis.

@130s 130s force-pushed the impr/rm_overridden_getrtclist branch from 3dd0e2d to ffe0c8f Compare October 12, 2016 09:56
@130s
Copy link
Contributor Author

130s commented Oct 12, 2016

This PR seems to cause the following error.

$ ipython -i `rospack find nextage_ros_bridge`/script/nextage.py -- --host nextage
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
Type "copyright", "credits" or "license" for more information.

IPython 1.2.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
configuration ORB with nextage:15005
[hrpsys.py] waiting ModelLoader
[hrpsys.py] start hrpsys
[hrpsys.py] finding RTCManager and RobotHardware
[hrpsys.py]  waitForRTCManagerAndRoboHardware has renamed to waitForRTCManagerAndRoboHardware: Please update your code
[hrpsys.py] wait for RTCmanager : None
[hrpsys.py] wait for RobotHardware0 : <hrpsys.rtm.RTcomponent instance at 0x7f5693c8e290> ( timeout 0 < 10)
[hrpsys.py] findComps -> RobotHardware : <hrpsys.rtm.RTcomponent instance at 0x7f5693c8e290> isActive? = True
[hrpsys.py] simulation_mode : False
[hrpsys.py]  Hrpsys controller version info:
[hrpsys.py]    ms =  <hrpsys.rtm.RTCmanager instance at 0x7f5693c8e1b8>
[hrpsys.py]    ref =  <RTM._objref_Manager instance at 0x7f5693c8e320>
[hrpsys.py]    version  =  315.1.8
;;
;; Loading ImpedanceController < 315.1.9
;;
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/usr/lib/python2.7/dist-packages/IPython/utils/py3compat.pyc in execfile(fname, *where)
    202             else:
    203                 filename = fname
--> 204             __builtin__.execfile(filename, *where)

/home/rosnoodle/cws_hironxo/src/tork-a/rtmros_nextage/nextage_ros_bridge/script/nextage.py in <module>()
     72     # This is backward compatible so that users can still keep using `nxc`.
     73     # See http://code.google.com/p/rtm-ros-robotics/source/detail?r=6926
---> 74     robot.init(robotname=args.robot, url=args.modelfile)
     75
     76     # ROS Client.

/home/rosnoodle/cws_hironxo/src/tork-a/rtmros_nextage/nextage_ros_bridge/src/nextage_ros_bridge/nextage_client.py in init(self, robotname, url)
    100         '''
    101         if not self.use_gazebo:
--> 102             HIRONX.init(self, robotname=robotname, url=url)
    103
    104     def get_hand_version(self):

/home/rosnoodle/cws_hironxo/src/start-jsk/rtmros_hironx/hironx_ros_bridge/src/hironx_ros_bridge/hironx_client.pyc in init(self, robotname, url)
    313
    314         # all([rtm.findRTC(rn[0], rtm.rootnc) for rn in self.getRTCList()]) # not working somehow...
--> 315         if set([rn[0] for rn in self.getRTCList()]).issubset(set([x.name() for x in self.ms.get_components()])) :
    316             print(self.configurator_name + "hrpsys components are already created and running")
    317             self.findComps(max_timeout_count=0, verbose=True)

/home/rosnoodle/cws_hironxo/src/tork-a/rtmros_nextage/nextage_ros_bridge/src/nextage_ros_bridge/nextage_client.py in getRTCList(self)
    335                  of abbreviated and full names of the component.
    336         '''
--> 337         return HIRONX.getRTCList()
    338
    339     def goInitial(self, tm=7, wait=True, init_pose_type=0):

TypeError: unbound method getRTCList() must be called with HIRONX instance as first argument (got nothing instead)

@130s 130s force-pushed the impr/rm_overridden_getrtclist branch from ffe0c8f to b6453d5 Compare October 12, 2016 21:48
@130s
Copy link
Contributor Author

130s commented Oct 12, 2016

Please review @k-okada

Travis has been failing on unrelated tests.

@k-okada
Copy link
Member

k-okada commented Oct 13, 2016

because of http://qiita.com/ynott/items/8acd03434569e23612f1 ?

◉ Kei Okada

2016-10-13 7:35 GMT+09:00 Isaac I.Y. Saito [email protected]:

Please review @k-okada https://github.com/k-okada

Travis has been failing on unrelated tests.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#239 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAeG3JIjMZkNNQ37VihDB4eW9PLZcB_-ks5qzWCdgaJpZM4H24SB
.

@130s
Copy link
Contributor Author

130s commented Oct 15, 2016

Travis has been failing on unrelated tests.

Travis is failing at MoveIt! tests, which should be irrelevant with this PR.

@k-okada
Copy link
Member

k-okada commented Oct 16, 2016

1 . did you run test code on you local machine? you can reproduce this error.

  1. I'm not sure if this PR is the only cause, but I'm pretty sure that this PR brings at least one problem; you're using super (https://github.com/tork-a/rtmros_nextage/pull/239/files#diff-74831e17eddab0218a7f6d7fbc024a30R337
    ) with the object this is not inheritance of object class, see HIRONX(https://github.com/start-jsk/rtmros_hironx/blob/indigo-devel/hironx_ros_bridge/src/hironx_ros_bridge/hironx_client.py#L221) and HrpsysConfigurator (https://github.com/fkanehiro/hrpsys-base/blob/master/python/hrpsys_config.py#L161)
    which NextageClient avoid this issue with very tentative way (https://github.com/tork-a/rtmros_nextage/blob/indigo-devel/nextage_ros_bridge/src/nextage_ros_bridge/nextage_client.py#L46)
The model was successfully loaded ! 
Traceback (most recent call last):
  File "/home/travis/catkin_ws/install/share/nextage_ros_bridge/script/nextage.py", line 74, in <module>
    robot.init(robotname=args.robot, url=args.modelfile)
  File "/home/travis/catkin_ws/install/lib/python2.7/dist-packages/nextage_ros_bridge/nextage_client.py", line 109, in init
    HIRONX.init(self, robotname=robotname, url=url)
  File "/opt/ros/indigo/lib/python2.7/dist-packages/hironx_ros_bridge/hironx_client.py", line 315, in init
    if set([rn[0] for rn in self.getRTCList()]).issubset(set([x.name() for x in self.ms.get_components()])) :
  File "/home/travis/catkin_ws/install/lib/python2.7/dist-packages/nextage_ros_bridge/nextage_client.py", line 344, in getRTCList
    return super(HIRONX, self).getRTCList()
TypeError: must be type, not classobj

@k-okada
Copy link
Member

k-okada commented Oct 16, 2016

I have created fkanehiro/hrpsys-base#1048, but not
sure if this code is ok with old python used in qnx, please check that, we
may be better to chenge HIRONX class

◉ Kei Okada

2016-10-15 11:31 GMT+09:00 Isaac I.Y. Saito [email protected]:

Travis has been failing on unrelated tests.

Travis is failing at MoveIt! tests, which should be irrelevant with this
PR.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#239 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAeG3BIJKF7-q6mSIwjBEvEhqnCFP9eIks5q0DrsgaJpZM4H24SB
.

… parent class, HIRONX, to return the same RTCs and utilize whatever the logic defined.
@130s 130s force-pushed the impr/rm_overridden_getrtclist branch from b6453d5 to f80d985 Compare October 17, 2016 07:15
@130s
Copy link
Contributor Author

130s commented Oct 17, 2016

@k-okada thank you for taking a look.
I found that in NextageClient there's already an example of an "inherited" method, so I just did the same and Travis passed with the updated commit.

@k-okada k-okada merged commit ff74d1b into tork-a:indigo-devel Oct 18, 2016
@k-okada
Copy link
Member

k-okada commented Oct 18, 2016

nice ,this seems better solution.

@130s 130s deleted the impr/rm_overridden_getrtclist branch October 18, 2016 09:01
@k-okada
Copy link
Member

k-okada commented Apr 21, 2017

If

NXO -> custom hand
Hiro -> servo hand

is true, please consider reverting this, this causes the problem like #308

130s added a commit that referenced this pull request Apr 29, 2017
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.

2 participants