0
$\begingroup$

Rosanswers logo

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 ^ -2). Is this minus sign a typo or is this some metric I have never seen that does not correspond to the units of the Solidworks Moments of Inertia (kg * m ^ 2)
  14. At this point I'm not sure if I should just switch the Display State to DS_Skin, or if this actually even does anything?
  15. Export URDF and Meshes...

I've also included a Pack and Go zip file of my full assembly so you can recreate the steps above if so desired. Let me know if you require any further information.

System details:
Solidworks 2019 SP 5.0
URDF Exporter 1.5.1

###Edit 1: After receiving enough Karma, here are the screenshots I have in the Dropbox folder. From step 13.) see below: Mismatching Moment of Inertia
The remaining images are just other steps, that may or not be useful:
image description image description image description image description

###Edit 2: Adding another screenshot showing the difference in Mass Properties vs the Exporter for the base_link (everything but the wheels). Note the small differences in the Mass and Center of mass on the Mass Properties vs the Inertial Origin in the Exporter. (e.g. mass = 0.54812303 vs 0.54821, and x = -0.00412774 vs -0.0041336). I'm thinking it makes more sense to figure out the differences in mass and center of mass prior to trying to solve the Moments of Inertia : image description

The steps I took to produce this screenshot were:

  1. Run through the Exporter as per steps above
  2. When on the GUI showing Inertial Origin properties in the Exporter, I simply click the Mass Properties in the main Solidworks window. With everything already selected (thanks to the Exporter) this calculates the Mass Properties, of what I'd assume to be the same components the Exporter is using. I've also tried removing all items from the Mass Properties list and using my Selection Set that I used to define the base_link in the Exporter. Same results. Slight differences in mass and center of mass, which then compound the error in the Moments of Inertia, making them unrecognizable.

###Edit 3:

I narrowed this down quite a bit via the following steps:

  1. Starting from my Pack and Go Assembly with three distinct Assemblies corresponding to three distinct Links (base_link, wheelL, and wheelR). Although there may be separate issues with the wheel Links, here I am focusing on the base_link.
  2. Suppress all parts in my base_link assembly other than one.
  3. Run the Exporter until reaching the Inertial Origin window and note the Mass of the base_link.
  4. Open the Mass Properties window and note the Mass to be the same as shown in the Exporter
  5. Unsuppress a different part and suppress all others repeat steps 2-4 until I note a difference in the two reported mass values.
  6. After finding a part that results in a mismatch, roll back its feature tree to suppress all but the first feature. Rerun steps 2 and 3. Repeat this process until finding a feature that results in a mismatching mass.

I did this until I found my first feature that is causing an issue. It is a Thicken feature on the back cover plate. I haven't confirmed if this issue exists for other features as well, but I am curious how this could be happening.

I note the Mass Properties -> Options -> Accuracy Level and wonder if these two calculations of mass are using a different accuracy level? I tested out all three levels in the Mass Properties options, but nothing changed, so I suspect this is not the case. Any ideas?


Originally posted by topherbuckley on ROS Answers with karma: 21 on 2020-06-10

Post score: 1


Original comments

Comment by gvdhoorn on 2020-06-10:\

I don't have enough Karma to post a photo

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

Comment by topherbuckley on 2020-06-10:
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.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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!


Originally posted by brawner with karma: 581 on 2020-06-10

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by topherbuckley on 2020-06-10:\

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.

Comment by brawner on 2020-06-10:
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 correctness for any arbitrary solidworks model.

Comment by topherbuckley on 2020-06-10:\

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).

Comment by topherbuckley on 2020-06-10:\

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 workflow inside Solidworks a fair bit, but I will do a Pack and Go and try to do this ans see if the same issues persist. If so, we can look deeper at your code on Github.

Comment by topherbuckley on 2020-06-10:\

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 fair bit in my other usage of Solidworks, but I will try it on a Pack and Go copy so as to make debugging easier.

Comment by topherbuckley on 2020-06-11:
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.

Comment by topherbuckley on 2020-06-11:
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.

Comment by brawner on 2020-06-11:
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.

Comment by topherbuckley on 2020-06-15:
Sorry didn't see this before leaving for the weekend myself. I've added a new Pack and Go Zip file to the dropbox folder here. You can find the main parent assembly called "robot_assembly.SLDASM". I unziped and tried it and it looks to work, but let me know if anything isn't resolving correctly.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.