TechmanRobotInc / tmr_ros1

TM Robots supporting ROS1 drivers and some extended external applications. (experimental) (not support the new TM S-Series)
Other
49 stars 21 forks source link

`tool0` and `wrist_3_link` are not aligned #15

Open danielcranston opened 2 years ago

danielcranston commented 2 years ago

Alternative title: "Published tool0 does not match URDF + /joint_states"

Hello,

There seems to be a discrepancy between the Techman controller and ROS driver in terms of how they calculate the tool pose.

I'm using a TM5, but have observed this same issue on TM12 as well.

roslaunch tm5_700_moveit_config tm5_700_moveit_planning_execution.launch sim:=False robot_ip:=...

By setting the TCP to all-zeros from the Techman UI, I expect the tool0 and wrist_3_link frames to be identical. However, there is a discrepancy of about 1\~3 mm for TM5 in all dimensions, depending on the pose of the robot (3\~6 mm for TM12).

image

This is strange since the joint values published to /joint_states matches perfectly with the joint values shown in the Techman UI.

As I see it, this hints at potentially any of these:

  1. Techman controller uses a different method of calculating forward kinematics
  2. Robot URDFs are not truthful
  3. The robot is damaged, needs re-zeroing, or something similar.

All of these feel unlikely though. One would think that the Techman controller performs the exact same FK as the ROS side does when calculating and publishing tool0, but that doesn't seem to be the case.

Could you provide some comments as to why this might be happening?

TechmanRobotIncOwner commented 2 years ago

Because the URDF is ideal model, it did not involve error compensation.

You need to use modify DH table to get the compensation.

we write the compensation code in

https://github.com/TechmanRobotInc/tmr_ros1/tree/master/tmr_description/script

you can check it and modify the tmr_msgs to tm_msgs to execute it.

if you have problem please let us know

danielcranston commented 2 years ago

Thank you for the fast reply.

I had to make some minor modifications to make the script run. It seems the ask_item service manages to receive DeltaDH, but not DHTable.

[INFO] [1638414332.753050]: NotExist;DHTable
[INFO] [1638414332.753980]: DeltaDH={7.148254E-05,-0.03172346,0.006274104,0,-5.535118E-05,0.1786781,0.05728651,-0.001542082,-0.009202436,-0.03814601,-0.005877284,0.04057902,0.003074921,-0.009197571,-0.03530217,-0.1578931,0.07085007,-0.01309569,-0.009206315,-0.1578561,0.08040951,-0.0357741,-0.0001040755,-0.007542325,0.08041102,-0.1063445,0.07550213,0.01221239,-0.005863143,-0.01999277}
[ERROR] [1638414332.754666]: invalid dh

I guess DHTable should just contain the values in the robots urdf.xacro. Any idea why DHTable can't be fetched?

TechmanRobotIncOwner commented 2 years ago

Hi,

  1. Could you let me know the TMflow version, ROS verison?
  2. Do you connect robot successfully?

We would like to do some test based on your environment.

danielcranston commented 2 years ago
  1. TMFlow: 1.76.6300, ROS version: Melodic (ros-melodic-desktop: 1.4.1-0bionic.20200907.141709) on Ubuntu 18.04
  2. Yes, I would say I'm connected to the robot successfully. /joint_states and /tool0 are being published to correctly, and I was able to fetch the DeltaDH from the robot as shown in my previous comment.

I also made a related ticket in https://github.com/TechmanRobotInc/tmr_ros1/issues/16, if you could have a look at that as well it would be greatly appreciated.

TechmanRobotIncOwner commented 2 years ago

Hi,

For fetching "DHTable", please update TMflow "1.84.2200".

Download link from TM Robot website https://www.tm-robot.com/en/download/

danielcranston commented 2 years ago

Thank you for the quick response. I will update my TMflow version.

The bigger issue though, I feel, is that the scripts in https://github.com/TechmanRobotInc/tmr_ros1/tree/master/tmr_description/script assume the URDF representation of tmr_description, but I am interested in using the description in tm5_description/tm12_description.

Could you maybe do some tests on your side to use the scripts in https://github.com/TechmanRobotInc/tmr_ros1/tree/master/tmr_description/script to update a URDF in tm5_description? That would be greatly appreciated.

Lastly, do you mind also responding to https://github.com/TechmanRobotInc/tmr_ros1/issues/16?

Thanks again!