ros/solidworks_urdf_exporter

Wrong inertia values in the exported URDF

dsubhasish09 opened this issue · 12 comments

When defining links made up of multiple parts in an assembly, the respective inertia values at the centre of mass of the individual parts (after using similarity transformation to make it parallel to the joint frame) is directly added to give the net inertia matrix instead of first translating to the net centre of mass (of all parts in the link combined) and then adding. This gives the wrong inertia matrix. This issue was only spotted recently, kindly resolve it at the earliest.

I noticed this issue years ago and left a issue report on the bitbucket. Unfortunately, I cannot pull this up anymore but this is problematic for force controlled robots. We have been updating the inertia's manually and making it a good point to do a review step in the model creation, so it is not really a blocker.

Also note that solidworks exports an inertia tensor, which differs from the inertia matrix on the off-diagonal components.

afbeelding

Yes, we are doing the same but it's a pain to manually alter the inertia values for every link, especially if you have a large number of these. Are you automating this by any means?

We have a simple UI to edit URDF's, that can parse the data from the solidworks mass tool (copy to clipboard data) . We just picked up development on it again, and we might consider open sourcing it.

That is unfortunate to hear about this bug, as I pretty much just use SW's interfaces to calculate the MOI. It sounds like it may be a bug upstream.

https://github.com/ros/solidworks_urdf_exporter/blob/master/SW2URDF/URDFExport/ExportHelperExtension.cs#L248-L260

Do either of you have representative models and a URDF to help make comparisons?

I can provide representative models, if you would like. I would much appreciate not having to manually correct the values every time I generate a URDF. Goodness knows how many headaches this has caused over the years...

This sound like something that urgently needs to be fixed

I'd like to add fuel to this fire. The inertia calculation is incorrect and needs to be fixed ASAP. Our workaround is to manually enter the correct inertia matrix values with every link that has more than two parts or bodies. The exporter only works properly if each link has a single body. Even multiple bodies within the same part will still throw off the inertia calculation, if they have different densities.

This code is open source, PRs are always welcome