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

Add robotiq f2 140 support #18

Merged
merged 10 commits into from
Oct 13, 2023
Merged

Conversation

JafarAbdi
Copy link
Contributor

@JafarAbdi JafarAbdi commented May 12, 2023

Copied from [email protected]:ros-industrial/robotiq.git with small modifications to have the same structure as the codebase here

TODOs:

  • Update ros2_control file to support f2_140
  • Update launch files to supoort f2_140

@JafarAbdi JafarAbdi changed the title [WIP]: Add robotiq f2 140 support Add robotiq f2 140 support May 15, 2023
MarqRazz
MarqRazz previously approved these changes May 16, 2023
Copy link
Contributor

@MarqRazz MarqRazz left a comment

Choose a reason for hiding this comment

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

I don't have my computer to test but the changes look good. Thanks for adding the 2f_140!

@@ -41,7 +41,7 @@ def generate_launch_description():
pkg_share = launch_ros.substitutions.FindPackageShare(
package="robotiq_description"
).find("robotiq_description")
default_model_path = os.path.join(pkg_share, "urdf", "robotiq_gripper.urdf.xacro")
default_model_path = os.path.join(pkg_share, "urdf", "robotiq_2f_85.xacro")
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be robotiq_2f_85.urdf.xacro

@@ -33,7 +33,7 @@
</visual>
<collision>
<geometry>
<mesh filename="file://$(find robotiq_description)/meshes/collision/robotiq_base.stl" />
<mesh filename="file://$(find robotiq_description)/meshes/collision/2f_85/robotiq_base.stl" />
Copy link
Contributor

Choose a reason for hiding this comment

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

You missed adding 2f_85 to all of the visual tags.

Copy link
Contributor

Choose a reason for hiding this comment

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

What is this file used for?

Copy link
Contributor

@MarqRazz MarqRazz left a comment

Choose a reason for hiding this comment

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

Sorry I forgot about this PR! I don't have a way to test with hardware but the view_gripper launch files work.

image

Can you change the 2f_140 xacro's to mach how the 2f85 was done?
That is robotiq_2f_85.urdf.xacro calls the macro and attached to a world link. The macro.urdf.xacro includes ros2_control and builds the gripper URDF (feel free to keep that xacro only file).

@MarqRazz MarqRazz self-requested a review June 1, 2023 21:39
@MarqRazz MarqRazz dismissed their stale review June 1, 2023 21:41

Changes required

@develiberta
Copy link

I'm just waiting for this request to be merged.

@JafarAbdi
Copy link
Contributor Author

I'm just waiting for this request to be merged.

I'll fix the conflicts and try to get this working this week

gtoff added a commit to icclab/icclab_summit_xl that referenced this pull request Aug 30, 2023
@skpawar1305
Copy link

skpawar1305 commented Sep 1, 2023

thank you
gripper works with gen3

by adding

<?xml version="1.0"?>
<robot xmlns:xacro="http://wiki.ros.org/xacro" name="robotiq_gripper">
    <xacro:macro name="robotiq_gripper" params="
        name
        prefix
        parent
        *origin
        sim_ignition:=false
        sim_isaac:=false
        use_fake_hardware:=false
        fake_sensor_commands:=false
        include_ros2_control:=true
        com_port:=/dev/ttyUSB0">

        <!-- ros2 control include -->
        <xacro:include filename="$(find robotiq_description)/urdf/2f_140.ros2_control.xacro" />
        <!-- if we are simulating or directly communicating with the gripper we need a ros2 control instance -->
        <xacro:if value="${include_ros2_control}">
            <xacro:robotiq_gripper_ros2_control
                name="${name}" prefix="${prefix}"
                sim_ignition="${sim_ignition}"
                sim_isaac="${sim_isaac}"
                use_fake_hardware="${use_fake_hardware}"
                fake_sensor_commands="${fake_sensor_commands}"
                com_port="${com_port}"/>
        </xacro:if>

        <xacro:include filename="$(find kortex_description)/grippers/robotiq_2f_140/urdf/robotiq_arg2f_140_model_macro.xacro" />
        <xacro:robotiq_arg2f_140 parent="${parent}" prefix="${prefix}"/>
    </xacro:macro>
</robot>

to a new file robotiq_2f_140_macro.urdf.xacro
and renaming gripper and finger_joint in gen3's launch file

@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

Merging #18 (cbed8b2) into main (743d20f) will not change coverage.
Report is 5 commits behind head on main.
The diff coverage is n/a.

❗ Current head cbed8b2 differs from pull request most recent head cec006d. Consider uploading reports for the commit cec006d to get more accurate results

@@          Coverage Diff          @@
##            main     #18   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          5       5           
  Lines        352     352           
=====================================
  Misses       352     352           
Flag Coverage Δ
unittests 0.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@MarqRazz MarqRazz left a comment

Choose a reason for hiding this comment

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

I have verified this works in Gazebo and with the Kinova URDF (I will open a PR after we get this merged).
image

One issue that I have is that the 2f-85 in this repo has the fingers moving along the X-axis of the gripper base...
image

and the 2f-140 has the fingers moving along they Y-axis so it requires the user add an additional rotation when switching between the two.
image

To properly fix this/make them match we would need to rotate some of the meshes and then fix all the joints. Should we block the PR until I have time to fix the rotation? I could also add a dummy link to the base of the gripper and apply the rotation.

Copy link
Contributor

@MarqRazz MarqRazz left a comment

Choose a reason for hiding this comment

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

Okay so I added a dummy link to the base of the 2f-140 gripper to match the 2f-85. I will open up an issue to document the extra link and if someone has time they can rotate the meshes and delete it so they match.

@moriarty moriarty merged commit 8e40258 into PickNikRobotics:main Oct 13, 2023
18 checks passed
@JafarAbdi JafarAbdi deleted the pr-f2_140 branch October 15, 2023 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants