Skip to content

Commit

Permalink
apply planning scene: use newly exposed success value of newPlanningS…
Browse files Browse the repository at this point in the history
…ceneMessage
  • Loading branch information
v4hn committed Jun 16, 2016
1 parent 2000333 commit 0ec74d4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ bool move_group::ApplyPlanningSceneService::applyScene(moveit_msgs::ApplyPlannin
return true;
}
context_->planning_scene_monitor_->updateFrameTransforms();
context_->planning_scene_monitor_->newPlanningSceneMessage(req.scene);
res.success = context_->planning_scene_monitor_->newPlanningSceneMessage(req.scene);
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ class PlanningSceneMonitor : private boost::noncopyable
void clearOctomap();

// Called to update the planning scene with a new message.
void newPlanningSceneMessage(const moveit_msgs::PlanningScene& scene);
bool newPlanningSceneMessage(const moveit_msgs::PlanningScene& scene);

protected:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,12 @@ void planning_scene_monitor::PlanningSceneMonitor::clearOctomap()
octomap_monitor_->getOcTreePtr()->unlockWrite();
}

void planning_scene_monitor::PlanningSceneMonitor::newPlanningSceneMessage(const moveit_msgs::PlanningScene& scene)
bool planning_scene_monitor::PlanningSceneMonitor::newPlanningSceneMessage(const moveit_msgs::PlanningScene& scene)
{
if (!scene_)
return;
return false;

bool result;

SceneUpdateType upd = UPDATE_SCENE;
std::string old_scene_name;
Expand All @@ -490,7 +492,7 @@ void planning_scene_monitor::PlanningSceneMonitor::newPlanningSceneMessage(const

last_update_time_ = ros::Time::now();
old_scene_name = scene_->getName();
scene_->usePlanningSceneMsg(scene);
result = scene_->usePlanningSceneMsg(scene);
if (octomap_monitor_)
{
if (!scene.is_diff && scene.world.octomap.octomap.data.empty())
Expand Down Expand Up @@ -544,6 +546,7 @@ void planning_scene_monitor::PlanningSceneMonitor::newPlanningSceneMessage(const
}
}
triggerSceneUpdateEvent(upd);
return result;
}

void planning_scene_monitor::PlanningSceneMonitor::newPlanningSceneWorldCallback(const moveit_msgs::PlanningSceneWorldConstPtr &world)
Expand Down

0 comments on commit 0ec74d4

Please sign in to comment.