当前位置: 首页>>代码示例>>Python>>正文


Python Viewer.displayPathMap方法代码示例

本文整理汇总了Python中hpp.gepetto.Viewer.displayPathMap方法的典型用法代码示例。如果您正苦于以下问题:Python Viewer.displayPathMap方法的具体用法?Python Viewer.displayPathMap怎么用?Python Viewer.displayPathMap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在hpp.gepetto.Viewer的用法示例。


在下文中一共展示了Viewer.displayPathMap方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: robot

# 需要导入模块: from hpp.gepetto import Viewer [as 别名]
# 或者: from hpp.gepetto.Viewer import displayPathMap [as 别名]
#v (q_goal)

v.loadObstacleModel ("iai_maps", "kitchen_area", "kitchen")
ps.setInitialConfig (q_init)
ps.addGoalConfig (q_goal)
ps.addPathOptimizer ("RandomShortcut")

ps.solve ()

# display roadmap for the base of the robot (no specified joint)
# displayRoadmap(name ,sizeNode)
v.displayRoadmap("rmB",0.02)
# display the path found in the roadmap :
# displayPathMap(name,pathID,sizeNode) or : 
# displayPathMap(name,pathID,sizeNode,sizeAxis,colorNode,colorEdge,JointName)
v.displayPathMap("rmPath",0,0.03)
# hide previous roadmap
v.client.gui.removeFromGroup("rmB",v.sceneName)
v.client.gui.removeFromGroup("rmPath",v.sceneName)


# display roadmap for the tools, the full prototype is :
# displayRoadmap(name,sizeNode,sizeAxis,colorNode,colorEdge,JointName)
# The joint defined by "jointName" (see robot.getAllJointNames()) is used to compute the position of the node of the roadmap
# You can use the colors defined in viewer.color or give an array of 4 float which define a normalized RGBA color 
v.displayRoadmap("rmR",0.02,1,v.color.blue,v.color.lightBlue,'r_gripper_tool_joint')
v.displayRoadmap("rmL",0.02,1,v.color.green,v.color.lightGreen,'l_gripper_tool_joint')


# hide roadmap in the scene
#v.client.gui.removeFromGroup("rmL",v.sceneName)
开发者ID:airobert,项目名称:hpp_tutorial,代码行数:33,代码来源:tutorial_1_roadmap.py


注:本文中的hpp.gepetto.Viewer.displayPathMap方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。