47 : MoveGroupCapability(
"ExecuteTrajectoryAction"), callback_queue_(), spinner_(1, &callback_queue_)
61 execute_action_server_ = std::make_unique<actionlib::SimpleActionServer<moveit_msgs::ExecuteTrajectoryAction>>(
69 moveit_msgs::ExecuteTrajectoryResult action_res;
70 if (!
context_->trajectory_execution_manager_)
72 const std::string
response =
"Cannot execute trajectory since ~allow_trajectory_execution was set to false";
73 action_res.error_code.val = moveit_msgs::MoveItErrorCodes::CONTROL_FAILED;
81 if (action_res.error_code.val == moveit_msgs::MoveItErrorCodes::SUCCESS)
85 else if (action_res.error_code.val == moveit_msgs::MoveItErrorCodes::PREEMPTED)
98 moveit_msgs::ExecuteTrajectoryResult& action_res)
102 context_->trajectory_execution_manager_->clear();
103 if (
context_->trajectory_execution_manager_->push(goal->trajectory))
106 context_->trajectory_execution_manager_->execute();
110 action_res.error_code.val = moveit_msgs::MoveItErrorCodes::SUCCESS;
114 action_res.error_code.val = moveit_msgs::MoveItErrorCodes::PREEMPTED;
118 action_res.error_code.val = moveit_msgs::MoveItErrorCodes::TIMED_OUT;
122 action_res.error_code.val = moveit_msgs::MoveItErrorCodes::CONTROL_FAILED;
128 action_res.error_code.val = moveit_msgs::MoveItErrorCodes::CONTROL_FAILED;
134 context_->trajectory_execution_manager_->stopExecution(
true);
139 moveit_msgs::ExecuteTrajectoryFeedback execute_feedback;