Skip to content
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

Exit earlier on failure in generatePlan #2726

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

galou
Copy link
Contributor

@galou galou commented Mar 4, 2024

Description

With this change, the PlanningPipeline::generatePlan() exits as soon as a failure is detected. Before this, break was used to exit the current loop of request adapters, planners, or response adapters, but the function continued to the next loop. For example, if a planner would fail, the response adapters would still be executed.

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation reference
  • Document API changes relevant to the user in the MIGRATION.md notes
  • Create tests, which fail without this PR reference
  • Include a screenshot if changing a GUI
  • While waiting for someone to review your request, please help review another open pull request to support the maintainers

With this change, the `PlanningPipeline::generatePlan()` exits as soon
as a failure is detected. Before this, `break` was used to exit the
current loop of request adapters, planners, or response adapters, but
the function continued to the next loop. For example, if a planner would
fail, the response adapters would still be executed.

Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>
Copy link

codecov bot commented Mar 4, 2024

Codecov Report

Attention: Patch coverage is 9.09091% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 43.01%. Comparing base (d962501) to head (82aefcf).
Report is 13 commits behind head on main.

Files Patch % Lines
...anning/planning_pipeline/src/planning_pipeline.cpp 9.10% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2726      +/-   ##
==========================================
- Coverage   50.74%   43.01%   -7.72%     
==========================================
  Files         392      692     +300     
  Lines       32553    56300   +23747     
  Branches        0     7272    +7272     
==========================================
+ Hits        16517    24214    +7697     
- Misses      16036    31923   +15887     
- Partials        0      163     +163     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@sjahr sjahr left a comment

Choose a reason for hiding this comment

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

Yes, good catch! Thank you

@sjahr sjahr merged commit 712c057 into moveit:main Mar 4, 2024
11 of 12 checks passed
@galou galou deleted the exit_earlier_in_generateplan branch March 5, 2024 06:12
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.

None yet

2 participants