本文整理汇总了Python中ddapp.debugVis.DebugData.addFrame方法的典型用法代码示例。如果您正苦于以下问题:Python DebugData.addFrame方法的具体用法?Python DebugData.addFrame怎么用?Python DebugData.addFrame使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ddapp.debugVis.DebugData
的用法示例。
在下文中一共展示了DebugData.addFrame方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: debugDrawFootPoints
# 需要导入模块: from ddapp.debugVis import DebugData [as 别名]
# 或者: from ddapp.debugVis.DebugData import addFrame [as 别名]
def debugDrawFootPoints(model):
pts_left, pts_right = FootstepsDriver.getContactPts()
d = DebugData()
for linkName in [_leftFootLink, _rightFootLink]:
t = model.getLinkFrame(linkName)
d.addFrame(t, scale=0.2)
if (linkName is _leftFootLink):
pts = pts_left
else:
pts = pts_right
footMidPoint = np.mean(pts, axis=0)
for p in pts.tolist() + [footMidPoint.tolist()]:
t.TransformPoint(p, p)
d.addSphere(p, radius=0.015)
midpt = FootstepsDriver.getFeetMidPoint(model)
d.addFrame(midpt, scale=0.2)
vis.showPolyData(d.getPolyData(), 'foot points debug', parent='debug', colorByName='RGB255')
示例2: updateGeometryFromProperties
# 需要导入模块: from ddapp.debugVis import DebugData [as 别名]
# 或者: from ddapp.debugVis.DebugData import addFrame [as 别名]
def updateGeometryFromProperties(self):
filename = self.getProperty('Filename')
if not filename:
polyData = vtk.vtkPolyData()
else:
polyData = self.getMeshManager().get(filename)
if not polyData:
if not os.path.isabs(filename):
filename = os.path.join(ddapp.getDRCBaseDir(), filename)
if os.path.isfile(filename):
polyData = ioUtils.readPolyData(filename)
else:
# use axes as a placeholder mesh
d = DebugData()
d.addFrame(vtk.vtkTransform(), scale=0.1, tubeRadius=0.005)
polyData = d.getPolyData()
self.setPolyData(polyData)