]> rtime.felk.cvut.cz Git - hubacji1/iamcar.git/commitdiff
Use T2 planner
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Fri, 15 Feb 2019 12:06:54 +0000 (13:06 +0100)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Mon, 4 Mar 2019 16:35:15 +0000 (17:35 +0100)
base/main.cc
base/rrtbase.cc

index a2cc7a2632c49d1f096612ce3edd96faade74fc7..3194eac42170f00e04888789c29497cbe81a3520 100644 (file)
@@ -38,11 +38,11 @@ along with I am car. If not, see <http://www.gnu.org/licenses/>.
 // 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
index 125fe8f0007ff39cf9d4954cf25d647fe579aa86..2331037b0c645285464c4b9b61536e438c5aba84 100644 (file)
@@ -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():