mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
execute: apply effects through the PSM
We can bypass it too, but things are a bit cleaner this way.
This commit is contained in:
parent
725f57e7fd
commit
387fa5c087
@ -167,9 +167,8 @@ bool ExecuteTaskSolutionCapability::constructMotionPlan(const moveit_task_constr
|
|||||||
/* TODO add action feedback and markers */
|
/* TODO add action feedback and markers */
|
||||||
exec_traj.effect_on_success_ = [this,sub_traj,description](const plan_execution::ExecutableMotionPlan*){
|
exec_traj.effect_on_success_ = [this,sub_traj,description](const plan_execution::ExecutableMotionPlan*){
|
||||||
if(!planning_scene::PlanningScene::isEmpty(sub_traj.scene_diff)){
|
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 );
|
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;
|
return true;
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user