From: Jiri Vlasak Date: Thu, 31 Mar 2022 10:19:21 +0000 (+0200) Subject: Add alternative paths X-Git-Url: http://rtime.felk.cvut.cz/gitweb/hubacji1/bcar.git/commitdiff_plain/f20c976b04e3fb888c87e8dd1c08a0386d190085 Add alternative paths --- diff --git a/src/gen_for_gnuplot.cc b/src/gen_for_gnuplot.cc index f77d476..861a0da 100644 --- a/src/gen_for_gnuplot.cc +++ b/src/gen_for_gnuplot.cc @@ -156,6 +156,7 @@ main(int argc, char **argv) } }A +#if 1 /* path1 */ if (what_plot > 55) { c.st(0.0); for (int i = 0; i < 10; i++) { @@ -216,6 +217,170 @@ main(int argc, char **argv) c.next(); } }A +#endif +#if 0 /* path2 */ + if (what_plot > 58) { + c.set_max_steer(); + c.st(c.st() * -1.0); + c.sp(0.1); + for (int i = 0; i < 10; i++) { + c.next(); + } + }A + + if (what_plot > 62) { + c.set_max_steer(); + c.st(c.st() * -1.0); + c.sp(0.1); + for (int i = 0; i < 10; i++) { + c.next(); + } + }A + + if (what_plot > 66) { + c.set_max_steer(); + c.st(c.st() * -1.0); + c.sp(0.1); + for (int i = 0; i < 10; i++) { + c.next(); + } + }A + + if (what_plot > 70) { + c.st(0.0); + c.sp(-0.1); + for (int i = 0; i < 20; i++) { + c.next(); + } + }A + + if (what_plot > 72) { + c.st(0.0); + c.sp(-0.1); + for (int i = 0; i < 20; i++) { + c.next(); + } + }A + + if (what_plot > 74) { + c.set_max_steer(); + c.sp(-0.1); + for (int i = 0; i < 10; i++) { + c.next(); + } + }A + + if (what_plot > 76) { + c.st(0.0); + c.sp(-0.1); + for (int i = 0; i < 20; i++) { + c.next(); + } + }A + + if (what_plot > 78) { + c.set_max_steer(); + c.st(c.st() * -1.0); + c.sp(-0.1); + for (int i = 0; i < 10; i++) { + c.next(); + } + }A + + if (what_plot > 80) { // up to 83 (init) + int how_much = what_plot - 80; + c.st(0.0); + c.sp(-0.1); + for (int i = 0; i < 20 * how_much; i++) { + c.next(); + } + }A +#endif +#if 0 /* path3 */ + if (what_plot > 56) { + c.st(0.0); + c.sp(0.1); + for (int i = 0; i < 10; i++) { + c.next(); + } + }A + + if (what_plot > 58) { + c.set_max_steer(); + c.st(c.st() * -1.0); + c.sp(0.1); + for (int i = 0; i < 10; i++) { + c.next(); + } + }A + + if (what_plot > 62) { + c.set_max_steer(); + c.st(c.st() * -1.0); + c.sp(0.1); + for (int i = 0; i < 10; i++) { + c.next(); + } + }A + + if (what_plot > 66) { + c.set_max_steer(); + c.sp(-0.1); + for (int i = 0; i < 5; i++) { + c.next(); + } + }A + + if (what_plot > 68) { + c.set_max_steer(); + c.sp(-0.1); + for (int i = 0; i < 10; i++) { + c.next(); + } + }A + + if (what_plot > 70) { + c.st(0.0); + c.sp(-0.1); + for (int i = 0; i < 20; i++) { + c.next(); + } + }A + + if (what_plot > 72) { + c.st(0.0); + c.sp(-0.1); + for (int i = 0; i < 20; i++) { + c.next(); + } + }A + + if (what_plot > 73) { + c.st(0.0); + c.sp(-0.1); + for (int i = 0; i < 20; i++) { + c.next(); + } + }A + + if (what_plot > 74) { + c.set_max_steer(); + c.st(c.st() * -1.0); + c.sp(-0.1); + for (int i = 0; i < 5; i++) { + c.next(); + } + }A + + if (what_plot > 80) { // up to 83 (init) + int how_much = what_plot - 80; + c.st(0.0); + c.sp(-0.1); + for (int i = 0; i < 20 * how_much; i++) { + c.next(); + } + }A +#endif P(CAR) LC = c;