#define INIT_V vector<M> V;
#define P(W) V.push_back(M(#W)); V.back().o.W = true;
#define LC V.back().c
+#define A {}// P(CAR_POINT) LC = c;
class M {
public:
swap(*this, m);
}
};
-unsigned int M::cntr = 0;
+unsigned int M::cntr = 10;
void
gpl_slot(bcar::ParkingSlot& s, std::string fn = "")
using namespace std;
if (argc != 2) {
cerr << "Specify `what_plot` number." << endl;
+ // what_plot values 50 - 72 correspond to OSP
exit(1);
}
cout << fixed;
int what_plot = atoi(argv[1]);
+ INIT_V
+
// this is ep
int len = s._ispaths.size();
auto c = s._ispaths[len / 2].front();
- if (what_plot > 2) {
+ A
+
+ if (what_plot > 52) {
c.set_max_steer();
c.sp(0.1);
for (int i = 0; i < 5; i++) {
c.next();
}
- }
+ }A
- if (what_plot > 4) { // can go anywhere forward
+ if (what_plot > 54) { // can go anywhere forward
c.set_max_steer();
c.sp(0.1);
while (!s.lf().inside_of(c.ccr(), c.iradi())) {
c.next();
}
- }
+ }A
- if (what_plot > 5) {
+ if (what_plot > 55) {
c.st(0.0);
for (int i = 0; i < 10; i++) {
c.next();
}
- }
+ }A
- if (what_plot > 6) {
+ if (what_plot > 56) {
c.st(0.0);
for (int i = 0; i < 10; i++) {
c.next();
}
- }
+ }A
- if (what_plot > 7) {
+ if (what_plot > 57) {
c.st(0.0);
for (int i = 0; i < 10; i++) {
c.next();
}
- }
+ }A
- if (what_plot > 8) { // few steps towards -- most up
+ if (what_plot > 58) { // few steps towards -- most up
c.st(0.0);
for (int i = 0; i < 10; i++) {
c.next();
}
- }
+ }A
- if (what_plot > 10) {
+ if (what_plot > 60) {
c.set_max_steer();
c.sp(-0.1);
for (int i = 0; i < 10; i++) {
c.next();
}
- }
+ }A
- if (what_plot > 11) {
+ if (what_plot > 61) {
c.set_max_steer();
c.sp(-0.1);
for (int i = 0; i < 10; i++) {
c.next();
}
- }
+ }A
- if (what_plot > 12) { // parallel to ps
+ if (what_plot > 62) { // parallel to ps
c.set_max_steer();
c.sp(-0.1);
for (int i = 0; i < 10; i++) {
c.next();
}
- }
+ }A
- if (what_plot > 16) { // what_plot should be up to 22 (init)
- int how_much = what_plot - 16;
+ if (what_plot > 66) { // what_plot should be up to 22 (init)
+ int how_much = what_plot - 16 - 50;
c.st(0.0);
c.sp(-0.1);
for (int i = 0; i < 20 * how_much; i++) {
c.next();
}
- }
+ }A
- INIT_V
P(CAR)
LC = c;
+
for (auto& m: V) {
m.gpl();
}