-
|
Hi, My goal is to allow collisions between object A and B, and object B and C, while object A and C should not collide (i.e., A collides with B, and B collides with C, but A and C do not collide. They pass through each other). I found relevant information in the OmniPhysics documentation, but I’m not sure how to apply this to IsaacLab code. If you could provide a code snippet or an example showing how to implement this in IsaacLab, I would really appreciate it. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Thank you for posting this. You may try the following:
Example of a valid RigidObject config (note: this does not yet encode your A–B–C pattern, just shows a verified config): from isaaclab.assets import RigidObjectCfg
BOX_A_CFG = RigidObjectCfg(
prim_path="{ENV_REGEX_NS}/BoxA",
# spawn=... (your spawn config here)
collision_group=0, # or -1 depending on your use case
)
BOX_B_CFG = RigidObjectCfg(
prim_path="{ENV_REGEX_NS}/BoxB",
collision_group=0,
)
BOX_C_CFG = RigidObjectCfg(
prim_path="{ENV_REGEX_NS}/BoxC",
collision_group=0,
)Then a scene that filters collisions between environments: from isaaclab.scene import InteractiveScene, InteractiveSceneCfg
from isaaclab.utils import configclass
@configclass
class MySceneCfg(InteractiveSceneCfg):
# your terrain / objects / robots, e.g.
# box_a = BOX_A_CFG
# box_b = BOX_B_CFG
# box_c = BOX_C_CFG
filter_collisions = True # documented in InteractiveSceneCfg[page:1]
scene_cfg = MySceneCfg(num_envs=128)
scene = InteractiveScene(cfg=scene_cfg)
# Optionally, keep collisions with a global ground prim:
scene.filter_collisions(global_prim_paths=["/World/ground"]) # documented method[page:1]About implementing the A–B, B–C, not A–C patternRight now Isaac Lab does not provide a high‑level collision‑pair API similar to the OmniPhysics “Collision Groups & Filter Pairs” UI, and the Lab documentation does not define a supported Python helper to set per‑pair Footnotes |
Beta Was this translation helpful? Give feedback.
Thanks for the reply!
I actually managed to solve the problem by using the USD API. The code I used is as follows: