Understanding OnShape Importer Result

When I import from OnShape, I’m getting a stage that looks like this:

image

Can someone explain why the “Simplified_SCARA” is nested inside a “Simplified_SCARA”?

I don’t understand the meanings of the icons. Apparently others are wondering about this too:

If I try to move the inner Simplified_SCARA out to the world, to get rid of this double-nesting, I get the error:

2023-10-03 09:26:12 [Error] [omni.usd.commands.usd_commands] Cannot move/rename ancestral prim /World/Simplified_SCARA/Simplified_SCARA

Any explanation for how I can clean this up so there is a single XForm that is the parent of the various parts?

Also, I can’t set an Articulation Root on any node. So how I can use this? Is there something different I should be doing on the OnShape side of things?

Thanks!

-Dan

Update 1: Blue and orange arrows are payloads and references. You can get rid of this by doing “File → Save Flattened As”. Then the payloads and references will be gone.

Update 2: The reason I couldn’t set an articulation root was because the importer had done that for me :( So now I can put the articulation root wherever I want, but no articulations come up in the Lula Robot Description Editor.

Update 3: I have it working now. The Lula Robot Description Editor requires a very specific articulation layout. The articulation root must be on an xform prim which has children xform prims for each links. These children links must be rigid bodies. The parent and children of these rigid bodies must not be rigid bodies themselves. The joint relationships should be between these rigid body xforms.

1 Like

Hi @dan.sandberg - Let us know if you still have any specific question that you would like us to look at.

I’m not blocking on anything now, but there’s two bugs that should be fixed for others. The first is the importer uses float(…) and this can throw a ValueError if the string isn’t a number. This is a simple fix of making a to_float(…) function which catches the failed conversion, outputs a warning, and returns zero.

The second and more serious bug is that our original complex assembly was in a document that didn’t show up on the list of documents. There’s something about the assembly – complexity, joint type, something else which causes the document to not be seen. This caused us to waste a lot of time trying different ways of sharing, experimenting with OAuth vs API access, etc.

Perhaps this error is related to:

    % (input_variable_path[0], input_values, these_allowed_values)
omni.isaac.onshape.onshape_client.oas.exceptions.ApiValueError: Invalid value for `element_type` (VARIABLESTUDIO), must be one of ['PARTSTUDIO', 'ASSEMBLY', 'DRAWING', 'FEATURESTUDIO', 'BLOB', 'APPLICATION', 'TABLE', 'BILLOFMATERIALS', 'UNKNOWN']

?

Not sure.

Thanks btw!

The Variable Studio bug has been fixed for the newest version of the Onshape Importer - For the first bug I’d need to investigate to see what’s the appropriate fix.

Regarding the nesting - It’s how the Importer defines its hierarchy - The first element is the parent of the generated asset - It creates the asset in a separate file that gets added as a reference to your open stage - hence the Blue (or Orange) arrow. The children of that asset are the contents of the actual import, and they are parented in a Root prim that is the base for the Assembly.