]> rtime.felk.cvut.cz Git - hubacji1/psp.git/commitdiff
Use reverse perpendicular in find entry procedure
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Mon, 3 Feb 2020 10:51:36 +0000 (11:51 +0100)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Tue, 4 Feb 2020 16:44:54 +0000 (17:44 +0100)
src/psp.cc

index 5b657cd638bc7344a670ed16acf68e6129e89b7a..f8b5950ade9ab744c452dcc9bb43288204e0b958 100644 (file)
@@ -273,10 +273,14 @@ std::vector<BicycleCar> PSPlanner::possible_goals(
 // find entry
 void PSPlanner::fe()
 {
-        if (this->ps().parallel())
+        this->c_ = 0;
+        if (this->ps().parallel()) {
                 return this->fe_parallel();
-        else
-                return this->fe_perpendicular();
+        } else {
+                this->guess_gc();
+                this->cc() = BicycleCar(this->gc());
+                return this->fer_perpendicular();
+        }
 }
 
 void PSPlanner::fe_parallel()