collide_steered_from(RRTNode &f);
std::tuple<bool, unsigned int, unsigned int>
collide_two_nodes(RRTNode &f, RRTNode &t);
- double cost(RRTNode &f, RRTNode &t);
double cost_build(RRTNode &f, RRTNode &t);
double cost_search(RRTNode &f, RRTNode &t);
void sample();
return this->collide(p);
}
-double RRTS::cost(RRTNode &f, RRTNode &t)
+double RRTS::cost_build(RRTNode &f, RRTNode &t)
+{
+ double cost = 0;
+ cost = sqrt(pow(t.y() - f.y(), 2) + pow(t.x() - f.x(), 2));
+ return cost;
+}
+
+double RRTS::cost_search(RRTNode &f, RRTNode &t)
{
double cost = 0;
cost = sqrt(pow(t.y() - f.y(), 2) + pow(t.x() - f.x(), 2));