[Jazzy] Optimize MPPI visualization to skip processing when no subscribers#5807
Conversation
- Added subscription count check in TrajectoryVisualizer::add Signed-off-by: SatArw <satwik090202@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 3 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
Conceptually, I agree with this PR, but I'll leave it to @SteveMacenski in case he has other preferences |
SteveMacenski
left a comment
There was a problem hiding this comment.
Please submit against the main branch so that it is applied in rolling and all other new branches
|
Sure, I will submit these changes as a new PR against the
I'm new to this, so I'd appreciate these clarifications. Thank you. |
Typically we require more comprehensive testing before submitting a PR. However, since you have already tested this on the Jazzy branch and the changes are relatively simple, I think it's fine not to rerun everything.
You can leave this PR open. Once the PR targeting main is merged, we'll merge this one for Jazzy too :) |
|
Ill leave for Maurice to review / approve before I merge |
Remove redundant brackets in the if statement. Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: Satwik Arawalli <96329337+SatArw@users.noreply.github.com>
…ibers (ros-navigation#5807) * Optimize MPPI visualization to skip processing when no subscribers - Added subscription count check in TrajectoryVisualizer::add Signed-off-by: SatArw <satwik090202@gmail.com> * Update nav2_mppi_controller/src/trajectory_visualizer.cpp Remove redundant brackets in the if statement. Co-authored-by: Steve Macenski <stevenmacenski@gmail.com> Signed-off-by: Satwik Arawalli <96329337+SatArw@users.noreply.github.com> --------- Signed-off-by: SatArw <satwik090202@gmail.com> Signed-off-by: Satwik Arawalli <96329337+SatArw@users.noreply.github.com> Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
Basic Info
Description of contribution in a few bullet points
TrajectoryVisualizer::addto check subscription counts before executing the marker generation loops.get_subscription_count()on the/trajectories(MarkerArray) and/optimal_trajectory(Path) publishers.visualizeis set totrue:/optimal_trajectoryonly: Generates and publishes the visualization data for only the optimal trajectory./trajectories: Generates the visualization data for all the trajectories (including the optimal_trajectory).controller_serverCPU usage.Description of documentation updates required from your changes
Description of how this change was tested
nav2_mppi_controllerGTest suite locally. Passed 17/17 (100%) tests./trajectoriesCases


Navigation Task

Average CPU Load Summary

CPU Usage Timeline (Before vs After)

Future work that may be required in bullet points
For Maintainers:
backport-*.