]> rtime.felk.cvut.cz Git - hubacji1/bcar.git/commitdiff
Change compare isp to compare with vorobieva
authorJiri Vlasak <jiri.vlasak.2@cvut.cz>
Sat, 20 Nov 2021 00:32:55 +0000 (01:32 +0100)
committerJiri Vlasak <jiri.vlasak.2@cvut.cz>
Sun, 21 Nov 2021 21:52:27 +0000 (22:52 +0100)
src/compare_isp.cc

index bad73603f16e1e6542303e41790b9d7b4c5a1588..f33bb846f7c79546665f562d7cdabb7ab55ccfdf 100644 (file)
 #include <vector>
 #include "pslot.hh"
 
-#define CAR_CURB_TO_CURB 10.820
-#define CAR_WIDTH 1.625
-#define CAR_WHEELBASE 2.450
-#define CAR_DISTANCE_FROM_REAR_AXLE_TO_FRONT 3.105
-#define CAR_LENGTH 3.760
+#define CAR_CURB_TO_CURB 11.031078891255458
+#define CAR_WIDTH 1.771
+#define CAR_WHEELBASE 2.588
+#define CAR_DISTANCE_FROM_REAR_AXLE_TO_FRONT 3.427
+#define CAR_LENGTH 4.084
 
-#define SLOT_MAX_WIDTH 2.2
+#define SLOT_WIDTH 2.0
+#define SLOT_MAX_LENGTH 5.8
 #define SLOT_STEP_LENGTH 0.01
-#define SLOT_STEP_WIDTH 0.01
 
 #define PARKING_SPEED -0.001
 #define MAX_CUSP 10
@@ -43,9 +43,9 @@ int main()
        double zh = 0.0;
        double len = c.len() + SLOT_STEP_LENGTH;
 
-       while (true) {
+       while (len < SLOT_MAX_LENGTH) {
                int cusp[2] = {-1, -1};
-               bcar::ParkingSlot s(zp, zh, SLOT_MAX_WIDTH, len);
+               bcar::ParkingSlot s(zp, zh, SLOT_WIDTH, len);
                // Several reversed trials
                c.sp(PARKING_SPEED * -1.0);
                c.set_max_steer();
@@ -73,10 +73,8 @@ int main()
                        cusp[1] = s.get_max_cusp();
                }
                using namespace std;
-               cout << len << " " << cusp[0] << " " << cusp[1] << endl;
-               if (cusp[0] == 0 && cusp[1] == 0) {
-                       break;
-               }
+               cout << SLOT_WIDTH << " " << len << " ";
+               cout << cusp[0] << " " << cusp[1] << endl;
                len += SLOT_STEP_LENGTH;
        }
        return 0;