-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PhysX Shape failed to be created on a prim: #16
Comments
补充: 2024-08-27 08:06:47 [Error] [rtx.neuraylib.plugin] [MDLC:COMPILER] 1.0 MDLC comp error: file:/home/amax/.local/share/ov/pkg/isaac-sim-2023.1.1/GRUtopia/assets/scenes/demo_city/half/Materials/AM234_020_Railing.mdl?watch=00007fe6cd975280(94,5): C152 'VRayMtl' : cannot convert argument 'texmap_bump' from 'struct ::base::texture_return' to 'float3' |
Hi @RongXingDaMoWang, thank you for your feedback. Can you paste the complete traceback of Errors so we can look into this issue? |
I think I'm experiencing the same error when excuting h1_house.py? @HanqingWangAI The complete error is here: `Starting kit application with the following args: ['/home/percy/.local/share/ov/pkg/isaac-sim-2023.1.1/exts/omni.isaac.kit/omni/isaac/kit/simulation_app.py', '/home/percy/.local/share/ov/pkg/isaac-sim-2023.1.1/apps/omni.isaac.sim.python.kit', '--/app/tokens/exe-path=/home/percy/.local/share/ov/pkg/isaac-sim-2023.1.1/kit', '--/persistent/app/viewport/displayOptions=3094', '--/rtx/materialDb/syncLoads=True', '--/rtx/hydra/materialSyncLoads=True', '--/omni.kit.plugin/syncUsdLoads=True', '--/app/renderer/resolution/width=1280', '--/app/renderer/resolution/height=720', '--/app/window/width=1440', '--/app/window/height=900', '--/renderer/multiGpu/enabled=True', '--/app/fastShutdown=True', '--ext-folder', '/home/percy/.local/share/ov/pkg/isaac-sim-2023.1.1/exts', '--ext-folder', '/home/percy/.local/share/ov/pkg/isaac-sim-2023.1.1/apps', '--/physics/cudaDevice=0', '--portable'] |---------------------------------------------------------------------------------------------| Active user not found. Using default user [kiosk]Streaming server started. |
@HanqingWangAI ,Hello, thank you for your great work. I have encountered the same problem as @percypeng5221 and @RongXingDaMoWang . May I ask what is going on? |
https://forums.developer.nvidia.com/t/physx-error-supplied-pxgeometry-is-not-valid/260265 |
Hi @RookieXwc @percypeng5221 @RongXingDaMoWang, we basically located the issue. It is caused by the in-compatible way of generating approximated collider for rigid bodies. We are still solving the errors. A temporal workaround is to disable all rigidbody in the scene and adopt from pxr import Usd, UsdPhysics, UsdGeom
def set_collider_(mesh, approx=UsdPhysics.Tokens.convexDecomposition, init_state=True):
"""set collider for a mesh
Args:
- mesh: Usd.Prim -> Mesh
- approx: Convex approximation method, e.g. ConvenDecomposition, ConvexHull
- init_state: init state of collider(whether activate)
"""
if mesh.GetTypeName() == "Mesh" and UsdPhysics.CollisionAPI.CanApply(mesh):
collider = UsdPhysics.CollisionAPI.Apply(mesh)
meshcollider = UsdPhysics.MeshCollisionAPI.Apply(mesh)
meshcollider.GetApproximationAttr().Set(approx)
collider.GetCollisionEnabledAttr().Set(init_state)
def set_collider(item, approx=UsdPhysics.Tokens.convexDecomposition, init_state=True):
"""set collider for all meshes of an Usd.Prim
Args:
- item: Usd.Prim, e.g. Xform
"""
if len(item.GetChildren()) == 0:
set_collider_(item, approx, init_state=init_state)
for i in item.GetChildren():
set_collider(i, approx, init_state=init_state)
def remove_collider_(mesh):
if mesh.GetTypeName() == "Mesh":
mesh.RemoveAPI(UsdPhysics.CollisionAPI)
mesh.RemoveAPI(UsdPhysics.MeshCollisionAPI)
def remove_collider(item):
if len(item.GetChildren()) == 0:
remove_collider_(item)
for i in item.GetChildren():
remove_collider(i)
def remove_rigid_(prim):
prim.RemoveAPI(UsdPhysics.RigidBodyAPI)
if prim.IsA(UsdPhysics.PrismaticJoint) or prim.IsA(UsdPhysics.RevoluteJoint):
attr = prim.GetAttribute("physics:jointEnabled")
attr.Set(False)
def remove_rigid(item):
remove_rigid_(item)
for i in item.GetChildren():
remove_rigid(i)
def bind_static(prim):
remove_collider(prim)
remove_rigid(prim)
set_collider(prim, "meshSimplification") |
Hello, may I ask in which file this code was modified? |
您好,感谢你们的分享,我在在运行城市和房屋的demo的时候,提示如下问题,希望能够得到解决,感谢
报错内容:
2024-08-27 08:03:55 [Error] [omni.physx.plugin] PhysX error: Supplied PxGeometry is not valid. Shape creation method returns NULL., FILE /buildAgent/work/eb2f45c4acc808a0/physx/source/physx/src/NpFactory.cpp, LINE 863
2024-08-27 08:03:55 [Error] [omni.physx.plugin] PhysX error: Supplied PxGeometry is not valid. Shape creation method returns NULL., FILE /buildAgent/work/eb2f45c4acc808a0/physx/source/physx/src/NpFactory.cpp, LINE 863
The text was updated successfully, but these errors were encountered: