Some robots fall through the default ground plane when running physx on the GPU.
The asset we used for testing was generated by:
- Select humanoid_instanceable from Isaac Assets (Beta) in the Isaac Sim UI
- Save flattened as humanoid_instanceable.usda
- Open with text editor, and replace Capsule with Cylinder
the resulting humanoid_robot_cylinder.usda is attached
humanoid_robot_cylinder.usda (71.9 KB)
Next, run the following script that adds the humanoid robot to a scene, and drops it above a ground plane:
fall_detector.py (2 KB)
call the script via python fall_detector.py humanoid_robot_cylinder.usda humanoid_instanceable/torso --physics-device cuda
We print the world poses of the articulation view after 300 simulation steps – we expect this to be above ground. But when simulating physics on the GPU, this is below ground.
If we re-enable collisions on the ground plane after world reset, the articulation collides with the ground as expected.
Here’s the relevant code sample as text:
from omni.isaac.kit import SimulationApp
import carb
simulation_app = SimulationApp({"headless": False})
# Needed for Instanceable Assets
carb.settings.get_settings().set("/persistent/omnihydra/useSceneGraphInstancing", True)
from omni.isaac.core import World
from omni.isaac.core.articulations import ArticulationView
from omni.isaac.core.utils.stage import add_reference_to_stage
import torch
my_world = World(stage_units_in_meters=1.0, backend="torch", device="cuda")
add_reference_to_stage(usd_path=asset_path, prim_path="/World/Prim")
prim_view = ArticulationView(
prim_paths_expr="/World/Prim/" + args.articulation_root,
name="prim_view",
positions=torch.Tensor([[0, 0, 5]]),
)
my_world.scene.add(prim_view)
ground_plane = my_world.scene.add_default_ground_plane()
my_world.reset(soft=False)
# If this is uncommented, collisions work.
# ground_plane.collision_geometry_prim.set_collision_enabled(True)
while simulation_app.is_running() and my_world.current_time_step_index < 300:
my_world.step(render=args.render)
# this should be above ground
print(prim_view.get_world_poses())
simulation_app.close()