本文整理匯總了Python中hpp.gepetto.Viewer.computeObjectPosition方法的典型用法代碼示例。如果您正苦於以下問題:Python Viewer.computeObjectPosition方法的具體用法?Python Viewer.computeObjectPosition怎麽用?Python Viewer.computeObjectPosition使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類hpp.gepetto.Viewer
的用法示例。
在下文中一共展示了Viewer.computeObjectPosition方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: r
# 需要導入模塊: from hpp.gepetto import Viewer [as 別名]
# 或者: from hpp.gepetto.Viewer import computeObjectPosition [as 別名]
q_init [0:3] = [-2, 0, 0.63]; rbprmBuilder.setCurrentConfig (q_init); r (q_init)
q_goal = q_init [::]
q_goal [0:3] = [3, 0, 0.63]; r (q_goal)
ps.setInitialConfig (q_init)
ps.addGoalConfig (q_goal)
from hpp.corbaserver.affordance.affordance import AffordanceTool
afftool = AffordanceTool ()
afftool.loadObstacleModel (packageName, "darpa", "planning", r)
afftool.loadObstacleModel ("hpp-ompl-benchmark", "cubicles_robot", "robo", r)
afftool.visualiseAffordances('Support', r, [0.25, 0.5, 0.5])
afftool.deleteAffordances(r,'robo/base_link_0')
ps.moveObstacle('robo/base_link_0', [0,-0.75,0, 0.5,0.5,0.5,0.5])
r.computeObjectPosition()
afftool.analyseObject('robo/base_link_0')
afftool.visualiseAffordances('Support', r, [0.75, 0.75, 0.1], 'robo/base_link_0')
# Choosing RBPRM shooter and path validation methods.
# Note that the standard RRT algorithm is used.
ps.client.problem.selectConFigurationShooter("RbprmShooter")
ps.client.problem.selectPathValidation("RbprmPathValidation",0.05)
# Solve the problem
t = ps.solve ()
# Playing the computed path
from hpp.gepetto import PathPlayer
pp = PathPlayer (rbprmBuilder.client.basic, r)
pp (0)