File tree Expand file tree Collapse file tree 2 files changed +4
-15
lines changed Expand file tree Collapse file tree 2 files changed +4
-15
lines changed Original file line number Diff line number Diff line change @@ -155,8 +155,8 @@ class GpioToolController : public controller_interface::ControllerInterface
155155 std::unordered_set<std::string> command_if_ios_;
156156 std::unordered_set<std::string> state_if_ios_;
157157
158- using EngagingSrvType = example_interfaces ::srv::Trigger;
159- using ResetSrvType = example_interfaces ::srv::Trigger;
158+ using EngagingSrvType = std_srvs ::srv::Trigger;
159+ using ResetSrvType = std_srvs ::srv::Trigger;
160160 using ConfigSrvType = control_msgs::srv::SetGPIOToolConfig;
161161 using DynInterfaceMsg = control_msgs::msg::DynamicInterfaceValues;
162162 using EngagingActionType = control_msgs::action::GPIOToolCommand;
@@ -273,13 +273,6 @@ class GpioToolController : public controller_interface::ControllerInterface
273273 rclcpp_action::CancelResponse handle_engaging_cancel (
274274 std::shared_ptr<rclcpp_action::ServerGoalHandle<EngagingActionType>> goal_handle);
275275
276- /* *
277- * @brief Handles the accepted goal for the tool action.
278- * @param goal_handle The handle of the accepted goal.
279- */
280- void handle_engaging_accepted (
281- std::shared_ptr<rclcpp_action::ServerGoalHandle<EngagingActionType>> goal_handle);
282-
283276 /* *
284277 * @brief Handles the goal for the gripper configuration action.
285278 * @param uuid The UUID of the goal.
Original file line number Diff line number Diff line change @@ -1099,12 +1099,6 @@ rclcpp_action::CancelResponse GpioToolController::handle_engaging_cancel(
10991099 return rclcpp_action::CancelResponse::ACCEPT;
11001100}
11011101
1102- void GpioToolController::handle_engaging_accepted (
1103- std::shared_ptr<rclcpp_action::ServerGoalHandle<EngagingActionType>> goal_handle)
1104- {
1105- handle_action_accepted<EngagingActionType>(goal_handle);
1106- }
1107-
11081102rclcpp_action::GoalResponse GpioToolController::handle_config_goal (
11091103 const rclcpp_action::GoalUUID & /* uuid*/ , std::shared_ptr<const ConfigActionType::Goal> goal)
11101104{
@@ -1140,13 +1134,15 @@ void GpioToolController::handle_action_accepted(
11401134 if (current_tool_action_.load () == ToolAction::IDLE)
11411135 {
11421136 result->success = true ;
1137+ result->resulting_state_name = current_state_;
11431138 result->message = " Tool action successfully executed!" ;
11441139 goal_handle->succeed (result);
11451140 break ;
11461141 }
11471142 else if (current_tool_transition_.load () == GPIOToolTransition::HALTED)
11481143 {
11491144 result->success = false ;
1145+ result->resulting_state_name = current_state_;
11501146 result->message = " Tool action canceled or halted! Check the error, reset the tool using '~/reset_halted' service and set to sensible state." ;
11511147 goal_handle->abort (result);
11521148 break ;
You can’t perform that action at this time.
0 commit comments