alexliniger / MPCC

Model Predictive Contouring Controller (MPCC) for Autonomous Racing
Apache License 2.0
1.29k stars 364 forks source link

Work of plotBox method of Plotting class #38

Closed KarasevPavel closed 4 years ago

KarasevPavel commented 4 years ago

Hello, Alex!

Yours plotBox method in class Plotting does not work properly, because you need to divide body_xl, body_xw, body_yl and body_yw by two before appending and subtracting them from X and Y coordinates of the car.

Regards, Pavel.

alexliniger commented 4 years ago

I just define car_l and car_w as half the car length and width .

https://github.com/alexliniger/MPCC/blob/b2a2999d5541934b4eec4b30103c05681172c998/C%2B%2B/Params/model.json#L22

I went with this definition because nearly all the time you need the size of the car, you only need half the width and half the length. Unfortunately it is not possible to add comments to the json file. Otherwise i would have added a comment.

KarasevPavel commented 4 years ago

Okay, Thank you!

Regards, Pavel.