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

"omniORB.BAD_OPERATION_UnRecognisedOperationName" error upon calling readDigitalOutput #343

Closed
130s opened this issue Jun 27, 2017 · 11 comments

Comments

@130s
Copy link
Contributor

130s commented Jun 27, 2017

Reported at #340 (comment) from @antgarmun:

In [2]: b=robot.readDigitalOutput()
BAD_OPERATION                             Traceback (most recent call last)
/home/kwduser/<ipython-input-2-4ab7a4ba7bdd> in <module>()
----> 1 b=robot.readDigitalOutput()

/opt/ros/hydro/lib/python2.7/dist-packages/hrpsys/hrpsys_config.pyc in readDigitalOutput(self)
   1554         @return list of int: List of the values in digital input register. Range: 0 or 1.
   1555         '''
-> 1556         ret, dout = self.rh_svc.readDigitalOutput()
   1557         retList = []
   1558         for item in dout:

/opt/ros/hydro/lib/python2.7/dist-packages/hrpsys/RobotHardwareService_idl.pyc in readDigitalOutput(self, *args)
    273
    274     def readDigitalOutput(self, *args):
--> 275         return _omnipy.invoke(self, "readDigitalOutput", _0_OpenHRP.RobotHardwareService._d_readDigitalOutput, args)
    276
    277     def getStatus2(self, *args):

BAD_OPERATION: CORBA.BAD_OPERATION(omniORB.BAD_OPERATION_UnRecognisedOperationName, CORBA.COMPLETED_NO)
@130s
Copy link
Contributor Author

130s commented Jun 27, 2017

I have no idea about this error. A few thoughts:

  • readDigitalOutput and writeDigitalOutput are methods from upstream library hrpsys as I linked to the document of each. I would suggest we'll keep tracking this down on their repository. I initiated a conversation for you, so please go ahead continue there.
  • Make sure other DIO-related methods work for you (e.g. this tutorial). If they don't, you might have other hindering issues that need to be fixed.

I close this for now but if there'll turn out to be anything specific to this repo, please reopen.

@130s 130s closed this as completed Jun 27, 2017
@k-okada
Copy link
Member

k-okada commented Jun 28, 2017 via email

@antgarmun
Copy link

The full python output is provided attached in this message. It is the first time that I use the grippers and/or DIO on the robot.

ipython -i rospack find nextage_ros_bridge/script/nextage.py -- --host hiro --robot RobotHardware0 --port 15005 --modelfile /opt/jsk/etc/HIRONX/model/main.wrl
Python 2.7.3 (default, Oct 26 2016, 21:01:49)
Type "copyright", "credits" or "license" for more information.

IPython 0.12.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 hiro:15005
[hrpsys.py] wait for RTCmanager : None
[hrpsys.py] wait for RobotHardware0 : <hrpsys.rtm.RTcomponent instance at 0x4af5ab8> ( timeout 0 < 10)
[hrpsys.py] findComps -> RobotHardware : <hrpsys.rtm.RTcomponent instance at 0x4af5ab8> isActive? = False
[hrpsys.py] simulation_mode : False
[hrpsys.py] Hrpsys controller version info:
[hrpsys.py] ms = <hrpsys.rtm.RTCmanager instance at 0x4af5830>
[hrpsys.py] ref = <RTM._objref_Manager instance at 0x4af5758>
[hrpsys.py] version = 1.0
;;
;; Loading ImpedanceController < 315.1.9
;;
[hrpsys.py] waiting ModelLoader
[hrpsys.py] start hrpsys
[hrpsys.py] finding RTCManager and RobotHardware
[hrpsys.py] wait for RTCmanager : None
[hrpsys.py] wait for RobotHardware0 : <hrpsys.rtm.RTcomponent instance at 0x4af5ab8> ( timeout 0 < 10)
[hrpsys.py] findComps -> RobotHardware : <hrpsys.rtm.RTcomponent instance at 0x4af5ab8> isActive? = False
[hrpsys.py] simulation_mode : False
[hrpsys.py] bodyinfo URL = file:///opt/jsk/etc/HIRONX/model/main.wrl
[hrpsys.py] creating components
[hrpsys.py] eval : [self.seq, self.seq_svc, self.seq_version] = self.createComp("SequencePlayer","seq")
[hrpsys.py] create Comp -> SequencePlayer : <hrpsys.rtm.RTcomponent instance at 0x4afef38> (1.0)
[hrpsys.py] create CompSvc -> SequencePlayer Service : <OpenHRP._objref_SequencePlayerService instance at 0x4b0b1b8>
[hrpsys.py] eval : [self.sh, self.sh_svc, self.sh_version] = self.createComp("StateHolder","sh")
[hrpsys.py] create Comp -> StateHolder : <hrpsys.rtm.RTcomponent instance at 0x4aedf80> (1.0)
[hrpsys.py] create CompSvc -> StateHolder Service : <OpenHRP._objref_StateHolderService instance at 0x4b0d7a0>
[hrpsys.py] eval : [self.fk, self.fk_svc, self.fk_version] = self.createComp("ForwardKinematics","fk")
[hrpsys.py] create Comp -> ForwardKinematics : <hrpsys.rtm.RTcomponent instance at 0x4b0a5f0> (1.0)
[hrpsys.py] create CompSvc -> ForwardKinematics Service : <OpenHRP._objref_ForwardKinematicsService instance at 0x4af9488>
[hrpsys.py] eval : [self.el, self.el_svc, self.el_version] = self.createComp("SoftErrorLimiter","el")
[hrpsys.py] create Comp -> SoftErrorLimiter : <hrpsys.rtm.RTcomponent instance at 0x4afea70> (1.0)
[hrpsys.py] create CompSvc -> SoftErrorLimiter Service : <OpenHRP._objref_SoftErrorLimiterService instance at 0x4b02758>
[hrpsys.py] eval : [self.log, self.log_svc, self.log_version] = self.createComp("DataLogger","log")
[hrpsys.py] create Comp -> DataLogger : <hrpsys.rtm.RTcomponent instance at 0x4af5950> (1.0)
[hrpsys.py] create CompSvc -> DataLogger Service : <OpenHRP._objref_DataLoggerService instance at 0x4b0a098>
[hrpsys.py] connecting components
[rtm.py] Connect sh.qOut - el.qRef
[rtm.py] Connect el.q - RobotHardware0.qRef
[rtm.py] Connect RobotHardware0.servoState - el.servoStateIn
[rtm.py] Connect RobotHardware0.q - sh.currentQIn
[rtm.py] Connect RobotHardware0.q - fk.q
[rtm.py] Connect sh.qOut - fk.qRef
[rtm.py] Connect seq.qRef - sh.qIn
[rtm.py] Failed to connect None to None
[rtm.py] Connect seq.basePos - sh.basePosIn
[rtm.py] Connect seq.baseRpy - sh.baseRpyIn
[rtm.py] Connect seq.zmpRef - sh.zmpIn
[rtm.py] Connect sh.basePosOut - seq.basePosInit
[rtm.py] Connect sh.basePosOut - fk.basePosRef
[rtm.py] Connect sh.baseRpyOut - seq.baseRpyInit
[rtm.py] Connect sh.baseRpyOut - fk.baseRpyRef
[rtm.py] Connect sh.qOut - seq.qInit
[rtm.py] Connect RobotHardware0.q - el.qCurrent
[hrpsys.py] activating components
[hrpsys.py] setup logger
[hrpsys.py] setupLogger : record type = TimedDoubleSeq, name = q to RobotHardware0_q
[rtm.py] Connect RobotHardware0.q - log.RobotHardware0_q
[hrpsys.py] setupLogger : record type = TimedDoubleSeq, name = tau to RobotHardware0_tau
[rtm.py] Connect RobotHardware0.tau - log.RobotHardware0_tau
[hrpsys.py] sensor names for DataLogger
[hrpsys.py] setupLogger : record type = TimedDoubleSeq, name = qOut to sh_qOut
[rtm.py] Connect sh.qOut - log.sh_qOut
[hrpsys.py] setupLogger : record type = TimedPoint3D, name = basePosOut to sh_basePosOut
[rtm.py] Connect sh.basePosOut - log.sh_basePosOut
[hrpsys.py] setupLogger : record type = TimedOrientation3D, name = baseRpyOut to sh_baseRpyOut
[rtm.py] Connect sh.baseRpyOut - log.sh_baseRpyOut
[hrpsys.py] setupLogger : record type = TimedPoint3D, name = zmpOut to sh_zmpOut
[rtm.py] Connect sh.zmpOut - log.sh_zmpOut
[hrpsys.py] setupLogger : emergencySignal arleady exists in DataLogger
[rtm.py] Connect RobotHardware0.emergencySignal - log.emergencySignal
[hrpsys.py] setupLogger : record type = TimedLongSeqSeq, name = servoState to RobotHardware0_servoState
[rtm.py] Failed to connect RobotHardware0.servoState to None([None])
[hrpsys.py] setup joint groups
[hrpsys.py] initialized successfully
[WARN] [WallTime: 1498655967.874591] ROS Bridge is not started yet, Assuming you want just to use RTM

In [1]: robot.servoOn()
Out[1]: -1

In [2]: robot.checkEncoders()
[hrpsys.py] calib-joint all
[hrpsys.py] done
Turn on Hand Servo

In [3]: robot.goInitial()
[hrpsys.py] , JntAnglesOfGr=torso, INITPOSE[i]=[0], tm=7, wait=True
[hrpsys.py] , JntAnglesOfGr=head, INITPOSE[i]=[0, 0], tm=7, wait=True
[hrpsys.py] , JntAnglesOfGr=rarm, INITPOSE[i]=[-0.6, 0, -100, 15.2, 9.4, 3.2], tm=7, wait=True
[hrpsys.py] , JntAnglesOfGr=larm, INITPOSE[i]=[0.6, 0, -100, -15.2, 9.4, -3.2], tm=7, wait=True
Out[3]: True

In [4]: b=robot.readDigitalOutput()

BAD_OPERATION Traceback (most recent call last)
/home/kwduser/ros/hydro/catkin_ws/devel/openCV_tests/ in ()
----> 1 b=robot.readDigitalOutput()

/opt/ros/hydro/lib/python2.7/dist-packages/hrpsys/hrpsys_config.pyc in readDigitalOutput(self)
1554 @return list of int: List of the values in digital input register. Range: 0 or 1.
1555 '''
-> 1556 ret, dout = self.rh_svc.readDigitalOutput()
1557 retList = []
1558 for item in dout:

