diff --git a/control_msgs/CMakeLists.txt b/control_msgs/CMakeLists.txt index 3fe67f2d..d4901867 100644 --- a/control_msgs/CMakeLists.txt +++ b/control_msgs/CMakeLists.txt @@ -20,6 +20,8 @@ set(msg_files msg/DynamicJointState.msg msg/EtherCATState.msg msg/GenericHardwareState.msg + msg/GPIOToolControllerState.msg + msg/GPIOToolTransition.msg msg/GripperCommand.msg msg/HardwareDeviceDiagnostics.msg msg/HardwareDeviceStatus.msg @@ -52,17 +54,20 @@ set(msg_files set(action_files action/ExecuteMotionPrimitiveSequence.action action/FollowJointTrajectory.action + action/GPIOToolCommand.action action/GripperCommand.action action/JointTrajectory.action action/FollowJointWrenchTrajectory.action action/ParallelGripperCommand.action action/PointHead.action + action/SetGPIOToolConfig.action action/SingleJointPosition.action ) set(srv_files srv/QueryCalibrationState.srv srv/QueryTrajectoryState.srv + srv/SetGPIOToolConfig.srv ) rosidl_generate_interfaces(${PROJECT_NAME} diff --git a/control_msgs/action/GPIOToolCommand.action b/control_msgs/action/GPIOToolCommand.action new file mode 100644 index 00000000..30e6bc3f --- /dev/null +++ b/control_msgs/action/GPIOToolCommand.action @@ -0,0 +1,11 @@ +# This action interface is for commanding GPIOToolController to disengage or engage the tool. +# The tools are going through the predefed transitions in during disengaging and engaging processes. +# Those are returned as feedback. + +bool engage # boolean value to indicate if the tool should engaged (true) or disengaged (false). true for open, false for close) +--- +bool success # true for performing the tool command successfully and vice versa +string resulting_state_name # name of the resulting state after the action is finished, empty when state cannot be determined +string message # informational, e.g. for success or error messages +--- +GPIOToolTransition transition # current transition of the gripper during enagagin/disengaging processes diff --git a/control_msgs/action/SetGPIOToolConfig.action b/control_msgs/action/SetGPIOToolConfig.action new file mode 100644 index 00000000..30c6d999 --- /dev/null +++ b/control_msgs/action/SetGPIOToolConfig.action @@ -0,0 +1,12 @@ +# This action interface is defined for setting the configuration of the GPIOToolController. +# In yaml file of the controller, the configurations are defined as a list of strings, for example a gripper might have the following configurations: ["narrow_objects", "wide_objects"], or a lift unit on a mobile base might have configurations like ["with_payload", "without_payload"]. +# The action request is called with the name of the configuration to be set. +# During the configuration change, the gripper is going through a set of transitions, which are defined in the GPIOToolTransition message. + +string config_name # information about which configuration is being set for the tool +--- +bool success # indicate success for setting the configuration of the tool and vice versa +string resulting_state_name # name of the resulting configuration after the action is finished, empty when configuration cannot be determined +string message # informational, e.g. for success or error messages +--- +GPIOToolTransition transition # current transition of the tool during reconfiguration process diff --git a/control_msgs/msg/GPIOToolControllerState.msg b/control_msgs/msg/GPIOToolControllerState.msg new file mode 100644 index 00000000..41d371ce --- /dev/null +++ b/control_msgs/msg/GPIOToolControllerState.msg @@ -0,0 +1,7 @@ +# Name of the tool's disengaged or engaged state. +# Note that a tool can have multiple "enagaged" states that can be detected by a sensor, for example: gripper is engaged (closed) with or without an object; a lift unit on a mobile base can be lifted with or without payload. +string state +# Name of the tool's current configuration. +string configuration +# Current transition if the tool is going through a state or configuration change. +GPIOToolTransition current_transition diff --git a/control_msgs/msg/GPIOToolTransition.msg b/control_msgs/msg/GPIOToolTransition.msg new file mode 100644 index 00000000..3163889e --- /dev/null +++ b/control_msgs/msg/GPIOToolTransition.msg @@ -0,0 +1,21 @@ +# The tools are going through the different transition phases when changing states or configurations. + +# The tool is in an idle state, not performing any action. +uint8 IDLE=0 +# The tool is setting command interfaces to be able to perform state changes (disengaged or engaged), 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 tool's command interfaces. +uint8 SET_COMMAND=11 +# The controller is checking its current tool's state on state interfaces is set. +uint8 CHECK_COMMAND=12 +# The tool is setting "after" commands when ostate changes (disengaged or engaged) is 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 tool has halted due to an error or stop command. +uint8 HALTED=100 + +# state of the tool during transitions as defined above +uint8 state diff --git a/control_msgs/srv/SetGPIOToolConfig.srv b/control_msgs/srv/SetGPIOToolConfig.srv new file mode 100644 index 00000000..196ff6f1 --- /dev/null +++ b/control_msgs/srv/SetGPIOToolConfig.srv @@ -0,0 +1,9 @@ +# This action interface is defined for setting the configuration of the GPIOToolController. +# In yaml file of the controller, the configurations are defined as a list of strings, for example a gripper might have the following configurations: ["narrow_objects", "wide_objects"], or a lift unit on a mobile base might have configurations like ["with_payload", "without_payload"]. +# The action request is called with the name of the configuration to be set. +# During the configuration change, the gripper is going through a set of transitions, which are defined in the GPIOToolTransition message. + +string config_name # information about which configuration is being set for tool +--- +bool success # indicate success for setting the configuration of the tool and vice versa +string message # informational, e.g. for success or error messages