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

PSM: Correctly handle full planning scene message #2876

Merged
merged 3 commits into from
Jul 11, 2024

Conversation

sjahr
Copy link
Contributor

@sjahr sjahr commented Jun 21, 2024

Port #3610

Description

Please explain the changes you made, including a reference to the related issue if applicable

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

Fixes #3538/#3609
If the message is not a diff and parent_scene is not set either,
the message should be handled as a full planning scene message as before #3538.
@rhaschke rhaschke added this pull request to the merge queue Jun 21, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 21, 2024
@@ -1262,6 +1262,7 @@ bool PlanningScene::setPlanningSceneDiffMsg(const moveit_msgs::msg::PlanningScen

bool PlanningScene::setPlanningSceneMsg(const moveit_msgs::msg::PlanningScene& scene_msg)
{
assert(scene_msg.is_diff == false);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this method public-facing? if so, do we want to throw an assertion here?
Since this function returns a bool already, we could also return false and print out an error message, which would also work in release builds

Copy link
Contributor

Choose a reason for hiding this comment

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

The assertion is just a reminder, that this method should not be called with planning scene diffs. If it is, it is probably a logical error in the code, causing some issues down the road.

@sjahr sjahr merged commit 865b006 into moveit:main Jul 11, 2024
8 of 10 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

3 participants