forked from commaai/openpilot
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make LaneSpeed quicker and more efficient (commaai#124)
* add debugging statements * fix * run all * run it manually * lower priority and affinity * let's see what cpu usage this gets us * change to 1 * no realtime * ls_state * print len * so more tracks get grouped * debug * debug * debug * debug * debug * debug * debug * debug * see if this is faster * better * so this is slower? * woah, np.mean can be as low as 400 Hz while sum()/len() is anywhere from 2000 to 5000 hz! wth numpy * debugging * better * better * don't be random everytime * remove * debug * debug * debug * is this any better? * that was bad * see which is quicker * okay, so this is the quickest * debug which poly val function is faster * debug which poly val function is faster * debug which poly val function is faster * debug which poly val function is faster * debug which poly val function is faster * test out faster function * remove * print average * cleaner * test original function * test 1st new function * test 2nd new function * only measure polyval * run for 60 sec then quit * don't run updated * 2nd function test * 3rd function test * now only time grouping loop * now only time grouping loop * why not 60 * calc only once instead of up to 2*3 times * move here * slightly faster here * get a baseline of the whole function now * don't use a np array for lane bounds, no need. might be faster * add hz * woah, removing numpy from bounds and offsetting manually make the rate go from 766.2768 to 1299.8735 hz * use if checks instead of a loop test * comment old loop * reverse the if check so that we do speed check first * move static track object logic to Lane class to remove lines of code in group_tracks. let's see if it's faster * test loop now * okay, loop is still slower at 1200 Hz vs 1500 hz with this method (if checks and logic in Lane class for static tracks) * previous commit was 1562 Hz * previous commit was 1599 Hz, this commit *should* be faster * yup, this commit was 1635 Hz. it's not pretty, but it's faster * debug * one should be oncoming * one more * one more * one more * one more * one more * one more * this is good * get a baseline * offset y_rel instead of bounds * offset y_rel instead of bounds * fix * calculate on demand instead of all at once test * old faster method again * move eval_poly to the same list comp, last commit was 1923 hz * dang, last commit was 2072 Hz! * now see if moving it into the main loop will be any faster * nah, that was 2032.8366 Hz vs 2072 * okay now it's slower again?? what is this then? last was 2048 down from 2079 * let's just use this, it's faster marginally for some reason * so this should be even faster, right? previous was around 2033 hz * nope, much slower at 1819 hz. this is good * get baseline without as many print statements * last commit was 1958 hz, just want to test this code one more time * last commit was 1931 hz, so; slower. test loop one last time with new offset_y_rel code * loop was still slower at 1849 hz, so this looks to be the fastest! * clean up and print lanes to verify the logic hasn't changed * remove * clean up * clean up * clean up and use numpy_fast for interpolating * use numpy fast in DynamicCameraOffset and DynamicFollow * add comment * higher corolla gas up to 40 mph * comment * revert manager changes * use LQR for corolla
- Loading branch information
Showing
5 changed files
with
66 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters