]> rtime.felk.cvut.cz Git - hubacji1/bcar.git/commitdiff
Add assertion about parking speed for fe
authorJiri Vlasak <hubacji1@fel.cvut.cz>
Sat, 14 Aug 2021 18:26:38 +0000 (20:26 +0200)
committerJiri Vlasak <jiri.vlasak.2@cvut.cz>
Mon, 1 Nov 2021 12:42:53 +0000 (13:42 +0100)
src/pslot.cc

index 20509e1b378552129744398b9d9c4e56ef9628be..dc09581e583f8cdfde5f7eebedd6b082491c0033 100644 (file)
@@ -351,6 +351,7 @@ ParkingSlot::fe(BicycleCar c)
        c.x(this->lrx() + clen * cos(c.h()) + cw * cos(c.h() + M_PI / 2.0));
        c.y(this->lry() + clen * sin(c.h()) + cw * sin(c.h() + M_PI / 2.0));
        c.set_max_steer();
+       assert(this->parking_speed_ < 0.0);
        c.sp(this->parking_speed_);
        auto const rc = c.rf();
        this->curb_.intersects_with(rc, c.len());