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

Do not overwrite the error code with OMPL interface #2725

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

galou
Copy link
Contributor

@galou galou commented Mar 4, 2024

Description

In case of failure, set the error code to the one returned by the planning pipeline's solve method rather than overwriting it with PLANNING_FAILED.

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

@galou
Copy link
Contributor Author

galou commented Mar 4, 2024

Should I document the changes in MIGRATION.md?

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 42.61%. Comparing base (d962501) to head (02ec743).
Report is 18 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2725      +/-   ##
==========================================
- Coverage   50.74%   42.61%   -8.13%     
==========================================
  Files         392      692     +300     
  Lines       32553    56331   +23778     
  Branches        0     7273    +7273     
==========================================
+ Hits        16517    24001    +7484     
- Misses      16036    32167   +16131     
- 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.

Thanks! I think this can be simplified even further. How about

void ModelBasedPlanningContext::solve(planning_interface::MotionPlanDetailedResponse& res)
{
  res.error_code = solve(request_.allowed_planning_time, request_.num_planning_attempts);
}

My understanding is that the whole if statement is not necessary or am I missing something 🤔?

@galou
Copy link
Contributor Author

galou commented Mar 5, 2024

Simplification done.

By the way, what uses solve(planning_interface::MotionPlanDetailedResponse&)?

Copy link

mergify bot commented Mar 5, 2024

This pull request is in conflict. Could you fix it @galou?

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.

Thanks!

@sjahr
Copy link
Contributor

sjahr commented Mar 5, 2024

By the way, what uses solve(planning_interface::MotionPlanDetailedResponse&)?

Good question 🤔 Looks like it is by the benchmarking code. Theoretically, you could implement a custom planning pipeline that uses the detailed response. We considered removing or unifying it but that was never fleshed out. Do you have thoughts?

@sjahr
Copy link
Contributor

sjahr commented Mar 5, 2024

@galou Looks like the PR needs to be rebased on the latest version of main but otherwise it is good to go 👍

In case of failure, set the error code to the one returned by the
planning pipeline's `solve` method rather than overwriting it with
`PLANNING_FAILED`.

Signed-off-by: Gaël Écorchard <gael@km-robotics.cz>
@galou galou force-pushed the do_not_overwrite_error_code_ompl branch from 6fb20ee to 02ec743 Compare March 5, 2024 17:06
@galou
Copy link
Contributor Author

galou commented Mar 5, 2024

I rebased and squashed. I hope that it's ok that the conversation may lose context.

@galou
Copy link
Contributor Author

galou commented Mar 5, 2024

To really see the effects of this PR, we have to wait for ompl/ompl#1147 to be merged.

@sjahr sjahr merged commit dafa36f into moveit:main Mar 5, 2024
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.

None yet

2 participants