Hi all, its your Friendly Neighborhood Navigator here to announce the results of some recent work to optimize the performance of the Nav2 Smac Planners and MPPI Controller! These are important updates worth mentioning explicitly for new and old users alike.
In conjunction, two of the most powerful algorithms in Nav2 have now become even faster to help run Nav2 on even smaller compute platforms, using less CPU, and planning across larger spaces / time horizons.
MPPI Controller
From the great work of Ayush Singh, we’ve seen approximately 45-50% increases in speed by moving to Eigen from xtensor in conjunction with optimizations in data layouts, when measured on modern x86 processors. This allows the controller to run after than 120hz on CPU-only (125hz average on i7-1365U).
Additionally, we have reports from end-users of enabling 55-60hz on NVIDIA Jetson Orins from experiments performed by Kiwibot! This is plenty fast, as I typically haven’t found much additional returns after than 50hz even if you could run it faster. This also only takes about half of one Jetson CPU core to run with our default out-of-the-box settings.
This work has been merged into Nav2 main and is available in Rolling and Kilted! This will not be backported since it is a near-total API rewrite to support Eigen and replace xtensor, unfortunately.
Smac Planner
Recent re-works of Smac traversal function estimates and optimizations have yielded recent 20-25% performance improvements in recent weeks (the type of environment, planning distance, etc plays a role). Thanks to @BriceRenaudeau for his great help in debugging the issue and doing initial benchmark testing and prototyping!
These, on the other hand, have been backported into Jazzy, as well as Rolling and newer (Kilted+)!
What’s Next?
There’s some current effort going in on enabling IPC in Nav2 that we’ve run into a few snags on. Once that is complete, we should have a stack-wide performance boost on the order of 10-20%! If you want to help jump in on this, check out our progress and state at the ticket below. We could definitely use some eyes on this by those very familiar with ROS 2 core packages, as we’ve seemingly uncovered a few bugs that need attention in which the Nav2 maintainers like myself are not well suited to tackle - and impact other ROS 2 IPC systems as well. Current open rclcpp ticket can be found here.
Its been an exciting few weeks in the project with several medium to large sized projects coming to conclusion! Thanks again to everyone that’s jumped in to help make these improvements possible!