/opt/ros/hydro/lib/python2.7/dist-packages/hrpsys/RobotHardwareService_idl.pyc in readDigitalOutput(self, *args)
273
274 def readDigitalOutput(self, *args):
--> 275 return _omnipy.invoke(self, "readDigitalOutput", _0_OpenHRP.RobotHardwareService._d_readDigitalOutput, args)
276
277 def getStatus2(self, *args):

BAD_OPERATION: CORBA.BAD_OPERATION(omniORB.BAD_OPERATION_UnRecognisedOperationName, CORBA.COMPLETED_NO)

@k-okada
Copy link
Member

k-okada commented Jun 28, 2017 via email

@antgarmun
Copy link

I am using HIRO but I can't sent you pictures.

@k-okada
Copy link
Member

k-okada commented Jun 28, 2017 via email

@antgarmun
Copy link

I follow the robot manual and It has DIO systems. The manual talks about NEXTAGE robot however, in some places of the documentation that I have talks about HIRO. It is possible that the robot is a NEXTAGE but use some things from HIRO development.

All works ok following the documentation but not the DIO system.

@k-okada
Copy link
Member

k-okada commented Jun 28, 2017

It seems you're trying to control root gripper via DIO fkanehiro/hrpsys-base#1170 (comment), but
if you're really using HIRO robot (http://robotics.naist.jp/wiki/?plugin=ref&page=%E7%A0%94%E7%A9%B6%E8%A8%AD%E5%82%99%2FHIRO-NX&src=HIRO-NX.jpg), you need to use https://github.com/start-jsk/rtmros_hironx/blob/indigo-devel/hironx_ros_bridge/src/hironx_ros_bridge/hironx_client.py#L473-L513, because the gripper is controlled via servo motor (and serial port), not DIO.
If you're using Nextage (http://nxt.typepad.jp/.a/6a0120a6ffc261970b019b00b83582970c-pi), the gripper is connected via DIO.
Anyway you'd better to contact manufacturer or service provider, we can not judge the situation without picture of the robot.

