if (tmps > p.VMAX) p.VMAX = tmps;
}
}
+ p.defaultSamplingInfo();
p.link_obstacles(&co, &so);
p.ocost(p.root());
p.ocost(p.goal());
}
// RRT Framework
+void RRTBase::defaultSamplingInfo()
+{
+ float hcenter = (this->HMAX - this->HMIN) / 2 + this->HMIN;
+ float hrange = (this->HMAX - this->HMIN) / 2;
+ float vcenter = (this->VMAX - this->VMIN) / 2 + this->VMIN;
+ float vrange = (this->VMAX - this->VMIN) / 2;
+ this->ndx_ = std::normal_distribution<float>(hcenter, hrange);
+ this->ndy_ = std::normal_distribution<float>(vcenter, vrange);
+ this->ndh_ = std::normal_distribution<float>(0, 2 * M_PI);
+}
+
void RRTBase::setSamplingInfo(SamplingInfo si)
{
this->ndx_ = std::normal_distribution<float>(si.x0, si.x);
int YI(RRTNode *n);
// RRT Framework
+ void defaultSamplingInfo();
void setSamplingInfo(SamplingInfo si);
RRTNode *sample();
float cost(RRTNode *init, RRTNode *goal);