diff --git a/control_msgs/CMakeLists.txt b/control_msgs/CMakeLists.txt index 52240e0..6940d7b 100644 --- a/control_msgs/CMakeLists.txt +++ b/control_msgs/CMakeLists.txt @@ -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 @@ -45,14 +47,17 @@ set(action_files action/ParallelGripperCommand.action action/FollowJointTrajectory.action action/GripperCommand.action + action/IOGripperCommand.action action/JointTrajectory.action action/PointHead.action + action/SetIOGripperConfig.action action/SingleJointPosition.action ) set(srv_files srv/QueryCalibrationState.srv srv/QueryTrajectoryState.srv + srv/SetIOGripperConfig.srv ) rosidl_generate_interfaces(${PROJECT_NAME} diff --git a/control_msgs/action/IOGripperCommand.action b/control_msgs/action/IOGripperCommand.action new file mode 100644 index 0000000..64150e8 --- /dev/null +++ b/control_msgs/action/IOGripperCommand.action @@ -0,0 +1,11 @@ +# This action interface is defined for controlling the io gripper controller to open or close the gripper + +# The grippers are going through the different states during opening and closing process. +# Those are returned as feedback. + +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 +--- +IOGripperState transition # state of the gripper during transition as defined above diff --git a/control_msgs/action/SetIOGripperConfig.action b/control_msgs/action/SetIOGripperConfig.action new file mode 100644 index 0000000..bde7fb1 --- /dev/null +++ b/control_msgs/action/SetIOGripperConfig.action @@ -0,0 +1,13 @@ +# This action interface is defined for setting the configuration of the io gripper controller +# In yaml file of the io_gripper_controller, the configuration is defined as a list of strings +# e.g. configurations: ["narrow_objects", "wide_objects"] +# 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 + +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 +--- +IOGripperState transition # state of the gripper during transition as defined above diff --git a/control_msgs/msg/IOGripperControllerState.msg b/control_msgs/msg/IOGripperControllerState.msg new file mode 100644 index 0000000..8ff868b --- /dev/null +++ b/control_msgs/msg/IOGripperControllerState.msg @@ -0,0 +1,7 @@ +# Name of the gripper open close state. Note that it can have multiple "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 diff --git a/control_msgs/msg/IOGripperState.msg b/control_msgs/msg/IOGripperState.msg new file mode 100644 index 0000000..cd3bd6e --- /dev/null +++ b/control_msgs/msg/IOGripperState.msg @@ -0,0 +1,21 @@ +# The grippers are going through the different states during opening, closing, and configuration changes 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 before 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 diff --git a/control_msgs/srv/SetIOGripperConfig.srv b/control_msgs/srv/SetIOGripperConfig.srv new file mode 100644 index 0000000..8747e7d --- /dev/null +++ b/control_msgs/srv/SetIOGripperConfig.srv @@ -0,0 +1,9 @@ +# This service interface is defined for setting the configuration of the io gripper controller +# In yaml file of the io_gripper_controller, the configuration is defined as a list of strings +# e.g. configurations: ["narrow_objects", "wide_objects"] +# The service request is called with the name of the configuration to be set + +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