當前位置: 首頁>>代碼示例>>Python>>正文


Python Viewer.solveAndDisplay方法代碼示例

本文整理匯總了Python中hpp.gepetto.Viewer.solveAndDisplay方法的典型用法代碼示例。如果您正苦於以下問題:Python Viewer.solveAndDisplay方法的具體用法?Python Viewer.solveAndDisplay怎麽用?Python Viewer.solveAndDisplay使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在hpp.gepetto.Viewer的用法示例。


在下文中一共展示了Viewer.solveAndDisplay方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: print

# 需要導入模塊: from hpp.gepetto import Viewer [as 別名]
# 或者: from hpp.gepetto.Viewer import solveAndDisplay [as 別名]
q_goal = q_init [::]
q_goal [0:3] = [5,1, 1]
#v (q_goal)

print("chargement map")
v.loadObstacleModel ("iai_maps", "tunnel", "tunnel")



ps.selectPathPlanner("rrtPerso")
print("Debut motion planning")

ps.setInitialConfig (q_init)
ps.addGoalConfig (q_goal)

v.solveAndDisplay(white,0.02,1,yellow)


ps.solve ()


v.displayRoadmap(white,0.02,1,yellow)


v.client.gui.addXYZaxis("test0",white,0.05,1)
v.client.gui.addToGroup("test0",v.sceneName)


pp = PathPlayer (robot.client, v)
#print("affichage solution")
#pp (0)
開發者ID:pFernbach,項目名稱:hpp_perso,代碼行數:33,代碼來源:xyzAxis.py

示例2: v

# 需要導入模塊: from hpp.gepetto import Viewer [as 別名]
# 或者: from hpp.gepetto.Viewer import solveAndDisplay [as 別名]
q_init[0:3] = [6, 7, 0.5]	#z=0.4 pour sphere
#6 7 pour en dehors de la zone
v (q_init)
q_goal = q_init [::]
q_goal [0:3] = [-2.5, -3.5, 0.5]
#v (q_goal)

print("chargement map")
v.loadObstacleModel ("iai_maps", "room", "room")

ps.setInitialConfig (q_init)
ps.addGoalConfig (q_goal)
ps.selectPathPlanner("rrtPerso")

v.solveAndDisplay(white,0.02,1,brown)

ps.solve ()


v.displayRoadmap(white,0.02,1,brown)

pp = PathPlayer (robot.client, v)
print("affichage solution")
pp (0)
print("affichage solution optimise")
pp (1)



開發者ID:pFernbach,項目名稱:hpp_perso,代碼行數:28,代碼來源:testRoadmap.py


注:本文中的hpp.gepetto.Viewer.solveAndDisplay方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。