Skip to content

Support zero value for std_wz in mppi controller #5110

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

Merged
merged 2 commits into from
May 1, 2025

Conversation

mini-1235
Copy link
Contributor


Basic Info

Info Please fill out this column
Ticket(s) this addresses #5021
Primary OS tested on Ubuntu
Robotic platform tested on My own robot platform
Does this PR contain AI generated software? (No; Yes and it is marked inline in the code)

Description of testing performed

Description of contribution in a few bullet points

As described in the issue, this PR protects from the NaN values

Description of documentation updates required from your changes

Description of how this change was tested


Future work that may be required in bullet points

For Maintainers:

  • Check that any new parameters added are updated in docs.nav2.org
  • Check that any significant change is added to the migration guide
  • Check that any new features OR changes to existing behaviors are reflected in the tuning guide
  • Check that any new functions have Doxygen added
  • Check that any new features have test coverage
  • Check that any new plugins is added to the plugins page
  • If BT Node, Additionally: add to BT's XML index of nodes for groot, BT package's readme table, and BT library lists

Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
Copy link

codecov bot commented Apr 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Files with missing lines Coverage Δ
nav2_mppi_controller/src/optimizer.cpp 98.51% <100.00%> (+<0.01%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@SteveMacenski SteveMacenski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit for readability, otherwise LGTM. Does this fix your issue entirely?

costs_ += (gamma_vx * (bounded_noises_vx.rowwise() * vx_T).rowwise().sum()).eval();
costs_ += (gamma_wz * (bounded_noises_wz.rowwise() * wz_T).rowwise().sum()).eval();

if(s.sampling_std.wz) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(s.sampling_std.wz) {
if (s.sampling_std.wz > 0.0f) {

@SteveMacenski SteveMacenski linked an issue Apr 28, 2025 that may be closed by this pull request
Signed-off-by: mini-1235 <mauricepurnawan@gmail.com>
@mini-1235
Copy link
Contributor Author

Minor nit for readability, otherwise LGTM. Does this fix your issue entirely?

Yes, I achieved better results after applying this fix and some additional tuning. Thanks for the guidance!

@SteveMacenski SteveMacenski merged commit 07097d8 into ros-navigation:main May 1, 2025
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Question] Omnidirectional robot settings
2 participants