本文整理汇总了Python中ddapp.consoleapp.ConsoleApp.setupGlobals方法的典型用法代码示例。如果您正苦于以下问题:Python ConsoleApp.setupGlobals方法的具体用法?Python ConsoleApp.setupGlobals怎么用?Python ConsoleApp.setupGlobals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ddapp.consoleapp.ConsoleApp
的用法示例。
在下文中一共展示了ConsoleApp.setupGlobals方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from ddapp.consoleapp import ConsoleApp [as 别名]
# 或者: from ddapp.consoleapp.ConsoleApp import setupGlobals [as 别名]
def main():
global app, view, nav_data
nav_data = np.array([[0, 0, 0]])
lcmUtils.addSubscriber(".*_NAV$", node_nav_t, handleNavData)
app = ConsoleApp()
app.setupGlobals(globals())
app.showPythonConsole()
view = app.createView()
view.show()
global d
d = DebugData()
d.addLine([0,0,0], [1,0,0], color=[0,1,0])
d.addSphere((0,0,0), radius=0.02, color=[1,0,0])
#vis.showPolyData(d.getPolyData(), 'my debug geometry', colorByName='RGB255')
startSwarmVisualization()
app.start()
示例2: ConsoleApp
# 需要导入模块: from ddapp.consoleapp import ConsoleApp [as 别名]
# 或者: from ddapp.consoleapp.ConsoleApp import setupGlobals [as 别名]
from ddapp.consoleapp import ConsoleApp
from ddapp import lcmspy
from ddapp import lcmUtils
from ddapp import simpletimer as st
app = ConsoleApp()
app.setupGlobals(globals())
if app.getTestingInteractiveEnabled():
app.showPythonConsole()
lcmspy.findLCMModulesInSysPath()
timer = st.SimpleTimer()
stats = {}
channelToMsg = {}
items = {}
def item(r, c):
rowDict = items.setdefault(r, {})
try:
return rowDict[c]
except KeyError:
i = QtGui.QTableWidgetItem('')
table.setItem(r, c, i)
rowDict[c] = i
return i