Hi all,
I want to make a few notes about my Java winning code (winning summer & winter series 2017) :-)
Regards,
Thomas
lambda.p.racing
BUG:
After a few races I had to drive in FLIPPED mode in race 3 again. And it didn't work at all.
Watch a few seconds of https://youtu.be/_eLOVaq0tTI?t=5m40s
I am 5th!
To fix this I changed one line of code. After a crash I now set the ImageMode to Globals.getLastImageMode(), the image mode before
the crash, the same way the python standard code does. The code before the change was setImageMode(FOLLOW_TRACK);
The hope was that the FLIP check will then change it to FLIPPED if necessary. Normally it will work, but not if there is too fast another crash.
In the final race this fix causes another problem and is the reason that I didn't finish any laps in the last 3 minutes.
Watch a few seconds of https://youtu.be/8P2mM5XHjpM?t=25m17s.
The problem is quite simple. There is code changing the imageMode without changing the lastImageMode. I haven't used lastImageMode before race 3 so it was not
updated with newer code. So the last 3 minutes I drove permanently in CRASHED mode.
There are 3 implementations of setImageMode: in Globals, ImageProcessor and ControlLoop.
The method in Globals does not call setLastImageMode and this method is used in the ImageProcessor, ups!
Of course it is not good to implement this 3 times, there should only be the corrected version in Globals.
I gave yesterday the talk I mentioned in the above post at my company.
Just need to translate the slides now to English.
https://www.slideshare.net/dihedral3/formulapi-programming-challenge-aut...
Add new comment