Skip to content

Commit

Permalink
Fix planning_scene_monitor sync when passed empty robot state (moveit…
Browse files Browse the repository at this point in the history
…#3683)

Simplified Backport of moveit/moveit2#3187

Co-authored-by: v4hn <me@v4hn.de>
  • Loading branch information
rhaschke and v4hn committed Feb 6, 2025
1 parent 1932e6d commit a75d6e2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,9 @@ bool PlanningSceneMonitor::newPlanningSceneMessage(const moveit_msgs::PlanningSc

if (!scene.is_diff && parent_scene_)
{
// clear maintained (diff) scene_ and set the full new scene in parent_scene_ instead
// If there is no new robot_state, transfer RobotState from current scene to parent scene
if (scene.robot_state.is_diff)
parent_scene_->setCurrentState(scene_->getCurrentState());
scene_->clearDiffs();
result = parent_scene_->setPlanningSceneMsg(scene);
// There were no callbacks for individual object changes, so rebuild the octree masks
Expand Down

0 comments on commit a75d6e2

Please sign in to comment.