diff --git a/capabilities/test/test_execution.launch.py b/capabilities/test/test_execution.launch.py index d6e619b3c..efd7ad7ca 100644 --- a/capabilities/test/test_execution.launch.py +++ b/capabilities/test/test_execution.launch.py @@ -73,6 +73,8 @@ def generate_test_description(): arguments=[ "panda_arm_controller", "joint_state_broadcaster", + "--param-file", + ros2_controllers_path, "--controller-manager", "/controller_manager", ], @@ -119,6 +121,5 @@ def test_gtest_run_complete(self, proc_info, test_exec): @launch_testing.post_shutdown_test() class TaskModelTestAfterShutdown(unittest.TestCase): - def test_exit_code(self, proc_info): - # Check that all processes in the launch exit with code 0 - launch_testing.asserts.assertExitCodes(proc_info) + def test_exit_code(self, proc_info, test_exec): + launch_testing.asserts.assertExitCodes(proc_info, process=test_exec) diff --git a/core/src/task.cpp b/core/src/task.cpp index c319c78ca..7dc14fb1e 100644 --- a/core/src/task.cpp +++ b/core/src/task.cpp @@ -318,8 +318,7 @@ moveit::core::MoveItErrorCode Task::execute(const SolutionBase& s) { if (pimpl()->preempt_requested_) { auto cancel_future = execute_ac_->async_cancel_goal(goal_handle); this->resetPreemptRequest(); - if (rclcpp::spin_until_future_complete(execute_solution_node_, cancel_future) != - rclcpp::FutureReturnCode::SUCCESS) { + if (executor.spin_until_future_complete(cancel_future) != rclcpp::FutureReturnCode::SUCCESS) { RCLCPP_ERROR(execute_solution_node_->get_logger(), "Could not preempt execution"); return error_code; } else {