@130s
Copy link
Contributor Author

130s commented Jun 28, 2017

I follow the robot manual and It has DIO systems.

Just to be clear, is that a hardcopy or is it online? If online can you send the URL?

  • I might be wrong but I'd be a bit surprised if the manufacturer's manual mix Hiro and NEXTAGE in a single document (still not impossible though).
  • If you're referring to anything under http://wiki.ros.org/rtmros_nextage/Tutorials, unfortunately it's possible that available options for Hiro and NEXTAGE are often not clearly identified.

By default NEXTAGE has the letter on its chest it's NEXTAGE as in the picture in #343 (comment) unless the sticker is ripped off etc.

@antgarmun
Copy link

The manual is a hardcopy which was provided us with the robot. There is a sticker in the robot's chest that says: "HIRO", but the manual has the name of NEXTAGE, the robot works with NEXTAGE commands and it's simulation model is NEXTAGE. On the other hand, the manual talks about HIRO in some parts and some commands are refered to HIRO too.

@antgarmun
Copy link

The manual talks about DIO system and the API commands for control he hands are:
In [8]: robot.h
robot.hand_width2angles robot.handtool_l_eject robot.hes_version
robot.handlight_both robot.handtool_r_attach robot.hgc
robot.handlight_l robot.handtool_r_eject robot.hrpsys_version
robot.handlight_r robot.hes
robot.handtool_l_attach robot.hes_svc

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

No branches or pull requests

3 participants