Skip to content

Commit

Permalink
Revert impl
Browse files Browse the repository at this point in the history
  • Loading branch information
JafarAbdi committed May 26, 2022
1 parent 64690d0 commit fcdce1e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/src/task.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,9 @@ moveit_msgs::msg::MoveItErrorCodes Task::execute(const SolutionBase& s) {
auto ac = rclcpp_action::create_client<moveit_task_constructor_msgs::action::ExecuteTaskSolution>(
node, "execute_task_solution");
ac->wait_for_action_server();
auto impl = pimpl();

moveit_task_constructor_msgs::action::ExecuteTaskSolution::Goal goal;
s.fillMessage(goal.solution, impl->introspection_.get());
s.fillMessage(goal.solution, pimpl()->introspection_.get());
s.start()->scene()->getPlanningSceneMsg(goal.solution.start_scene);

moveit_msgs::msg::MoveItErrorCodes error_code;
Expand All @@ -303,7 +302,7 @@ moveit_msgs::msg::MoveItErrorCodes Task::execute(const SolutionBase& s) {

auto result_future = ac->async_get_result(goal_handle);
while (result_future.wait_for(std::chrono::milliseconds(10)) != std::future_status::ready) {
if (impl->preempt_requested_) {
if (pimpl()->preempt_requested_) {
auto cancel_future = ac->async_cancel_goal(goal_handle);
if (rclcpp::spin_until_future_complete(node, cancel_future) != rclcpp::FutureReturnCode::SUCCESS) {
RCLCPP_ERROR(node->get_logger(), "Could not preempt execution");
Expand Down

0 comments on commit fcdce1e

Please sign in to comment.