In IsaacLab
I have a USD defining a scene with Xforms which reference Rigidbodies
cfg = sim_utils.UsdFileCfg(
usd_path="/workspace/isaaclab/shared/ramp1/usda/0001.usda"
asm_prim:Usd.Prim = cfg.func("/World/Origin1/Asm0001", cfg)
I want to load in a given scene and get the Xforms.
/scene/xform1@rigidbody/geometry
…
Would someone be able to point me to an example where a scene is spawned from FileCfg and the a prim is accessed as a RigidObject. If I traverse the scene I get Usd.Prims.
How do I access the RigidObject api for sim purposes from a Usd.Prim, such as adding a force or stepping the simulator
Edit for reference: I want to access part0 as RigidObject for example
0001.usda
#usda 1.0
(
defaultPrim = "assembly"
upAxis = "Z"
)
def Xform "assembly"
{
float xformOp:rotateX = -90
double3 xformOp:translate = (0, -0.019999999552965164, 0)
uniform token[] xformOpOrder = ["xformOp:rotateX", "xformOp:translate"]
def Xform "part0" (
prepend references = @../busd/b0.usda@</b0>
)
{
quatf xformOp:orient = (1, 0, 0, 0)
double3 xformOp:translate = (0, 0, 0)
uniform token[] xformOpOrder = ["xformOp:translate", "xformOp:orient"]
}
... etc
referencing rigid bodies such as:
#usda 1.0
(
defaultPrim = "b0"
)
def Xform "b0" (
prepend apiSchemas = ["PhysicsMassAPI", "PhysicsRigidBodyAPI", "PhysxRigidBodyAPI"]
)
{
float physics:mass = 0.08879914
bool physics:rigidBodyEnabled = 1
def Xform "geometry" (
instanceable = true
prepend references = @./b0_instance.usda@</b0/geometry>
)
{
double3 xformOp:translate = (0, 0, 0)
uniform token[] xformOpOrder = ["xformOp:translate"]
}
}