Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tool contact action #37

Open
wants to merge 4 commits into
base: humble-devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ find_package(ament_cmake REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(trajectory_msgs REQUIRED)
find_package(std_msgs REQUIRED)
find_package(control_msgs REQUIRED)


set(msg_files
msg/Analog.msg
Expand All @@ -25,6 +29,11 @@ set(srv_files
srv/SetForceMode.srv
)

set(action_files
action/ToolContact.action
action/TrajectoryUntil.action
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
Expand All @@ -33,7 +42,8 @@ endif()
rosidl_generate_interfaces(${PROJECT_NAME}
${msg_files}
${srv_files}
DEPENDENCIES builtin_interfaces geometry_msgs
${action_files}
DEPENDENCIES builtin_interfaces geometry_msgs trajectory_msgs std_msgs control_msgs
ADD_LINTER_TESTS
)

Expand Down
7 changes: 7 additions & 0 deletions action/ToolContact.action
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

---
int32 SUCCESS=0
int32 PREEMPTED = -1
int32 ABORTED = -2
Comment on lines +3 to +5
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the intended use for those?

A general "has the action succeeded / canceled / aborted" is part of the action definition already. In the end a caller would want to know whether a tool contact was detected or not, right? Those cases would both fall under the term "action succeeded" from my point of view.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I might not have thought that through all the way. Yeah, you are right that information would be nice to have.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After looking through how the interface to the robot itself works, you are right that the preempted and aborted dont make sense, but a "not triggered" result also doesnt really make sense. Once tool contact has been activated it stays active until it either finds contact or is cancelled by a user, in which case the action should report either cancelled or aborted, in my opinion.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, good point. Would we need a result at all, then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess not actually, the state of the action itself should be sufficient

int32 result
---
1 change: 1 addition & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

<depend>builtin_interfaces</depend>
<depend>geometry_msgs</depend>
<depend>action_msgs</depend>

<exec_depend>rosidl_default_runtime</exec_depend>

Expand Down
Loading