[mppi] Fix division by zero in Constraint Critic#5855
Merged
SteveMacenski merged 1 commit intoros-navigation:humble_mainfrom Jan 9, 2026
Merged
Conversation
backporting ros-navigation#5636 to humble_main branch. This leads to nan costs when wz is zero. Signed-off-by: Alessio Parmeggiani <parmeggiani.alessio1@gmail.com>
Contributor
|
@Alessio-Parmeggiani, all pull requests must be targeted towards the |
mini-1235
approved these changes
Jan 9, 2026
SteveMacenski
approved these changes
Jan 9, 2026
20f7b9c
into
ros-navigation:humble_main
2 of 3 checks passed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Basic Info
Description of contribution in a few bullet points
This pull request is a backport of #5636 to the
humble_mainbranch.This issue leads to nan costs when wz is zero with ackermann enabled, and results in the robot moving only in circles.
Description of how this change was tested
I used a test nav2 setup with a dummy local costmap and global costmap with all values equal to 0.
Motion model is set to Ackermann.
Before the fix to any goal the optimal trajectory correspond to high vx and wz and the robot going only in circles, failing after a while. The constraint critic compute NaN costs, verified by adding prints in the code.
After the fix, the previous behaviour does not happen anymore and the optimal trajectory is correct.
Future work that may be required in bullet points
For Maintainers:
backport-*.