xArm-Developer / xarm_ros2

ROS2 developer packages for robotic products from UFACTORY
https://www.ufactory.cc/pages/xarm
BSD 3-Clause "New" or "Revised" License
100 stars 57 forks source link

xarm5 and xarm6 have links with invalid inertias #37

Closed mgraoikerlan closed 1 year ago

mgraoikerlan commented 1 year ago

We have ported this repository to use Ignition Gazebo instead of Gazebo Classic. When using Gazebo Classic, warnings arise indicating that the inertias of some links are not realistic but, as there is no critical error, the code can be executed. However, Ignition Gazebo arises some errors indicating that the inertias of some links are invalid, making it impossible to spawn xarm5 and xarm6. In the case of xarm6, which is the robot at our disposal, the results obtained are as follows:

Inertia files Links with invalid inertia
xarm6_type9_HT_BR2.yaml (lite6) -
xarm6_type6_HT_BR2.yaml (default) Link 3
xarm6_type6_HT_BR.yaml Link 3
xarm6_type6_HT2_LD.yaml Link 3
xarm6_type8_HT_BR2.yaml Link 2 and Link 3
xarm6_type11_HT_LD.yaml Link 2 and Link 3

We would like to know the reason for this problem and, if necessary, a revision of the inertia parameters. Thank you.

vmayoral commented 1 year ago

I'm also bumping into this issue. Same situation. Files don't work as provided. No clue about which inertia files should be used for xArm 6. This leads to a bad development experience. Having things tested and working in ignition is key since classic (Gazebo) is deprecated.

@vimior, @penglongxiang, @eborghi10 can you please advise on this topic? What are the right inertial files for the xArm 6 to be used together with Ignition Gazebo?

mcres commented 1 year ago

I can replicate exactly what's described in the issue. Can you please provide a solution for this?

alexMarFar commented 1 year ago

I have the same issue. Can you please take a look at the inertia parameters? Thank you in advance!

penglongxiang commented 1 year ago

Hi all, sorry about the inconvenience. The issue may be related to the negative product of inertia convention used by URDF, while our parameters were originally calculated in positive convention. This incompatibility would not get reported until the latest ROS and Gazebo versions. As suggested by the MathWorks doc, all the previous Ixy, Ixz and Iyz values have to get negated. Please update the repository with updated parameters and test on Ignition Gazebo.

vmayoral commented 1 year ago

Thanks for the prompt reply @penglongxiang.

@mgraoikerlan, can you test this out on our behalf please and report back?

mgraoikerlan commented 1 year ago

Thanks for the quick reply @penglongxiang . Unfortunately, I have tried with the updated inertias and I still have the same problem.

vmayoral commented 1 year ago

Thanks for the quick reply @penglongxiang . Unfortunately, I have tried with the updated inertias and I still have the same problem.

So that we know exactly what we're referring to @mgraoikerlan, can you point @penglongxiang to the branch with the changes you tested?

mgraoikerlan commented 1 year ago

Thanks for the quick reply @penglongxiang . Unfortunately, I have tried with the updated inertias and I still have the same problem.

So that we know exactly what we're referring to @mgraoikerlan, can you point @penglongxiang to the branch with the changes you tested?

Sure @vmayoral. I tested the branch humble.

penglongxiang commented 1 year ago

Hi @mgraoikerlan, the inertia values were calculated by CAD software and they seem normal to me. We did notice there were outputs like "the link is static or has unrealistic inertia so the equivalent inertia box will not be shown" in rviz or classic gazebo before, however after the sign reverse this time, these warnings are gone, that's why we thought the issue was solved and the cause was found.

Since we have no experience of using Ignition Gazebo, we might need more time to look into it. Meanwhile, is it possible for you to give us some instructions and sample scripts to reproduce this issue (docs can be sent by email)? Or could you please send us the exact output of the error message for us to locate in third-party source code? More information could be helpful, thanks.

mgraoikerlan commented 1 year ago

I retract my previous comment, it seems that the changes had not been fully implemented. The problem has indeed been fixed by negativising the inertia. Soyy for the confusion and thank you very much for your help.

vmayoral commented 1 year ago

Thanks for the support @penglongxiang. Thanks everyone for the quick reaction.

penglongxiang commented 1 year ago

@vmayoral No problem, you also helped us find an issue we did not notice.