Skip to content

MPPI GoalCritic and Path Inversion Bug #5088

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

Open
alex-roba opened this issue Apr 15, 2025 · 10 comments · May be fixed by #5105
Open

MPPI GoalCritic and Path Inversion Bug #5088

alex-roba opened this issue Apr 15, 2025 · 10 comments · May be fixed by #5105
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@alex-roba
Copy link

Bug report

Required Info:

  • Operating System:
    • ubuntu 24.04
  • Computer:
    • 13th Gen Intel NUC
  • ROS2 Version:
    • Jazzy
  • Version or commit hash:
    • main repository
  • DDS implementation:
    • Fast-RTPS

Steps to reproduce issue

The MPPI controller's GoalCritic behavior, modified in PR #4822, causes the robot to ignore local path inversions and focus solely on the global goal.

  1. Set up a Nav2 environment with the MPPI controller.
  2. Create a path with an inversion point (e.g., in a narrow aisle requiring a 180-degree turn).
  3. Send a goal pose with an orientation opposite to the robot's current direction.
  4. Observe the robot bypassing the inversion point and moving directly to the final goal.

Expected behavior

The robot should respect path inversions, navigating to intermediary goals (e.g., inversion points) when required, before approaching the final goal.

Actual behavior

The robot to ignore local path inversions and focus solely on the global goal.

Additional information

Proposed Solution:
Default to using the "real" (global) goal for GoalCritic scoring and other critics.

If a path inversion is detected and inversions are considered (based on a parameter), use the intermediary goal (end of the pruned path or inversion point).

@SteveMacenski SteveMacenski added bug Something isn't working help wanted Extra attention is needed good first issue Good for newcomers labels Apr 15, 2025
@SteveMacenski
Copy link
Member

I agree that this is an issue. See more context in this thread: #4822 (comment) for the issue and possible solutions.

Anyone in the community open to helping with this? It involves adding the parameter for enforcing path inversions and using the global goal pose vs the path's end pose considering path inversions when MPPI is used with a feasible planner like Smac Planner Hybrid-A*.

@BriceRenaudeau
Copy link
Contributor

@alex-roba , Thanks for creating the issue.

@BriceRenaudeau
Copy link
Contributor

The quickest solution is to revert the faulty MR #4822

@redvinaa
Copy link
Contributor

@BriceRenaudeau reverting #4822 would reintroduce the bug that it solved :) Instead, you could open a PR with the solution that @SteveMacenski suggested.

@BriceRenaudeau
Copy link
Contributor

Yes, I understand, for me it was a feature, not a bug. 👍

@SteveMacenski
Copy link
Member

I've also marked it with help-wanted. I've been noticing many of these tickets have had community members jump in to help too, so I've been leaving nice bite-sized things like this open for them to contribute and grow. If this isn't something @BriceRenaudeau @alex-roba @redvinaa can do, at some point I'll address it myself but wanted to give open opportunity to the community to be involved before I did.

@brayanpa
Copy link

Hi! I'm currently working with the Smac Planner Hybrid-A* and encountered this issue while testing the MPPI controller, which led me to switch to the RPP controller instead. I'd like to take a closer look and work on a definitive fix so that the MPPI controller can be used reliably. If you're okay with it, I’ll go ahead and start working on this.

@SteveMacenski
Copy link
Member

Please do @brayanpa !

brayanpa added a commit to brayanpa/navigation2 that referenced this issue Apr 24, 2025
brayanpa added a commit to brayanpa/navigation2 that referenced this issue Apr 24, 2025
@brayanpa brayanpa linked a pull request Apr 24, 2025 that will close this issue
7 tasks
@brayanpa
Copy link

Hi! I've opened a pull request with a proposed fix. Although it's a simple solution, I've tested it both in simulation and on the real robot, and it seems to fully address the issues.

@SteveMacenski let me know if this is close to what you had in mind or if any adjustments are needed. I'm happy to make changes and will be monitoring the thread.

brayanpa added a commit to brayanpa/navigation2 that referenced this issue Apr 25, 2025
Signed-off-by: brayanpa <brayanspallares@gmail.com>
@SteveMacenski
Copy link
Member

Great! I'll take a look early next week - probably Monday

@SteveMacenski SteveMacenski linked a pull request Apr 25, 2025 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants