-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
45% performance improvement in MPPI #4174
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, I did not find any glaring issues, but I found some small things I thought were worth pointing out. Thanks!
nav2_mppi_controller/include/nav2_mppi_controller/critics/cost_critic.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
Hi Steve, Do you know about this "pitfall"? https://xtensor.readthedocs.io/en/latest/pitfall.html#random-numbers-not-consistent Is there a speed advantage if the xt::random::randn operations in NoiseGenerator::generateNoisedControls are wrapped in xt::eval? regards |
That's a good question. I can look into that. Edit: That is not relevent since we set to However that attribute actually calls something interesting into question. Do we need all 3 noise distributions if we lazy evaluate them? if calling multiple times isn't the same value, we could use a lazy expression to create 1 noise sample and then use it for all 3 axes. If we hard evaluate it, then we can't do that since the same noises would be used, but if we used the lazy evaulation, that could make an impact. That doesn't actually speed things up for us unfortunately since we're still re-evaluating 3x56x2000 samples no matter how we cut it in memory (and with the added problem of no longer having control over the Overall, I still don't see a way to optimize this further unforunately - which is of annoyance to me as well. I feel like this shouldn't be as heavy as it is. |
@SteveMacenski, your PR has failed to build. Please check CI outputs and resolve issues. |
@SteveMacenski, your PR has failed to build. Please check CI outputs and resolve issues. |
* 18.5% performance improvement in MPPI * adding in path angle update * path align improvements * adding views * more updates with some TODOs * massive improvements to cost critic * remove TODOs * removing some jitter * updates * use fabs * 1ms saved baby! * completed optimizations * remove TODO * linting * fixing test failure * indexing fix * fix bug * make MPPI default for Jazzy * Adding higher velocity limits --------- Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> (cherry picked from commit 5a8cbd3)
* 18.5% performance improvement in MPPI * adding in path angle update * path align improvements * adding views * more updates with some TODOs * massive improvements to cost critic * remove TODOs * removing some jitter * updates * use fabs * 1ms saved baby! * completed optimizations * remove TODO * linting * fixing test failure * indexing fix * fix bug * make MPPI default for Jazzy * Adding higher velocity limits --------- Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
* 18.5% performance improvement in MPPI * adding in path angle update * path align improvements * adding views * more updates with some TODOs * massive improvements to cost critic * remove TODOs * removing some jitter * updates * use fabs * 1ms saved baby! * completed optimizations * remove TODO * linting * fixing test failure * indexing fix * fix bug * make MPPI default for Jazzy * Adding higher velocity limits --------- Signed-off-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: enricosutera <enricosutera@outlook.com>
* 18.5% performance improvement in MPPI * adding in path angle update * path align improvements * adding views * more updates with some TODOs * massive improvements to cost critic * remove TODOs * removing some jitter * updates * use fabs * 1ms saved baby! * completed optimizations * remove TODO * linting * fixing test failure * indexing fix * fix bug * make MPPI default for Jazzy * Adding higher velocity limits --------- Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
* 18.5% performance improvement in MPPI * adding in path angle update * path align improvements * adding views * more updates with some TODOs * massive improvements to cost critic * remove TODOs * removing some jitter * updates * use fabs * 1ms saved baby! * completed optimizations * remove TODO * linting * fixing test failure * indexing fix * fix bug * make MPPI default for Jazzy * Adding higher velocity limits --------- Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
* 18.5% performance improvement in MPPI * adding in path angle update * path align improvements * adding views * more updates with some TODOs * massive improvements to cost critic * remove TODOs * removing some jitter * updates * use fabs * 1ms saved baby! * completed optimizations * remove TODO * linting * fixing test failure * indexing fix * fix bug * make MPPI default for Jazzy * Adding higher velocity limits --------- Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
* 18.5% performance improvement in MPPI * adding in path angle update * path align improvements * adding views * more updates with some TODOs * massive improvements to cost critic * remove TODOs * removing some jitter * updates * use fabs * 1ms saved baby! * completed optimizations * remove TODO * linting * fixing test failure * indexing fix * fix bug * make MPPI default for Jazzy * Adding higher velocity limits --------- Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
* 18.5% performance improvement in MPPI * adding in path angle update * path align improvements * adding views * more updates with some TODOs * massive improvements to cost critic * remove TODOs * removing some jitter * updates * use fabs * 1ms saved baby! * completed optimizations * remove TODO * linting * fixing test failure * indexing fix * fix bug * make MPPI default for Jazzy * Adding higher velocity limits --------- Signed-off-by: Steve Macenski <stevenmacenski@gmail.com>
From 12.7ms on average to 6.80ms on average for 10000 cycles - with full footprint checking enabled
Validate final run-time and system performance of changes to make sure still high functioning with changes