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

Parallel gripper controller #3246

Merged
merged 7 commits into from
Jan 22, 2025

Conversation

MarqRazz
Copy link
Contributor

Description

This PR closes #3017 and adds the option to control grippers that use the ros2_control ParallelGripperCommand interface. I renamed all of the existing gripper controller files to include the name gripper_command and created new files for the parallel_gripper_command_controller.

To setup add the following to your moveit_controllers.yaml

right_arm_gripper_controller:
  type: ParallelGripperCommand
  joints:
     - right_arm_gripper_joint
  action_ns: gripper_cmd
  allow_stalling: true # optional if you want to pick grasp objects of unknown size and want the request to succeed when the gripper stalls while grasping the object
  max_effort: 1.0 # optional, max effort of the joint allowed while moving (Newtons or Newton-meters)
  max_velocity: 0.5 # optional, max velocity of the joint allowed while moving (radians or meters / second)
  default: true

When you start MoveIt you should see the following when adding the controllers

[move_group-4] [move_group.moveit.moveit.plugins.simple_controller_manager]: Added ParallelGripperCommand controller for right_arm_gripper_controller

parallel_gripper_command_controller

Copy link
Contributor

@mikeferguson mikeferguson left a comment

Choose a reason for hiding this comment

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

I'll take a closer look later today

@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 9.47368% with 86 lines in your changes missing coverage. Please review.

Project coverage is 45.57%. Comparing base (e11cabb) to head (a4d278a).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ger/parallel_gripper_command_controller_handle.hpp 0.00% 56 Missing ⚠️
...r_manager/src/moveit_simple_controller_manager.cpp 32.00% 17 Missing ⚠️
...src/parallel_gripper_command_controller_plugin.cpp 0.00% 5 Missing ⚠️
...ller_manager/gripper_command_controller_handle.hpp 16.67% 5 Missing ⚠️
...nterface/src/gripper_command_controller_plugin.cpp 0.00% 3 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3246      +/-   ##
==========================================
- Coverage   45.65%   45.57%   -0.07%     
==========================================
  Files         714      716       +2     
  Lines       62299    62373      +74     
  Branches     7532     7541       +9     
==========================================
- Hits        28437    28422      -15     
- Misses      33694    33784      +90     
+ Partials      168      167       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JafarAbdi JafarAbdi self-assigned this Jan 15, 2025
@sea-bass sea-bass added the backport-jazzy Mergify label that triggers a PR backport to Jazzy label Jan 16, 2025
Copy link
Contributor

@sea-bass sea-bass left a comment

Choose a reason for hiding this comment

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

Left some minor comments.

The major comment is a totally new thing that needs to happen here, which is ensuring that this type of controller is included in the MoveIt Setup Assistant.

There's probably a few places in the moveit_setup_assistant/moveit_setup_controllers package to edit -- for example, this and this

Looking at the code, it seems MSA never added the effort_controllers/GripperActionController either, but... eh, probably not needed since that's also deprecated in Jazzy.

@MarqRazz
Copy link
Contributor Author

@sea-bass thanks for the detailed review, I appreciate the feedback!

I will try to get to the MSA stuff as soon as I can, but if you are okay to push this off to a different PR then I think this is good to go. I personally don't use the MSA because it makes messy configs.

Copy link
Contributor

@sea-bass sea-bass left a comment

Choose a reason for hiding this comment

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

You can do the MSA stuff after -- would definitely wait for @JafarAbdi and @mikeferguson to comment though, since they said they would.

Copy link
Member

@JafarAbdi JafarAbdi left a comment

Choose a reason for hiding this comment

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

Thanks!

@JafarAbdi JafarAbdi enabled auto-merge January 22, 2025 09:14
@JafarAbdi JafarAbdi added this pull request to the merge queue Jan 22, 2025
Merged via the queue into moveit:main with commit f47ecb5 Jan 22, 2025
9 checks passed
mergify bot pushed a commit that referenced this pull request Jan 22, 2025
* Add ParallelGripperCommand controller

* only use max velocity/effor when specified

* else if

* clean up author and copyright comments

* address review

* single joint control, remove allow_stalling

---------

Co-authored-by: Jafar Uruç <[email protected]>
(cherry picked from commit f47ecb5)
@MarqRazz MarqRazz deleted the parallel_gripper_controller branch January 22, 2025 18:53
sea-bass pushed a commit that referenced this pull request Jan 22, 2025
Co-authored-by: Jafar Uruç <[email protected]>
(cherry picked from commit f47ecb5)

Co-authored-by: Marq Rasmussen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-jazzy Mergify label that triggers a PR backport to Jazzy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add missing ParallelGripperCommand controller type
5 participants