From: Jiri Vlasak Date: Fri, 19 Mar 2021 09:58:59 +0000 (+0100) Subject: Add finishit variable to rrts X-Git-Tag: v0.6.0~2^2~7 X-Git-Url: http://rtime.felk.cvut.cz/gitweb/hubacji1/rrts.git/commitdiff_plain/bf142342ed62e44003b73164e8f73d5c3c9a411c Add finishit variable to rrts --- diff --git a/api/rrts.h b/api/rrts.h index 974a3fd..612c1f5 100644 --- a/api/rrts.h +++ b/api/rrts.h @@ -169,6 +169,7 @@ class RRTS { */ void set_sample_uniform_circle(); protected: + bool finishit = false; double path_cost_before_opt_ = 9999; BicycleCar bc; diff --git a/src/rrts.cc b/src/rrts.cc index f296609..4f65b5f 100644 --- a/src/rrts.cc +++ b/src/rrts.cc @@ -65,6 +65,7 @@ bool RRTS::should_finish() // decide finish conditions (maybe comment some lines) //if (this->icnt_ > 999) return true; if (this->scnt_ > 2) return true; + if (this->finishit) return true; //if (this->gf()) return true; // but continue by default return false;