UniversalRobots / Universal_Robots_ROS_Driver

Universal Robots ROS driver supporting CB3 and e-Series
Apache License 2.0
752 stars 401 forks source link

UR5e - dynamically off-setting tool weight from the force/torque sensor #643

Open hidalgoem opened 1 year ago

hidalgoem commented 1 year ago

Hi, We are working with a UR5e robot and ROS noetic. We have a tool attached to the robot flange. we want to read the contact force applied on the tool, so we were looking to dynamically offset the weight of the tool from the sensor readings. This is to get only the contact force applied on the tool. Are there any ways to do that with ROS by using python?. Does setting center of gravity and tool weight in the teach pendant automatically offset the weight from the force sensor readings?. @fmauch

MCR100 commented 1 year ago

Yes, I am having the same issue. Eventhough I included the mass and COG in teach pendant. It looks like the /wrench topic is not offsetting the weight of the gripper. Is it possible to get something like RTDE robot controller output "actual_TCP_force" through ROS, which as per this reference would offset the weight @fmauch @gavanderhoorn

fmauch commented 1 year ago

Please do not @-mention people directly in issues, especially not people not directly involved in a repository. Many people consider this rather impolite.

There are a couple of aspects involved in the question:

  1. The wrench reported by the driver is the actual_TCP_force from RTDE transformed into the tool0_controller frame. It should include zeroing the FTS and compensating for the configured payload.
  2. The FTS on the robot needs to be zeroed at some point. This can be done by calling rosservice call /ur_hardware_interface/zero_ftsensor
  3. You can dynamically set the payload using
     rosservice call /ur_hardware_interface/set_payload "mass: 0.5
     center_of_gravity:
       x: 0.0
       y: 0.0
       z: 0.5"
MCR100 commented 1 year ago

Thank you for the reply. Since both of them contributed to similar issues in the repository I tagged them just to grab their attention. But I will avoid tagging hereafter. Intention was never to be impolite, as everyone contribution in this platform help us immensely in our work and thankful to them.

A follow up question, although the /wrench reported by the driver is close to zero, still have some offset at particular poses (as discussed in #617). Is it possible to get the raw ft_sensor data like in RTDE using "ft_raw_wrench" so that we can implement our own gravity compensation.

hidalgoem commented 1 year ago

Please do not @-mention people directly in issues, especially not people not directly involved in a repository. Many people consider this rather impolite.

There are a couple of aspects involved in the question:

  1. The wrench reported by the driver is the actual_TCP_force from RTDE transformed into the tool0_controller frame. It should include zeroing the FTS and compensating for the configured payload.
  2. The FTS on the robot needs to be zeroed at some point. This can be done by calling rosservice call /ur_hardware_interface/zero_ftsensor
  3. You can dynamically set the payload using
    rosservice call /ur_hardware_interface/set_payload "mass: 0.5
    center_of_gravity:
     x: 0.0
     y: 0.0
     z: 0.5"

Thanks for your soon reply and sorry for the wrong use of "@". I did't know it was impolite, that was not my intention.

Regarding the issue, we have tried zeroing the FTS, however as MCR100 mentioned, It is still showing an offset when the the tool orientation change, and setting the payload seems not to be working for us. Is there any other solution?.

Thanks