Skip to content

Commit

Permalink
Update messges to have better status from the gripper.
Browse files Browse the repository at this point in the history
  • Loading branch information
destogl committed Jan 17, 2025
1 parent 017ed60 commit 49f4a85
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 27 deletions.
2 changes: 2 additions & 0 deletions control_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ set(msg_files
msg/DynamicJointState.msg
msg/GripperCommand.msg
msg/InterfaceValue.msg
msg/IOGripperControllerState.msg
msg/IOGripperState.msg
msg/JointComponentTolerance.msg
msg/JointControllerState.msg
msg/JointJog.msg
Expand Down
17 changes: 1 addition & 16 deletions control_msgs/action/IOGripperCommand.action
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,9 @@
# The grippers are going through the different states during opening and closing process.
# Those are returned as feedback.

# The gripper is in an idle state, not performing any action.
uint8 IDLE=0
# The gripper is setting command interfaces to be able to perform open or close action, e.g., disabling breaks.
uint8 SET_BEFORE_COMMAND=1
# The close command is sent to gripper on its command interfaces.
uint8 CLOSE_GRIPPER=2
# The controller is checking its current gripper's state on state interfaces.
uint8 CHECK_GRIPPER_STATE=3
# The open command is sent to gripper on its command interfaces.
uint8 OPEN_GRIPPER=4
# The gripper is setting "after" commands when open or close process if finished, e.g., engaging breaks.
uint8 SET_AFTER_COMMAND=5
# The gripper has halted due to an error or stop command.
uint8 HALTED=6

bool open # boolean value to indicate if the gripper should be opened or closed (e.g. true for open, false for close)
---
bool success # true for performing the gripper command successfully and vice versa
string message # informational, e.g. for success or error messages
---
uint8 state # state of the gripper as defined above
IOGripperState transition # state of the gripper during transition as defined above
12 changes: 1 addition & 11 deletions control_msgs/action/SetIOGripperConfig.action
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,10 @@
# The action request is called with the name of the configuration to be set

# The io_gripper_controller follows a set of states to reconfigure the gripper
# The states are defined as follows:
# Enum representing the states of the reconfiguration process.
# States:
# The reconfiguration process is idle, not performing any action.
uint8 IDLE=0
# Setting the command based on the configuration.
uint8 SET_COMMAND=1
# Checking the state after setting the command.
uint8 CHECK_STATE=2


string config_name # information about which configuration is being set for the gripper controller
---
bool result # indicate success for setting the configuration of the gripper controller and vice versa
string status # informational, e.g. for success or error messages
---
uint8 state # state of the gripper as defined above
IOGripperState transition # state of the gripper during transition as defined above
7 changes: 7 additions & 0 deletions control_msgs/msg/IOGripperControllerState.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Name of the gripper open close state. Note that it can have mutliple "closed" states. If empty, then transition is happening and check the state of the transition.
string open_close
IOGripperState open_close_transition

# Name of the gripper's current configuration. If empty, then transition is happening and check the state of the transition.
string configuration
IOGripperState configuration_transition
21 changes: 21 additions & 0 deletions control_msgs/msg/IOGripperState.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# The grippers are going through the different states during opening, closing, and configuraiton chnages process.

# The gripper is in an idle state, not performing any action.
uint8 IDLE=0
# The gripper is setting command interfaces to be able to perform open or close action, e.g., disabling breaks.
uint8 SET_BEFORE_COMMAND=1
# (optional) Check if brfore command is set correctly and confirmed by the sensors.
uint8 CHECK_BEFORE_COMMAND=2
# Set command to gripper's command interfaces.
uint8 SET_COMMAND=11
# The controller is checking its current gripper's state on state interfaces.
uint8 CHECK_COMMAND=12
# The gripper is setting "after" commands when open or close process if finished, e.g., engaging breaks.
uint8 SET_AFTER_COMMAND=21
# (optional) Check if after command is set correctly and confirmed by the sensors.
uint8 CHECK_AFTER_COMMAND=22
# The gripper has halted due to an error or stop command.
uint8 HALTED=100

# state of the gripper during transitions as defined above
uint8 state

0 comments on commit 49f4a85

Please sign in to comment.