Changing URDF to account for new gripper's mass


FrederikEbert
 Share

Recommended Posts

Hi,

I attached a Weiss WSG50 gripper to our Sawyer and I would like to update the gravity compensation to account for the gripper's mass.

I have the gripper's urdf here:

https://github.com/nalt/wsg50-ros-pkg/blob/master/wsg_50_simulation/urdf/wsg_50.urdf

How do I integrate this into Sawyer's URDF and make the controller use this at runtime?

Thanks!

Link to comment
Share on other sites

You can publish your URDF to the robot’s /robot/urdf topic, attaching it to the “right_hand” link. There is an example of a python script that sends this message with the electric gripper in the intera_interface scripts folder:

https://github.com/RethinkRobotics/intera_sdk/blob/master/intera_interface/scripts/send_urdf_fragment.py

 

Link to comment
Share on other sites

Hi Ian,

thanks for the tip. I tried running:

python send_urdf_fragment.py -f /home/febert/Documents/catkin_ws/src/wsg50-ros-pkg/wsg_50_simulatio
n/urdf/wsg_50.urdf.xacro -d 100

However this command does not seem to have any effect. I checked the tf_tree and it did not change while the command is running. Also the gripper does not show up when I visualize the robot model in rviz.

Any ideas what could be wrong?

Link to comment
Share on other sites

  • 6 months later...

The best way to check if the URDF has successfully updated is to pop open RViz, and look at the TF transforms. If your new gripper is there, then the URDF updated. If the moving joints are missing, make sure you’re publishing the position of that gripper joint on the /robot/joint_states topic as well.

Based on your code above, it appears that you are missing the  fixed joint between the robot and your gripper. You will need this is two spots:  Inside the xacro file you will have a fixed joint with “right_hand” as the parent link, and your grippers root_link as the child link. Second sure to specify the name of that joint under the joint flag (“-j name”) when you call the script.

Hope this helps!

~ Ian

Link to comment
Share on other sites

  • 1 month later...

Hi,

 

I also tried to attach a custom gripper to our Sawyer and run intera_interface scripts as above. However, error massages like the following was returned at runtime.

 

$ python send_urdf_fragment.py /home/jetman/Documents/ros_ws/src/costom/urdf/test_gripper.urdf -j right_gripper_base_joint -d 100

Traceback (most recent call last):

  File "send_urdf_fragment.py", line 22, in <module>

    import xacro_jade

ImportError: No module named xacro_jade

 

I can’t find the package “xacro_jade”.

How do I run this program?

 

Thanks!

Link to comment
Share on other sites

On 7/11/2018 at 3:25 AM, Jetman said:

Hi,

 

I also tried to attach a custom gripper to our Sawyer and run intera_interface scripts as above. However, error massages like the following was returned at runtime.

 


$ python send_urdf_fragment.py /home/jetman/Documents/ros_ws/src/costom/urdf/test_gripper.urdf -j right_gripper_base_joint -d 100

Traceback (most recent call last):

  File "send_urdf_fragment.py", line 22, in <module>

    import xacro_jade

ImportError: No module named xacro_jade

 

I can’t find the package “xacro_jade”.

How do I run this program?

 

Thanks!

I had the same problem. It seems like xacro_jade has been deprecated and merged to xacro itself. I replaced xacro_jade with xacro and it gives no errors.

But I'm not able to see the changes in URDF still :/

Link to comment
Share on other sites

Follow up question. I'm trying to put a small attachment on the finger_tip. Here's how the URDF looks like:

<robot name="pen_attachment">
  <link name="pen_base" />
  <link name="pen_tip" />
  <joint name="pen_joint" type="fixed">
    <parent link="pen_base"/>
    <child link="pen_tip"/>
    <origin xyz="0 0.011 0.058" rpy="0 0 0" />
  </joint>
</robot>

I run this command:

rosrun intera_interface send_urdf_fragment.py -f /path/to/pen_attachment.urdf -l right_gripper_r_finger_tip -j pen_base -d 100

But I don't see any new frames on the robot in RViz. What could be the cause?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share