Skip to content

Fix state-only planning scene diff classification - #3820

Open
ktyang512 wants to merge 1 commit into
moveit:mainfrom
ktyang512:fix/state-only-scene-diff-3794
Open

Fix state-only planning scene diff classification#3820
ktyang512 wants to merge 1 commit into
moveit:mainfrom
ktyang512:fix/state-only-scene-diff-3794

Conversation

@ktyang512

Copy link
Copy Markdown

Description

PlanningScene::getPlanningSceneDiffMsg() includes the current link padding
and scale even when the pending monitor update contains only robot state. On
the receiving side, either field prevents PlanningSceneMonitor from
classifying the message as a state-only update.

This clears link_padding and link_scale in the exact UPDATE_STATE
publication branch, alongside the attached collision objects that are already
removed there. The initial full-scene message still carries padding and scale,
and updates that include another update bit do not enter this branch.

The regression test captures the actual published full scene and state diff,
then applies both messages to another monitor and verifies that the diff is
classified as UPDATE_STATE.

This addresses the padding/scale cause identified in #3794. As noted in the
issue comments, other causes such as world/OctoMap updates and RViz rendering
behavior can still produce broader updates, so this PR does not claim to fix
every source of the reported RViz slowdown.

Testing

  • Verified the regression fails on the base revision because padding/scale are
    present and the receiving monitor reports update type 15 instead of
    UPDATE_STATE (1).
  • ctest -R "^planning_scene_monitor_test_" --output-on-failure (10/10
    consecutive runs)
  • ctest --output-on-failure in moveit_ros_planning (6/6 passed)
  • clang-format-14 --dry-run --Werror on both changed files
  • clang-tidy on both changed files
  • git diff --check

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Create tests which fail without this PR
  • No API, migration note, tutorial, or GUI screenshot is required

AI assistance disclosure: OpenAI Codex was used to inspect the relevant code
paths, help draft the regression test, and review the patch. The behavior and
scope were checked against the current source, and the reported tests were run
before submission.

Clear link padding and scale from exact state-only publications and add an end-to-end regression for receiver update classification.

Assisted-by: OpenAI Codex

@riv-mjohnson riv-mjohnson left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for looking into this!

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.

2 participants