From: Jiri Vlasak Date: Sat, 20 Nov 2021 00:32:55 +0000 (+0100) Subject: Change compare isp to compare with vorobieva X-Git-Tag: v0.8.0~13^2~1 X-Git-Url: https://rtime.felk.cvut.cz/gitweb/hubacji1/bcar.git/commitdiff_plain/da50c06daf17cf4dfdc7635f9d2fad08d8901eb3 Change compare isp to compare with vorobieva --- diff --git a/src/compare_isp.cc b/src/compare_isp.cc index bad7360..f33bb84 100644 --- a/src/compare_isp.cc +++ b/src/compare_isp.cc @@ -13,15 +13,15 @@ #include #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;