]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/commitdiff
Remove samples traversing in rebase method
authorJiri Hubacek <hubacji1@fel.cvut.cz>
Wed, 19 Sep 2018 13:50:23 +0000 (15:50 +0200)
committerJiri Hubacek <hubacji1@fel.cvut.cz>
Wed, 19 Sep 2018 13:50:53 +0000 (15:50 +0200)
Samples are not added to RRT so no need to traverse when rebasing.

base/rrtbase.cc

index 6607fdf7486c1bc56930782e42072803daea0ac5..9e74a5b22b73d3a4146afc400293e151cfae839f 100644 (file)
@@ -355,14 +355,6 @@ bool RRTBase::rebase(RRTNode *nr)
                 }
                 if (to_del < this->nodes_.size())
                         this->nodes_.erase(this->nodes_.begin() + to_del);
-                to_del = this->samples_.size();
-                #pragma omp parallel for reduction(min: to_del)
-                for (i = 0; i < this->samples_.size(); i++) {
-                        if (this->samples_[i] == tmp)
-                                to_del = i;
-                }
-                if (to_del < this->samples_.size())
-                        this->samples_.erase(this->nodes_.begin() + to_del);
                 iy = floor(tmp->y() / IYSTEP);
                 to_del = this->iy_[iy].size();
                 #pragma omp parallel  for reduction(min: to_del)