p.p_goal_.tstart();
pthread_create(&rt, NULL, &next_run, (void *) &ra);
pthread_create(>, NULL, &next_run, (void *) &ga);
- while (!gf && p.elapsed() < TMAX) {
+ while (!gf && p.elapsed() < TMAX &&
+ p.p_root_.nodes().size() < NOFNODES &&
+ p.p_goal_.nodes().size() < NOFNODES) {
// overlap trees
for (int i = 0; i < IXSIZE; i++) {
for (int j = 0; j < IYSIZE; j++) {
root_(new RRTNode()),
goal_(new RRTNode())
{
- this->nodes_.reserve(20000);
+ this->nodes_.reserve(NOFNODES);
this->nodes_.push_back(this->root_);
this->add_iy(this->root_);
this->add_ixy(this->root_);
root_(init),
goal_(goal)
{
- this->nodes_.reserve(20000);
+ this->nodes_.reserve(NOFNODES);
this->nodes_.push_back(init);
this->add_iy(init);
this->add_ixy(init);