Masses and moments of inertia do not match Solidworks Mass Properties when using Solidworks URDF Exporter.
I followed the tutorial regarding how to set up an assembly for a simpler mesh and in the export process I noticed the mass of some links does not match that shown in the Solidworks Mass Properties window. Additionally no links seem to have the same Moments of Inertia as shown by the Solidworks Mass Properties window. Is this a known issue, and if so how can we work around this to have both simplified meshes and accurate mass and moments of inertia?
I am not certain as to the steps of pointing the exporter to both the skin mesh and the actual massive parts. At first I was only including the skin parts, but it occurred to me that the URDF exporter would have no way to know which actual parts correspond to which skin parts with regard to mass and moments of inertia, so I suppose it is implied that one must select all the actual parts at some point. I'm still unsure of the correct steps to get both the skin part mesh with the actual mass and moments of inertia though. Here is as close as I've come thus far:
- Start with skin parts and actual parts as per the tutorial with Display States DS_Skin and DS_Actual.
- Create custom coordinate system (CoordSys) corresponding to the center of the wheels axis (two wheel balancer robot) and an axis RotationalCenter that passes through the rotational axis of both wheels.
- Make a Selection Set for each Link using all actual parts and all skin parts associated with a given Link.
- Stay on DS_Actual and open the URDF Exporter.
- Use the Selection Set for all actual and skin parts associated with the base Link base_link. Use CoordSys as Reference Coordinate System.
- Use the Selection Set for all actual and skin parts associated with each of my two child Links corresponding to each wheel (Link_WheelLeft and Link_WheelRight). Use CoordSys as Reference Coordinate System and RotationalCenter as the Reference Axis.
- Preview and Export..
- Ensure Coordinates set to CoordSys and Axis set to RotationalCenter
- Origin set to (0,0,0) (0,0,0) I assume this to be relative to CoordSys?
- Axis looks to be a unit vector along the RotationalCenter axis as expected.
- Next
- base_link: Although the same errors appear here, I'll ignore and move to the Link_WheelLeft as it has less components and easier to show the errors here. I should note that the Mass is also a little off between the Exporter and Mass Properties window.
- Link_WheelLeft: The Inertial Origin matches the Center of mass as calculated by Solidworks Mass Properties as does the Mass (0.045216 kg). The Moment of Inertia in the Exporter looks nothing like any of the matricies given in the Mass Properties of Solidworks. Why could this be? I don't have enough Karma to post a photo, but here is a shared Dropbox folder with some screenshots showing this. I also note the units in the Exporter to be (kg * m ...
please attach your screenshots directly to this post. I've given you sufficient karma.
Done. See edits. Doesn't look like I can upload the full Assembly zip here (I received no error message, it just stop trying to upload after some time). So if you want to take a look at it, it is still in the Dropbox folder. If there is a more appropriate place to share such a large file, please let me know and I'm happy to reupload.