Skip to content

Commit

Permalink
Fix planning_scene_monitor sync when passed empty robot state
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaschke committed Jan 7, 2025
1 parent 3aed1dc commit c4bb967
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.joint_state.name.empty() && scene.robot_state.multi_dof_joint_state.joint_names.empty())
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 c4bb967

Please sign in to comment.