本文整理汇总了Python中simulator.Simulator.loadFromFile方法的典型用法代码示例。如果您正苦于以下问题:Python Simulator.loadFromFile方法的具体用法?Python Simulator.loadFromFile怎么用?Python Simulator.loadFromFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类simulator.Simulator
的用法示例。
在下文中一共展示了Simulator.loadFromFile方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: from simulator import Simulator [as 别名]
# 或者: from simulator.Simulator import loadFromFile [as 别名]
if runSim:
print "WARNING!!!!"
print "running simulation, break now to avoid overwriting files!!!!"
simList = []
for runNum in range(1,numRuns+1):
filename = filenameBase + str(runNum)
if runSim:
sim = Simulator(autoInitialize=False, verbose=False)
sim.options = copy.deepcopy(options)
sim.initialize()
sim.run(launchApp=False)
sim.saveToFile(filename)
else:
sim = Simulator.loadFromFile(filename)
simList.append(sim)
# om.removeFromObjectModel(om.findObjectByName("world"))
# om.removeFromObjectModel(om.findObjectByName("robot"))
# simList[0].initialize()
if not runSim:
sim = simList[0]
sim.setupPlayback()
示例2:
# 需要导入模块: from simulator import Simulator [as 别名]
# 或者: from simulator.Simulator import loadFromFile [as 别名]
__author__ = 'manuelli'
from simulator import Simulator
sim = Simulator.loadFromFile("test")
sim.setupPlayback()