#include "wvtest.h"
#include "psp.h"
-
-WVTEST_MAIN("parking slot planner basic test")
-{
- PSPlanner psp;
- psp.ps().border(3, 3, 5, 3, 5, 8, 3, 8);
- psp.gc().x(4);
- psp.gc().y(4);
- psp.gc().h(M_PI / 2);
- psp.gc().mtr(10);
- psp.gc().wb(2);
- psp.gc().w(1);
- psp.gc().l(3);
- psp.gc().he(1.5);
- psp.gc().df(2 + 0.5);
- psp.gc().dr(0.5);
-
- // init orientation
- WVPASS(!psp.collide());
- WVPASSEQ_DOUBLE(psp.ps().heading(), psp.gc().h(), 0.00001);
-
- // collide
- PSPlanner tpsp;
- tpsp.ps().border(2, 3, 4, 3, 4, 8, 2, 8);
- tpsp.gc() = BicycleCar(psp.gc());
- tpsp.cc() = BicycleCar(tpsp.gc());
- WVPASS(tpsp.collide());
-}