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
155
155
std::unordered_set<std::string> command_if_ios_;
156
156
std::unordered_set<std::string> state_if_ios_;
157
157
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;
160
160
using ConfigSrvType = control_msgs::srv::SetGPIOToolConfig;
161
161
using DynInterfaceMsg = control_msgs::msg::DynamicInterfaceValues;
162
162
using EngagingActionType = control_msgs::action::GPIOToolCommand;
@@ -273,13 +273,6 @@ class GpioToolController : public controller_interface::ControllerInterface
273
273
rclcpp_action::CancelResponse handle_engaging_cancel (
274
274
std::shared_ptr<rclcpp_action::ServerGoalHandle<EngagingActionType>> goal_handle);
275
275
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
-
283
276
/* *
284
277
* @brief Handles the goal for the gripper configuration action.
285
278
* @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(
1099
1099
return rclcpp_action::CancelResponse::ACCEPT;
1100
1100
}
1101
1101
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
-
1108
1102
rclcpp_action::GoalResponse GpioToolController::handle_config_goal (
1109
1103
const rclcpp_action::GoalUUID & /* uuid*/ , std::shared_ptr<const ConfigActionType::Goal> goal)
1110
1104
{
@@ -1140,13 +1134,15 @@ void GpioToolController::handle_action_accepted(
1140
1134
if (current_tool_action_.load () == ToolAction::IDLE)
1141
1135
{
1142
1136
result->success = true ;
1137
+ result->resulting_state_name = current_state_;
1143
1138
result->message = " Tool action successfully executed!" ;
1144
1139
goal_handle->succeed (result);
1145
1140
break ;
1146
1141
}
1147
1142
else if (current_tool_transition_.load () == GPIOToolTransition::HALTED)
1148
1143
{
1149
1144
result->success = false ;
1145
+ result->resulting_state_name = current_state_;
1150
1146
result->message = " Tool action canceled or halted! Check the error, reset the tool using '~/reset_halted' service and set to sensible state." ;
1151
1147
goal_handle->abort (result);
1152
1148
break ;
You can’t perform that action at this time.
0 commit comments