From 387fa5c0870e87b7a90762fec425962e39a3994a Mon Sep 17 00:00:00 2001 From: v4hn Date: Tue, 5 Jun 2018 21:21:11 +0200 Subject: [PATCH] execute: apply effects through the PSM We can bypass it too, but things are a bit cleaner this way. --- capabilities/src/execute_task_solution_capability.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/capabilities/src/execute_task_solution_capability.cpp b/capabilities/src/execute_task_solution_capability.cpp index 2a1407fd..8c6dd43d 100644 --- a/capabilities/src/execute_task_solution_capability.cpp +++ b/capabilities/src/execute_task_solution_capability.cpp @@ -167,9 +167,8 @@ bool ExecuteTaskSolutionCapability::constructMotionPlan(const moveit_task_constr /* TODO add action feedback and markers */ exec_traj.effect_on_success_ = [this,sub_traj,description](const plan_execution::ExecutableMotionPlan*){ if(!planning_scene::PlanningScene::isEmpty(sub_traj.scene_diff)){ - planning_scene_monitor::LockedPlanningSceneRW scene(context_->planning_scene_monitor_); ROS_DEBUG_STREAM_NAMED("ExecuteTaskSolution", "apply effect of " << description ); - return scene->usePlanningSceneMsg(sub_traj.scene_diff); + return context_->planning_scene_monitor_->newPlanningSceneMessage(sub_traj.scene_diff); } return true; };