39 #include <ompl/multilevel/datastructures/graphsampler/RandomEdge.h>
41 ompl::multilevel::BundleSpaceGraphSamplerRandomEdge::BundleSpaceGraphSamplerRandomEdge(
42 BundleSpaceGraph *bundleSpaceGraph)
43 : BaseT(bundleSpaceGraph)
47 void ompl::multilevel::BundleSpaceGraphSamplerRandomEdge::sampleImplementation(base::State *xRandom)
51 if (num_edges(graph) == 0)
53 OMPL_WARN(
"Base graph contains no edges.");
57 BundleSpaceGraph::Edge e = boost::random_edge(graph, rng_boost);
59 double s = rng_.uniform01();
61 const Vertex v1 = boost::source(e, graph);
62 const Vertex v2 = boost::target(e, graph);
63 const base::State *from = graph[v1]->state;
64 const base::State *to = graph[v2]->state;
66 bundleSpaceGraph_->getBundle()->getStateSpace()->interpolate(from, to, s, xRandom);