6 '''Take a graph object containing a list of configurations q and 7 a dictionnary of graph relations edge. Display the configurations by the correspond 8 placement of the robot end effector. Display the graph relation by vertices connecting 9 the robot end effector positions. 12 gui = robot.viewer.gui
15 gui.deleteNode(
'world/prm',
True)
18 gui.createRoadmap(
'world/prm', [1., .2, .2, .8], 1e-2, 1e-2, [1., .2, .2, .8])
23 for parent, children
in graph.children.items():
24 for child
in children:
26 q1, q2 = graph.q[parent], graph.q[child]
27 p1 = robot.position(q1, 6).translation.ravel().tolist()[0]
28 p2 = robot.position(q2, 6).translation.ravel().tolist()[0]
29 gui.addEdgeToRoadmap(
'world/prm', p1, p2)
36 Display a path, i.e. a sequence of robot configuration, by moving the robot def display_prm(robot, graph)
def display_path(robot, path, sleeptime=1e-2)