Ask Your Question
1

Masses and moments of inertia do not match Solidworks Mass Properties when using Solidworks URDF Exporter.

asked 2020-06-10 01:04:10 -0500

topherbuckley gravatar image

updated 2020-06-11 23:05:08 -0500

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:

  1. Start with skin parts and actual parts as per the tutorial with Display States DS_Skin and DS_Actual.
  2. 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.
  3. Make a Selection Set for each Link using all actual parts and all skin parts associated with a given Link.
  4. Stay on DS_Actual and open the URDF Exporter.
  5. Use the Selection Set for all actual and skin parts associated with the base Link base_link. Use CoordSys as Reference Coordinate System.
  6. 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.
  7. Preview and Export..
  8. Ensure Coordinates set to CoordSys and Axis set to RotationalCenter
  9. Origin set to (0,0,0) (0,0,0) I assume this to be relative to CoordSys?
  10. Axis looks to be a unit vector along the RotationalCenter axis as expected.
  11. Next
  12. 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.
  13. 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 ...
(more)
edit retag flag offensive close merge delete

Comments

2

I don't have enough Karma to post a photo

please attach your screenshots directly to this post. I've given you sufficient karma.

gvdhoorn gravatar image gvdhoorn  ( 2020-06-10 01:15:15 -0500 )edit

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.

topherbuckley gravatar image topherbuckley  ( 2020-06-10 03:11:30 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-06-10 03:24:32 -0500

brawner gravatar image

Thank you for moving from the github issues over here, and for your very detailed question. It helps out everyone who has similar issues.

The only currently known issue with regards to masses and inertia properties is that the exporter does not support overridden properties, and it would be difficult to support that with the current workflow of the tool. However, it would be an unknown bug if the combined mass properties of a selected group of components (with no overridden properties) in SolidWorks does not match the same list of components in a link once exported.

When comparing the two though, make sure that you set the reference coordinate system in the mass properties dialog, otherwise the properties will be in reference to the global origin in SolidWorks. The inertia properties in the exporter dialog are always in reference to the link's inertia origin, which is the center of mass and aligned with the link's joint origin. The inertia matrix in the example you show does seem to match the inertia matrix in the mass properties dialog for the one taken about the center of mass and aligned with the output coordinate system.

You are correct that you will need to include both the hidden components and the skin components as the components in your link in order for the mass properties to match the solidworks components. The advice I give everyone when exporting from SolidWorks is to put all the parts and assemblies for each link into a single SW subassembly, which would include skin parts. If a link is just a single part, then you can leave it as a part. Also make sure that you set the mates so that the link assembly has the representational degree of freedom of the link in your robot. If you include many components in the selection list for a link, it's harder for the exporter to know what you want. It may also be possible that there are still bugs when there are multiple components in the selection list.

Please let me know if that helps to answer your question. That's an awesome looking robot!

edit flag offensive delete link more

Comments

The only currently known issue with regards to masses and inertia properties is that the exporter does not support overridden properties

Yeah, as per other issues on github I made sure to clear all overridden masses before proceeding to the steps above. I worked around this via making custom materials with the necessary masses instead of overridding them in the Mass Properties GUI.

When comparing the two though, make sure that you set the reference coordinate system in the mass properties dialog, otherwise the properties will be in reference to the global origin in SolidWorks.

I made sure to change the coordinate system in the Mass Properties dialog to "." (the name of my custom coordinate system.) This is also what is used for the "Global Origin Coordinate System" and "Reference Coord System" of the Exporter.

topherbuckley gravatar image topherbuckley  ( 2020-06-10 22:49:59 -0500 )edit

Sorry, to clarify, the coordinate system in the mass properties dialog should be the coordinate system of the joint. Not the global origin. But that looks like it's the case. The same "." coordinate system. It's not common to use "." as a frame id, but I don't think that's the problem.

For the sake of clarity, we are comparing the MoI about the center of mass, which is the second matrix. It's very close, but not the exact same. It's almost as if there is a very light part that's being included or not being included. I noticed that you only have one wheel skin, is that in the proper location?

Lastly, I just have to emphasize that this tool is a lot easier to use if all parts for a link are combined into one assembly. I have a really hard time verifying ...(more)

brawner gravatar image brawner  ( 2020-06-10 23:10:29 -0500 )edit

The inertia properties in the exporter dialog are always in reference to the link's inertia origin, which is the center of mass and aligned with the link's joint origin.

The Inertial Origin is the center of mass for the the individual Link not the entire robot right? I will likely have some other questions on this later, but I think it is prudent to figure out why the mass and center of mass of my base_link do not match prior to moving down the calculations to the Moments of Inertia. (See Edit2 on my question which includes another screenshot comparing the two for the base_link).

topherbuckley gravatar image topherbuckley  ( 2020-06-10 23:11:20 -0500 )edit

You are correct that you will need to include both the hidden components and the skin components as the components in your link in order for the mass properties to match the solidworks components. The advice I give everyone when exporting from SolidWorks is to put all the parts and assemblies for each link into a single SW subassembly, which would include skin parts. If a link is just a single part, then you can leave it as a part. Also make sure that you set the mates so that the link assembly has the representational degree of freedom of the link in your robot. If you include many components in the selection list for a link, it's harder for the exporter to know what you want. It may also be possible that there are still bugs when there are multiple components in the selection list.

That disrupts my ...(more)

topherbuckley gravatar image topherbuckley  ( 2020-06-10 23:12:45 -0500 )edit

It's not common to use "." as a frame id, but I don't think that's the problem.

Ha, yes this was to get around Solidworks displaying "CustomCoordinateSystem" in a drawing view completely unrelated to this issue :D. Silly Solidworks workaround.

I noticed that you only have one wheel skin, is that in the proper location?

I assume you are referring to the first screenshot. The 2nd wheel skin is included in a Assembly Mirror feature (that mirrors everything about the XZ plane as shown. Unfortunately Solidworks doesn't allow me to organize anything within a Mirror Feature, so some of my Tree is a bit strange in that way.

Lastly, I just have to emphasize that this tool is a lot easier to use if all parts for a link are combined into one

I can understand that. As I mentioned in the previous comment, that disrupts a ...(more)

topherbuckley gravatar image topherbuckley  ( 2020-06-10 23:18:19 -0500 )edit

I just finished working the model into three assemblies, representing the base_link, and each wheel respectively. Unfortunately, the same issue persists. The mass of the base_link is still slightly off from that shown in the Mass Properties. I'll have a look at this further tomorrow and look more into the skins, and other lightweight parts that for whatever reason could be on/off between these two methods.

I recall seeing something in the docs about your mass calculation only going so many levels deep but can't seem to find where I found that. Is there some restriction on how many levels (e.g. Assembly1.child1.child2.child3...childN?) the mass calc will go? I may need to reorganize the model to fit this if this is the case. Could be remembering this from another project though.

topherbuckley gravatar image topherbuckley  ( 2020-06-11 03:48:32 -0500 )edit

I made an Edit 3 section to my question with some updates about how I have narrowed down the issue quite a bit. Let me know if you have any ideas as to what is causing this.

topherbuckley gravatar image topherbuckley  ( 2020-06-11 23:05:46 -0500 )edit

If you update your model in the dropbox folder with the single-assembly-per-link version, I'll take a look at it this weekend.

brawner gravatar image brawner  ( 2020-06-11 23:15:07 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2020-06-10 01:04:10 -0500

Seen: 1,367 times

Last updated: Jun 11 '20