Hi here, I have a noobie question about how to add my own USD into isaac sim and how to rotate it and scale it?
The following is the code I am using, it runs without error but it just not appear here.
I also tried other ways to add usd, but none of them works, could you please tell me how to fix it?
Thanks a lot!
Hi @jianlin_wang_lynn
This post may help (in particular, the point 2)
Hi Toni,
Thanks so much for your reply, still stuck. I got your idea that I should use “add_reference_to_stage” this function, so I change the code as following.
It adds a object to the world as I can see “log” under the frame. But still nothing here, and some error appears in the terminal. Could you please tell me how to fix it?
p.s. I saw your reply in another question about the same question(How to use USD files in Extensions - #3 by yan.mtx) but I still not get how to fix it
Hi @jianlin_wang_lynn
As indicated in the post you mention:
The world.scene.add
method expects, as the only parameter, a XFormPrim object or derived objects such as RigidPrim , GeometryPrim , Robot or Articulation, for example… and the add_reference_to_stage
method return a pxr.Usd.Prim
Then, you can do something like this:
add_reference_to_stage(usd_path="/home/user/isaac_data/S1.usd", prim_path="/World/Log")
world.scene.add(XFormPrim(prim_path="/World/Log", name="SOME_CUSTOM_NAME")
or use other Isaac Sim Core objects depending on the nature of your .usd file
Hi Toni,
Thank you again for the reply! The file I would like to import is USD so it is one of XFormPrim I believe, the code I update shows as following but still have some mistake as you can see. “name ‘XFormPrim’ is not defined”
I double check the package I used and it seems I did not miss things here, could you please tell me how to fix it, thanks a lot!
Hi @jianlin_wang_lynn
XFormPrim
belongs to Isaac Sim Core Prim
You can import it as:
from omni.isaac.core.prims import XFormPrim
Thank so much for your reply Toni, it solves the problem.
I got few quick questions about the textures of the imported usd files, I saw related tutorial about how to change textures of urdf (Import URDF — Omniverse Robotics documentation) but not for usd.
Could you please tell me how to change the textures of the usd files? Like translation, materials, physical (able to fall or rigid)? As you can see in the following picture, the working version is from line 65 to 68, but I prefer the next version from line 71 to 78, it goes wrong with "NameError: name ‘Log1’ is not defined
", however I have no clue what to write here instead of Log1 or I should use other format? How can I fix it?
Thanks so much!