]> rtime.felk.cvut.cz Git - hubacji1/bcar.git/commitdiff
Change generate plot for parking slot
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Wed, 19 Jan 2022 22:48:12 +0000 (23:48 +0100)
committerJiri Vlasak <hubacji1@fel.cvut.cz>
Wed, 19 Jan 2022 22:48:12 +0000 (23:48 +0100)
Let find entry poisitions to right parallel parking slot. Then, show
arcs that represent the path of frame's (i) right front point, (ii)
right front mirror point, (iii) right rear axle point, and (iv) right
rear point.

src/gen_for_gnuplot.cc

index a2b02e41f05333afde98471f5168a19d726983fc..8b6a5cb01305e26f93b4714cbf9645ea7d725bea 100644 (file)
@@ -10,7 +10,7 @@
 #include "pslot.hh"
 
 #define SP 0.5
-#define STEPS 10
+#define STEPS 60
 
 #define V v
 #define INIT_V vector<M> V;
@@ -36,8 +36,6 @@ public:
        M(std::string fn) : fn(fn)
        {
                this->f.open(this->fn);
-               this->c.sp(SP);
-               this->c.set_max_steer();
                this->o.ALL = false;
        }
        M(M const& m) : fn(m.fn), c(m.c), o(m.o)
@@ -110,13 +108,19 @@ main()
        string sn("slot");
        gpl_slot(s, sn);
 
+       s.fe(bcar::BicycleCar());
+
        INIT_V
-       P(LF_POINT)
-       P(LFM_POINT)
        P(RF_POINT)
        P(RFM_POINT)
-       P(CRA_POINT)
+       P(RRA_POINT)
+       P(RR_POINT)
 
+       for (auto& m: V) {
+               m.c = s._entries.front().front();
+               m.c.sp(m.c.sp() * -1.0);
+               m.c.st(m.c.st() * -1.0);
+       }
        for (unsigned int i = 0; i < STEPS; i++) {
                for (auto& m: V) {
                        m.gpl();