53 execute_action_server_ = std::make_unique<actionlib::SimpleActionServer<moveit_msgs::ExecuteTrajectoryAction>>(
61 moveit_msgs::ExecuteTrajectoryResult action_res;
62 if (!
context_->trajectory_execution_manager_)
64 const std::string
response =
"Cannot execute trajectory since ~allow_trajectory_execution was set to false";
65 action_res.error_code.val = moveit_msgs::MoveItErrorCodes::CONTROL_FAILED;
73 if (action_res.error_code.val == moveit_msgs::MoveItErrorCodes::SUCCESS)
77 else if (action_res.error_code.val == moveit_msgs::MoveItErrorCodes::PREEMPTED)
90 moveit_msgs::ExecuteTrajectoryResult& action_res)
94 context_->trajectory_execution_manager_->clear();
95 if (
context_->trajectory_execution_manager_->push(goal->trajectory))
98 context_->trajectory_execution_manager_->execute();
102 action_res.error_code.val = moveit_msgs::MoveItErrorCodes::SUCCESS;
106 action_res.error_code.val = moveit_msgs::MoveItErrorCodes::PREEMPTED;
110 action_res.error_code.val = moveit_msgs::MoveItErrorCodes::TIMED_OUT;
114 action_res.error_code.val = moveit_msgs::MoveItErrorCodes::CONTROL_FAILED;
120 action_res.error_code.val = moveit_msgs::MoveItErrorCodes::CONTROL_FAILED;
126 context_->trajectory_execution_manager_->stopExecution(
true);
131 moveit_msgs::ExecuteTrajectoryFeedback execute_feedback;