#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
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();
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;