本文整理汇总了Python中director.consoleapp.ConsoleApp.setupGlobals方法的典型用法代码示例。如果您正苦于以下问题:Python ConsoleApp.setupGlobals方法的具体用法?Python ConsoleApp.setupGlobals怎么用?Python ConsoleApp.setupGlobals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类director.consoleapp.ConsoleApp
的用法示例。
在下文中一共展示了ConsoleApp.setupGlobals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ConsoleApp
# 需要导入模块: from director.consoleapp import ConsoleApp [as 别名]
# 或者: from director.consoleapp.ConsoleApp import setupGlobals [as 别名]
from director import visualization as vis
from director import lcmUtils
from director import ioUtils
from director.debugVis import DebugData
from director.timercallback import TimerCallback
from director import segmentation
from director.uuidutil import newUUID
from director import geometryencoder
from director import sceneloader
import drc as lcmdrc
import os
import json
from director.utime import getUtime
app = ConsoleApp()
app.setupGlobals(globals())
app.showPythonConsole()
view = app.createView()
view.show()
robotsystem.create(view, globals())
def affordanceFromDescription(desc):
affordanceManager.collection.updateDescription(desc)
return affordanceManager.getAffordanceById(desc['uuid'])
def newBox():
desc = dict(classname='BoxAffordanceItem', Name='test box', Dimensions=[0.5, 0.2, 0.1], uuid=newUUID(), pose=((0.5,0.0,1.0), (1,0,0,0)))
return affordanceFromDescription(desc)