From: Jiri Vlasak Date: Fri, 15 Feb 2019 12:06:54 +0000 (+0100) Subject: Use T2 planner X-Git-Tag: feature/e-rs-comparison~17 X-Git-Url: https://rtime.felk.cvut.cz/gitweb/hubacji1/iamcar.git/commitdiff_plain/4ce24484c5cd2b1d1f87cb49254b3cec31693c78 Use T2 planner --- diff --git a/base/main.cc b/base/main.cc index a2cc7a2..3194eac 100644 --- a/base/main.cc +++ b/base/main.cc @@ -38,11 +38,11 @@ along with I am car. If not, see . // choose //#define USE_INTERRUPT // or -//#define USE_TMAX +#define USE_TMAX // or //#define USE_LOADF // or -#define USE_PTHREAD +//#define USE_PTHREAD // enable //#define USE_SLOTPLANNER diff --git a/base/rrtbase.cc b/base/rrtbase.cc index 125fe8f..2331037 100644 --- a/base/rrtbase.cc +++ b/base/rrtbase.cc @@ -67,20 +67,20 @@ RRTBase::~RRTBase() // Fix heap-use-after-free error when T3 planner is used. If only T2 is used, // please uncommend the following code: // -// for (auto n: this->nodes_) -// if (n != this->root_) -// delete n; -// for (auto n: this->dnodes_) -// if (n != this->root_ && n != this->goal_) -// delete n; -// for (auto s: this->samples_) -// if (s != this->goal_) -// delete s; -// for (auto edges: this->rlog_) -// for (auto e: edges) -// delete e; -// delete this->root_; -// delete this->goal_; + for (auto n: this->nodes_) + if (n != this->root_) + delete n; + for (auto n: this->dnodes_) + if (n != this->root_ && n != this->goal_) + delete n; + for (auto s: this->samples_) + if (s != this->goal_) + delete s; + for (auto edges: this->rlog_) + for (auto e: edges) + delete e; + delete this->root_; + delete this->goal_; } RRTBase::RRTBase():