From: Jiri Vlasak Date: Tue, 10 Jan 2023 13:43:00 +0000 (+0100) Subject: Fix parallel parking with multiple b/f changes X-Git-Url: https://rtime.felk.cvut.cz/gitweb/hubacji1/iamcar2.git/commitdiff_plain/36da8cebaa9a20c2e934d2f1800686ae051b4882?ds=sidebyside Fix parallel parking with multiple b/f changes --- diff --git a/src/template-with-reset.cc b/src/template-with-reset.cc index d96f170..aa2fa6a 100644 --- a/src/template-with-reset.cc +++ b/src/template-with-reset.cc @@ -62,12 +62,8 @@ int main() } if (s.parallel()) { c.set_max_steer(); - if (!s.right()) { - c.st(c.st() * -1.0); - } - for (auto p: s.steer_in_slot(c)) { - c.next(); - ispath.push_back(c); + for (auto &n : s.drive_in_slot(c)) { + ispath.push_back(n); } } jvi["goal"][0] = pr.x();