def __init__(self): BaseApp.__init__(self) #initialize everything # 1) Create the Panda world # 2) Create the ODE World # 3) Load the environment # 4) Initialize any RobotWorld Objects / Parts # 5) Load or create your robot # 6) Load or create a program for your robot # 7) Loop: # a) for each part: # i) simulate its inputs and outputs # ii) apply any forces generated # iii) execute micro-controller computations # iv) loop if necessary to stabilize communication loops # b) simulate ODE several times for each frame displayed # c) possibly simulate airflow #self.init_panda() #1 self.create_ode_world() #2 self.load_environment('data/RobotLab') #3 self.create_robot() self.taskMgr.add(self.update, "update")
def __init__(self, devices, PluginClasses): print APP_TITLE + " running..." BaseApp.__init__(self, devices) self.started = False # Command Message Handlers self.cmdMessageHandlers = { CMD_MSG_TOPICS.NEW_TASK:[ self.createAndAddTask ], CMD_MSG_TOPICS.SHUTDOWN:[ self.generateShutdownMessage ] } self.installCmdMessageHandler() self.shutdown_msg = None # Plugins self.plugins = [] # Instantiation if PluginClasses: for PluginClass in PluginClasses: self.plugins.append(PluginClass(self)) self.installPlugins()
def dispatchMessage(self, topic, message): BaseApp.dispatchMessage(self, topic, message)
def close(self): BaseApp.close(self)
import sys from base_app import BaseApp bookmaker_name = sys.argv[1] if len(sys.argv) > 1 else None app = BaseApp() app.doParse( bookmaker_name )