8 Take a graph object containing a list of configurations q and a dictionnary of graph
9 relations edge. Display the configurations by the correspond placement of the robot
10 end effector. Display the graph relation by vertices connecting the robot end
14 gui = robot.viewer.gui
17 gui.deleteNode(
"world/prm",
True)
21 "world/prm", [1.0, 0.2, 0.2, 0.8], 1e-2, 1e-2, [1.0, 0.2, 0.2, 0.8]
25 gui.addNodeToRoadmap(
"world/prm", se3ToXYZQUATtuple(robot.position(q, 6)))
27 for parent, children
in graph.children.items():
28 for child
in children:
30 q1, q2 = graph.q[parent], graph.q[child]
31 p1 = robot.position(q1, 6).translation.ravel().tolist()[0]
32 p2 = robot.position(q2, 6).translation.ravel().tolist()[0]
33 gui.addEdgeToRoadmap(
"world/prm", p1, p2)
40 Display a path, i.e. a sequence of robot configuration, by moving the robot