Skip to content
This repository was archived by the owner on Nov 13, 2017. It is now read-only.

Commit fd5bf39

Browse files
committed
sync planning scene updates after execution
1 parent 58870fc commit fd5bf39

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

move_group/src/default_capabilities/execute_service_capability.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ bool move_group::MoveGroupExecuteService::executeTrajectoryService(moveit_msgs::
7878
res.error_code.val = moveit_msgs::MoveItErrorCodes::TIMED_OUT;
7979
else
8080
res.error_code.val = moveit_msgs::MoveItErrorCodes::CONTROL_FAILED;
81+
// wait for all planning scene updates to be processed
82+
context_->planning_scene_monitor_->syncUpdates(ros::Time::now());
8183
ROS_INFO_STREAM("Execution completed: " << es.asString());
8284
}
8385
else

planning/plan_execution/src/plan_execution.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,8 @@ void plan_execution::PlanExecution::planningSceneUpdatedCallback(const planning_
457457

458458
void plan_execution::PlanExecution::doneWithTrajectoryExecution(const moveit_controller_manager::ExecutionStatus &status)
459459
{
460+
// sync all planning scene updates before continuing
461+
planning_scene_monitor_->syncUpdates(ros::Time::now());
460462
execution_complete_ = true;
461463
}
462464

0 commit comments

Comments
 (0)