normal, 1 - uniform, 2 - uniform circle)
*/
class RRTS {
- private:
+ protected:
unsigned int icnt_ = 0;
std::chrono::high_resolution_clock::time_point tstart_;
double scnt_ = 0;
/*! \brief Set uniform circle distribution for sampling.
*/
void set_sample_uniform_circle();
- protected:
+ RRTNode* use_nn; // Used for RRTExt12.
std::vector<RRTNode> tmp_steered_;
bool finishit = false;
double path_cost_before_opt_ = 9999;
x = this->nodes().front().x();
y = this->nodes().front().y();
h = this->nodes().front().h();
+ this->use_nn = &this->nodes().front();
} else {
this->udi1_ = std::uniform_int_distribution<unsigned int>(
0,
x = n1->x();
y = n1->y();
h = n1->h();
+ this->use_nn = this->steered1_[ind1];
} else if (
this->steered1_.size() == 0
) {
x = n2->x();
y = n2->y();
h = n2->h();
+ this->use_nn = this->steered2_[ind2];
} else {
auto n1 = this->steered1_[ind1];
auto n2 = this->steered2_[ind2];
x = n1->x();
y = n1->y();
h = n1->h();
+ this->use_nn = this->steered1_[ind1];
} else {
x = n2->x();
y = n2->y();
h = n2->h();
+ this->use_nn = this->steered2_[ind2];
}
}
}