#!/usr/bin/env python # -*- coding: utf-8 -*- # -*- Python -*- """ @file LeggedRobot_idl_examplefile.py @brief Python example implementations generated from LeggedRobot.idl @date $Date$ @author 宮本 信彦 n-miyamoto@aist.go.jp 産業技術総合研究所 ロボットイノベーション研究センター ロボットソフトウエアプラットフォーム研究チーム """ import omniORB from omniORB import CORBA, PortableServer import OpenHRP, OpenHRP__POAimport OpenHRP, OpenHRP__POAimport OpenHRP, OpenHRP__POAimport OpenHRP, OpenHRP__POAimport OpenHRP, OpenHRP__POAimport RTC, RTC__POAimport RTC, RTC__POA class ServerObject_i (OpenHRP__POA.ServerObject): """ @class ServerObject_i Example class implementing IDL interface OpenHRP.ServerObject """ def __init__(self): """ @brief standard constructor Initialise member variables here """ pass # void shutdown() def shutdown(self): raise CORBA.NO_IMPLEMENT(0, CORBA.COMPLETED_NO) # *** Implement me # Must return: None class ShapeSetInfo_i (OpenHRP__POA.ShapeSetInfo): """ @class ShapeSetInfo_i Example class implementing IDL interface OpenHRP.ShapeSetInfo """ def __init__(self): """ @brief standard constructor Initialise member variables here """ pass class BodyInfo_i (OpenHRP__POA.BodyInfo): """ @class BodyInfo_i Example class implementing IDL interface OpenHRP.BodyInfo """ def __init__(self): """ @brief standard constructor Initialise member variables here """ pass class SceneInfo_i (OpenHRP__POA.SceneInfo): """ @class SceneInfo_i Example class implementing IDL interface OpenHRP.SceneInfo """ def __init__(self): """ @brief standard constructor Initialise member variables here """ pass class ModelLoader_i (OpenHRP__POA.ModelLoader): """ @class ModelLoader_i Example class implementing IDL interface OpenHRP.ModelLoader """ def __init__(self): """ @brief standard constructor Initialise member variables here """ pass # BodyInfo getBodyInfo(in string url) def getBodyInfo(self, url): raise CORBA.NO_IMPLEMENT(0, CORBA.COMPLETED_NO) # *** Implement me # Must return: result # BodyInfo getBodyInfoEx(in string url, in ModelLoadOption option) def getBodyInfoEx(self, url, option): raise CORBA.NO_IMPLEMENT(0, CORBA.COMPLETED_NO) # *** Implement me # Must return: result # BodyInfo loadBodyInfo(in string url) def loadBodyInfo(self, url): raise CORBA.NO_IMPLEMENT(0, CORBA.COMPLETED_NO) # *** Implement me # Must return: result # BodyInfo loadBodyInfoEx(in string url, in ModelLoadOption option) def loadBodyInfoEx(self, url, option): raise CORBA.NO_IMPLEMENT(0, CORBA.COMPLETED_NO) # *** Implement me # Must return: result # SceneInfo loadSceneInfo(in string url) def loadSceneInfo(self, url): raise CORBA.NO_IMPLEMENT(0, CORBA.COMPLETED_NO) # *** Implement me # Must return: result # void clearData() def clearData(self): raise CORBA.NO_IMPLEMENT(0, CORBA.COMPLETED_NO) # *** Implement me # Must return: None class LeggedRobotCommonInterface_Servo_i (RTC__POA.LeggedRobotCommonInterface_Servo): """ @class LeggedRobotCommonInterface_Servo_i Example class implementing IDL interface RTC.LeggedRobotCommonInterface_Servo """ def __init__(self): """ @brief standard constructor Initialise member variables here """ pass # boolean setSoftLimitJoint(in JointPos pos) def setSoftLimitJoint(self, pos): raise CORBA.NO_IMPLEMENT(0, CORBA.COMPLETED_NO) # *** Implement me # Must return: result # JointPos getSoftLimitjoint() def getSoftLimitjoint(self): raise CORBA.NO_IMPLEMENT(0, CORBA.COMPLETED_NO) # *** Implement me # Must return: result # boolean servoOFF() def servoOFF(self): raise CORBA.NO_IMPLEMENT(0, CORBA.COMPLETED_NO) # *** Implement me # Must return: result # boolean servoON() def servoON(self): raise CORBA.NO_IMPLEMENT(0, CORBA.COMPLETED_NO) # *** Implement me # Must return: result class LeggedRobotCommonInterface_Robot_i (RTC__POA.LeggedRobotCommonInterface_Robot): """ @class LeggedRobotCommonInterface_Robot_i Example class implementing IDL interface RTC.LeggedRobotCommonInterface_Robot """ def __init__(self): """ @brief standard constructor Initialise member variables here """ pass # RobotInfo getRobotInfo() def getRobotInfo(self): raise CORBA.NO_IMPLEMENT(0, CORBA.COMPLETED_NO) # *** Implement me # Must return: result # LegList getFeedbackPos() def getFeedbackPos(self): raise CORBA.NO_IMPLEMENT(0, CORBA.COMPLETED_NO) # *** Implement me # Must return: result if __name__ == "__main__": import sys # Initialise the ORB orb = CORBA.ORB_init(sys.argv) # As an example, we activate an object in the Root POA poa = orb.resolve_initial_references("RootPOA") # Create an instance of a servant class servant = ServerObject_i() # Activate it in the Root POA poa.activate_object(servant) # Get the object reference to the object objref = servant._this() # Print a stringified IOR for it print orb.object_to_string(objref) # Activate the Root POA's manager poa._get_the_POAManager().activate() # Run the ORB, blocking this thread orb.run()