From c7d7baaa4c9baee7f9700279dc6e7b072990e984 Mon Sep 17 00:00:00 2001 From: David Yackzan Date: Thu, 14 Nov 2024 07:38:19 -0700 Subject: [PATCH] Update tool srvs (#71) * Add AddTool Srv * Consolidate DetachTool/RemoveTool srvs * Remove no longer needed fields in AttachTool srv --- .../moveit_studio_agent_msgs/CMakeLists.txt | 3 ++- .../moveit_studio_agent_msgs/srv/AddTool.srv | 22 +++++++++++++++++++ .../srv/AttachTool.srv | 9 ++------ .../srv/DetachOrRemoveTool.srv | 15 +++++++++++++ .../srv/DetachTool.srv | 12 ---------- 5 files changed, 41 insertions(+), 20 deletions(-) create mode 100644 moveit_studio_msgs/moveit_studio_agent_msgs/srv/AddTool.srv create mode 100644 moveit_studio_msgs/moveit_studio_agent_msgs/srv/DetachOrRemoveTool.srv delete mode 100644 moveit_studio_msgs/moveit_studio_agent_msgs/srv/DetachTool.srv diff --git a/moveit_studio_msgs/moveit_studio_agent_msgs/CMakeLists.txt b/moveit_studio_msgs/moveit_studio_agent_msgs/CMakeLists.txt index 3e14d6e..77211ae 100644 --- a/moveit_studio_msgs/moveit_studio_agent_msgs/CMakeLists.txt +++ b/moveit_studio_msgs/moveit_studio_agent_msgs/CMakeLists.txt @@ -29,8 +29,9 @@ set(msg_files ) set(srv_files + "srv/AddTool.srv" "srv/AttachTool.srv" - "srv/DetachTool.srv" + "srv/DetachOrRemoveTool.srv" "srv/ClearStoredParameters.srv" "srv/EditWaypoints.srv" "srv/GetAgentInfo.srv" diff --git a/moveit_studio_msgs/moveit_studio_agent_msgs/srv/AddTool.srv b/moveit_studio_msgs/moveit_studio_agent_msgs/srv/AddTool.srv new file mode 100644 index 0000000..136dba3 --- /dev/null +++ b/moveit_studio_msgs/moveit_studio_agent_msgs/srv/AddTool.srv @@ -0,0 +1,22 @@ +# Service to add tools in the planning scene. +# The tool is given as a URDF string, and is attached to a specific frame in the planning scene with a relative pose. +# Once the tool is added, its collision shapes will be updated in the planning scene according to the tool joint values, +# if those are published in /joint_states. + +# The name of the tool to add to the planning scene. +# It must not be in the planning scene already, otherwise an error will be returned. +string tool_name + +# The tool URDF. +string tool_urdf + +# The pose at which the tool will be added. +# Use a pose stamped so we can define the frame relative to which the tool will be added. +geometry_msgs/PoseStamped tool_pose + +--- +# If the operation was successful. +bool success + +# If the operation was not successful, a message describing the error. +string message diff --git a/moveit_studio_msgs/moveit_studio_agent_msgs/srv/AttachTool.srv b/moveit_studio_msgs/moveit_studio_agent_msgs/srv/AttachTool.srv index 99d32a7..01bd816 100644 --- a/moveit_studio_msgs/moveit_studio_agent_msgs/srv/AttachTool.srv +++ b/moveit_studio_msgs/moveit_studio_agent_msgs/srv/AttachTool.srv @@ -1,5 +1,6 @@ # Service to attach articulated tools to the robot. -# The tool is given as a URDF string, and is attached to a specific link on the robot with a relative pose. +# The tool given must already exist in the planning scene, and is attached to a specific link on the robot at the +# current transform between the link and the tool. # Once the tool is attached, its collision shapes will be updated in the planning scene according to the tool # joint values, if those are published in /joint_states. @@ -7,16 +8,10 @@ # It must not be attached already, otherwise an error will be returned. string tool_name -# The tool URDF. -string tool_urdf - # The name of the robot link to attach to. # It must exist in the robot URDF, otherwise an error will be returned. string parent_link_name -# The relative transform of the tool with respect to the parent link. -geometry_msgs/Transform tool_pose - # Robot links this tool is allowed to collide with. string[] allowed_collision_links diff --git a/moveit_studio_msgs/moveit_studio_agent_msgs/srv/DetachOrRemoveTool.srv b/moveit_studio_msgs/moveit_studio_agent_msgs/srv/DetachOrRemoveTool.srv new file mode 100644 index 0000000..db3aa6d --- /dev/null +++ b/moveit_studio_msgs/moveit_studio_agent_msgs/srv/DetachOrRemoveTool.srv @@ -0,0 +1,15 @@ +# Service to detach tools from the robot or remove them from the scene. + +# The name of the tool to detach or remove. +# If using this srv with the 'detach_tool' service, the tool must have been +# attached to the robot previously. +# If using this srv with the 'remove_tool_from_scene', the tool must have been +# added to the scene previously. +string tool_name + +--- +# If the operation was successful. +bool success + +# If the operation was not successful, a message describing the error. +string message diff --git a/moveit_studio_msgs/moveit_studio_agent_msgs/srv/DetachTool.srv b/moveit_studio_msgs/moveit_studio_agent_msgs/srv/DetachTool.srv deleted file mode 100644 index 191aa00..0000000 --- a/moveit_studio_msgs/moveit_studio_agent_msgs/srv/DetachTool.srv +++ /dev/null @@ -1,12 +0,0 @@ -# Service to detach tools from the robot. - -# The name of the tool to detach. -# It must have been attached previously. Otherwise an error will be returned. -string tool_name - ---- -# If the operation was successful. -bool success - -# If the operation was not successful, a message describing the error. -string message