In my python script I want to import (provided USD like pallets) objects, but facing the issue that the units of meters are not always matching my current scene. Is there a way to check that dynamically in a script and change the units per meters for the new USD object?
How is it supposed to work in python to match such differences in Object sizes?
Hi @christof.schuetzenhoefer - In USD, the unit of measurement is defined at the stage level and is typically set to meters. When you import a USD file into another stage, the imported objects will be scaled according to the unit of the destination stage. If the units of the source and destination stages are different, the objects may appear too large or too small.
okay, and how can I know the units per meter in advance and change it respectively for the imported usd?
That’s what I want to know so that I can use the offered usd’s in my python simulation.
@christof.schuetzenhoefer i am not really an Issac Sim user, so hopefully i don’t point you in the wrong direction. but, if you have access to the latest Composer (2023.1.1), you could confirm the stage unit by looking at the unit indicator found near the bottom left of the viewport (this is from the Metrics Assembler extension) after opening up a USD file.
alternatively, some USD files also contain
metersPerUnit param (if you tried to edit it via a text file) that could be used to determine what unit of measurement is being utilized. for example, if it’s set to 0.01, it should be in centimeters. below is a ceiling fan asset from Nvidia’s ArchViz library:
Unfortunately, i don’t see the Metrics Assembler in the extension’s list in Issac. perhaps it’s design as intended.
This extension will also be available in our upcoming Isaac Sim release (Aug/Sep) .